Hi I have a list of objects arranged alphabetically, I want to delete these objects in that order from a iseries server, can somebody help me how to write a CL for this?
Software/Hardware used:
ibm i
ASKED:
July 16, 2011 6:23 PM
UPDATED:
March 31, 2012 9:15 PM
I have a list of objects arranged alphabetically…
CharlieBrowne’s comment works well if you have a specific list. It’s perfectly valid just to run the exact sequence of DLTxxx commands.
If the list needs to change periodically, then you probably want a program that adapts automatically to new lists.
First question is — how is the list stored? Is it in a database file? In a text file?
Then, what values are in the list? Name of object? Library of object? Type of object?
And what is your OS version/release? Newer releases have better programming options.
Tom
If the file records must be processed alphabetically, you might consider using OPNQRYF to ensure the records are in the correct sequence.
If the list is in a file..you have to read the file in sequence.
for 1st object,you have to do a chkobj..if exists ,you do DLTxxx command based on object type…if sucessful go to next one..till end of file.