Field search in AS/400 physical files

285 pts.
Tags:
AS/400
CLP
In my product, if I have around 1000 physical files, I want to know the number of files and their names that are having a particular field. Is there any command in AS/400 to do this or do I just need to write a program to accomplish my idea? If I need to write a program, please suggest the idea of code. This question is not an assignment, its just an idea to get knowledge of AS/400

Software/Hardware used:
as400, physical files

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    If you issue a DSPFFD for *ALL files in your library to an *OUTFILE then you can query the outfile for your field.
    51,365 pointsBadges:
    report
  • CharlieBrowne

    Adding to Philip's suggestion:

    Does the field have the same name in all the files? If not you will need to get a list of all the different names that are possible and get a count for all of them.  

    And the *OUTFILE will include every file type that is in the library: PF, PL, DSPF

    41,430 pointsBadges:
    report
  • hhalbedl
    I use sometimes the SQL table syscolumns to find fields.

    select column_name, count(*) 
      from syscolumns 
    where column_name like '%TEST%' 
     group by column_name 

    10 pointsBadges:
    report
  • philpl1jb
    syscolumns.  Excellent.
    51,365 pointsBadges:
    report
  • ToddN2000

    You could also scan the source using pdm. use opt 25 then F13 to flag all source members. Enter the name in the find string, set option to *NONE, and flag Print list to "Y" and optionally you could flag print records.

    15,605 pointsBadges:
    report
  • sivakesava
    I used syscolumns
    285 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following