AS/400 Program To List Physcial Files with Deleted Records

40 pts.
deleted records
We currently have a program to list Physical Files with Deleted Records. The CLP utilizes the DSPFD command to build an out-file. The parameter for 'Type of Information' is *MBRLIST and 'File Attributes' is *PF. However, the out-file lists the data at the member level. Also, teh job takes TOO LONG to execute.

Rather then build a program to consolidate the data up to the physical file level, I want to know if threre is a command or API to list all the physical files in the system with deleted records ? The list must not be at the member level.

Thanks in advance.


Software/Hardware used:
i5/OS V5R4M0

Answer Wiki

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

There is nothing that I am aware of to do what you want in one step.
Why does it take TOO LONG?
How long does it take?
Are you doing all libraries?
A simple CL program with the DSPFD command outputting to a file in QTEMP, then running an SQL or QRY after that to get your short list would be easy to create.
You can then schedule that job to run in the early hours of the morning so you have the results when you come in.

Discuss This Question: 4  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.
  • philpl1jb
    If your goal is to run RGZPFM you're going to need the member name anyway. Phil
    54,090 pointsBadges:
  • pdraebel
    I think the API's you want to take a look at are QUSLOBJ (to get the list of PF into a user space) , QUSLMBR(to get a list of members) and QUSMBRD (to get the info about the member). I found that going with API's is way faster than using the CL commands with output to a file. Using these APIs you can build your own file with files having deleted records.
    7,545 pointsBadges:
  • bvining
    The APIs at Work Second Edition book (note that I'm the author so this is somewhat a vendor response) contains several sample programs that find the files/members with deleted records exceeding a user specified percentage of records and optionally reorganizes the members. Bruce Vining Bruce Vining Services
    7,070 pointsBadges:
  • TomLiotta
    I'd suspect that first you really only want PF-DTA (data files) while ignoring PF-SRC (source) files. Data files will tend to have only single members while source files will tend to have many members. Further, it's a near certainty that you won't be caring about deleted records in source files; so there's almost no reason to include them. It's possible (likely?) that running DSPFD individually against only data files might make a significant difference. However, there's not enough info in the question to make a suggestion. Without knowing what "the set" of files is that DSPFD is run over, everything is guesswork. Can you at least tell us what the DSPFD runs against? What files does it request? Also, does the program merely 'list' the members with deleted records or does it do something with the records from the *outfile? Tom
    125,585 pointsBadges:

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.

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


Share this item with your network: