AS/400 Program To List Physcial Files with Deleted Records
30 pts.
0
Q:
AS/400 Program To List Physcial Files with 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
ASKED: Nov 3 2009  9:32 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
6540 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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.
Last Answered: Nov 3 2009  10:44 PM GMT by CharlieBrowne   6540 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Philpl1jb   24570 pts.  |   Nov 4 2009  3:10AM GMT

If your goal is to run RGZPFM you’re going to need the member name anyway.
Phil

 

Pdraebel   875 pts.  |   Nov 5 2009  9:18AM GMT

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.

 

Bvining   4885 pts.  |   Nov 5 2009  2:40PM GMT

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

 

TomLiotta   7950 pts.  |   Nov 6 2009  12:02AM GMT

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

 
0