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
ASKED:
November 3, 2009 9:32 PM
UPDATED:
November 6, 2009 12:02 AM
If your goal is to run RGZPFM you’re going to need the member name anyway.
Phil
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.
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
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