/* REXX */ Parse upper arg catname catvol /* */ /* AUTHOR: MARK ZELDEN */ /* */ /* TRACE R */ /************************************************************/ /* This clist will take a list of dataset names allocated */ /* to ddname 'INPUT' and create idcams control cards to */ /* indirectly catalog the datasets in a dataset allocated */ /* to ddname 'OUTPUT'. As coded, this exec allocates */ /* the input/output files as members "INPUT" and "OUTPUT" */ /* of a PDS defined by the "workpds" variable below. */ /* Change the variable to a valid PDS that you can use. */ /* */ /* Please modify the CATNAME and CATVOL variables below */ /* or pass them to the exec as needed. */ /* Example: TSO %INDIRECR MASTER.CAT &SYSR2 */ /************************************************************/ workpds = 'userid.LIB.CNTL' /* */ If CATNAME = '' then CATNAME = 'CATALOG.MASTER' /* <===== CATALOG NAME */ If CATVOL = '' then CATVOL = '******' /* <===== volser */ /* other options for CATVOL = &SYSR1, &SYSR2 etc. */ /* */ /******************************************/ /* allocate input and output files */ /******************************************/ "ALLOC F(INPUT) DA('"|| workpds ||"(INPUT)') SHR REUSE" "ALLOC F(OUTPUT) DA('"|| workpds ||"(OUTPUT)') SHR REUSE" /******************************************/ /* read input file into stem variables */ /******************************************/ "EXECIO * DISKR INPUT (STEM INREC. FINIS" /* */ Do i = 1 to INREC.0 /*inrec.i = strip(inrec.i) remove leading and trailing blanks */ inrec.i = Word(inrec.i,1) /* remove leading and trailing blanks */ inrec.i = Translate(inrec.i) /* convert dsn to upper case if */ outrec1 = ' DEL ('||inrec.i||') -' outrec2 = ' NSCR CAT('||catname||')' outrec3 = ' /* */ ' outrec4 = ' DEF NVSAM(NAME('||inrec.i||') -' outrec5 = ' VOL('||catvol||') DEVT(0000)) -' outrec6 = ' CAT('||catname||')' outrec7 = ' /* * * * * * * * * * * * * * * * * * * * * * * * * * */ ' Do j = 1 to 7 Interpret queue outrec || j End End /* do i */ Queue '' /******************************************/ /* write output file and exit */ /******************************************/ "EXECIO * DISKW OUTPUT (FINIS" "FREE F(INPUT OUTPUT)" Exit 0