count physical files

5 pts.
Tags:
COUNT
Physical File
System i
How can I count all the physical files on a System i?
ASKED: January 8, 2009  3:44 PM
UPDATED: January 9, 2009  10:43 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Use DSPOBJD to create a physical file containing all the files on your system :-

DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*FILE) OUTPUT(*OUTFILE) OUTFILE(YourLib/YourFile)

You may need to change the object selection to select *ALLUSR instead of *ALL – otherwise this also counts system files. Then use Query to select a count of all the records with object attribute (ODOBAT) = ‘PF’.

Regards,

Martin Gilbert.

- or -

You can query file QADBXREF in QSYS library. Every time a PF or LF is created on the system, this file is maintained automatically and contains basic information for these files. There is a field on this file that defines the file as a PF or LF. You can query this file to get a count of PF files.

There are other files in QSYS that start with QADB that are maintained by the system as well that show fields on files, key fields on files, triggers etc.

—->

I believe the QADBXREF only contains <b>externally described</b> physical & logical files – if you have ‘flat’ data files I don’t think they’re listed. I seem to remember this problem from back in the System/36 environment – QADBXREF was pretty empty if you only used the S/36 environment.

Regards,

Martin Gilbert.

Discuss This Question:  

 
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

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