One improvement would be elimination of the P command followed by logoff/logon. Instead of P, use SAVE X. This creates a data set named X.DATASETS that can then be used as needed. I have no answer at this time for the automation part using a batch utility.
Don Imbriale >-----Original Message----- >From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf >Of Howard Brazee >Sent: Friday, January 06, 2006 1:54 PM >To: IBM-MAIN@BAMA.UA.EDU >Subject: IBM Mainframe DSLIST to Dataset w/ Wildcards? > >I'm passing on this question (with permission from Doc Dwarf) that I >expect a Rexx expert will come up with the best solution > >[EMAIL PROTECTED] wrote in comp.lang.cobol: > > >[OT] IBM Mainframe DSLIST to Dataset w/ Wildcards? > >All righty... here's how we're spending some slow time here. Datasets >get >generated on a biweekly basis with the format: > >USERID01.TAnnnnn.Pooo.Ddddhhmm.node > >... where nnnnn represents a division, ooo is a pay period, ddd = >'Julian' >date, hhmm = time and .node is any one of four possible values. The >primary criterion of selection will be ooo, the pay period. > >(Pay period is designated as single-digit year and 01 - 27, a biweekly >cycle; research has determined that the earliest datasets are P0, year >2000, and that no P9 exist.) > >(I know... but I didn't design the naming convention.) > >Folks in corner offices want these deleted and their wills be done... >but >I'm looking to automate the task since there are about 14,000 datasets >involved, spread out over five USERIDs... oh, and most - but not all - >are >in MIGRAT1 or MIGRAT2 status. > >Now... if I use the (Library Function) 3.4 Data Set List Utility I can >specify a wildcarded string - eg USERID02.TA*.P0* - and the P >command-line >option; if I log off and Keep my listing dataset I can then use it as >input to a DFSORT, taking the listings of > >USERID02.TA11111.P001.NODE1 >USERID02.TA11111.P001.NODE2 >USERID02.TA22222.P001.NODE1 >USERID02.TA22222.P002.NODE2 > >... etc. and editing/reformatting them to create another file, >consisting >of... > >HDELETE USERID02.TA11111.P001.NODE1 >HDELETE USERID02.TA11111.P001.NODE2 >HDELETE USERID02.TA22222.P001.NODE1 >HDELETE USERID02.TA22222.P002.NODE2 > >... and use that as a SYSTSIN for an IKJEFT01. For the datasets that >aren't archived I can do this again and create an IDCAMS input of > >DELETE USERID02.TA33333.P026.NODE3 > >... and get rid of the last. > >Combining an interactive task, a logoff/logon sequence and a batch job >in >this way - while it will work - offends my sense of elegance; while I >have >a solution I'm looking for a better one. > >What I'd like to do is find a utility that does in batch what the Data >Set >List Utility does in the foreground, something that I can feed a string >like USERID02.TA*.P0* and have it generate the listing of the datasets >that I can feed to a SYSOUT and pass to the DFSORT edit/reformat step. > >Might anyone be able to suggest where I might look to find such a >utility? > >Thanks much! > >DD *********************************************************************** Bear Stearns is not responsible for any recommendation, solicitation, offer or agreement or any information about any transaction, customer account or account activity contained in this communication. *********************************************************************** ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html