I have taken output of DSPOBJD in a database file. Now I want to delete all the objects having type '*FILE' and object attribute 'PF' but the problem is I don't want to delete 'Source physical files'. I just want to delete files except 'Source physical file'. can anybody suggest how to do that ?
Software/Hardware used:
as400
ASKED:
June 7, 2011 11:07 AM
UPDATED:
June 9, 2011 2:45 PM
A PDM user option is a good choice. One minor adjustment:
change your filter from LF to PF and repeat.
The filter should be changed to PF-DTA in order to differentiate between source (PF-SRC) and data (PF-DTA) physical files.
The filter would have Object Type of *FILE for both runs. The change would be to the ‘Object attribute’ portion of the filter.
The PDM method lets you see the list of objects before you run any “delete” operation. That helps because you can experiment with different filters to see what objects are selected before actually doing anything to them.
Tom
Also, it’s not actually necessary to create a user option for this. PDM is aware of *FILE objects and the various ‘Object attributes’ that are associated with them. A normal PDM option 4=’Delete’ can be used.
And note that you can put a “4″ in the option field for any item and then press F13. That tells PDM to duplicate the option number into every item on the list that follows you one you typed into. After that, you could even scroll down through the list and remove some of the “4″s before pressing <Enter> if you wanted to make minor adjustments.
Tom
If you need to do this using an output file, you’d best be served by using DSPFD FILE([file library]/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) OUTFILE([outfile library]/[outfile]) then selecting those records where ATDTAT = ‘S’.