/* REXX DLIB */ Trace parse arg libtype sublib memlist . address isredit "MACRO (libtype sublib memlist) PROCESS" if rc=0 then , /* handle running as a macro */ parse var libtype sublib memlist . upper libtype sublib memlist /* now handle memlist being entered as sublib parm */ if memlist='' & length(sublib) >1 & pos("*",sublib) >0 then , do; memlist=sublib ; sublib="*" ; end; pdslist="" sublibn=substr(sublib,2,1) sublib=substr(sublib,1,1) if sublibn="" then sublibn="3" if libtype="ASS" then do pdslist=userid()".USER.ASM" , "DLIVEDEV.TPTEST"sublibn".ASM" , "DLIVEDEV.S1ONLINE.ASM" end if libtype="JCL" then do pdslist=userid()".USER.CNTL" , "DLIVEDEV.TPTEST"sublibn".CNTL" , "DLIVEDEV.S1ONLINE.CNTL" end if libtype="TPTEST3" then do pdslist="DLIVEDEV.TPTEST"sublibn".ASM" , "DLIVEDEV.TPTEST"sublibn".CNTL" , "DLIVEDEV.TPTEST"sublibn".LINK" end if libtype="S1ONLINE" | libtype="S1" then do pdslist="DLIVEDEV.S1ONLINE.ASM" , "DLIVEDEV.S1ONLINE.CNTL" , "DLIVEDEV.S1ONLINE.LINK" end if libtype="EXEC" | libtype="REXX" then do pdslist="S00Z99.USER.REXX" , "S00Z99.USER.TSG.REXX" end if libtype="DATA" then do pdslist="S00Z99.USER.DATA" end if libtype="LIST" then do pdslist="S00Z99.USER.LIST" end if libtype="SYS" then do pdslist="SYS1.LINKLIB" , "SYS1.PARMLIB" , "SYS1.LPALIB" end if libtype="JCLC" then do pdslist="CICSDEV.CICS410.CNTL" end if libtype="ASSC" then do pdslist="CICSDEV.CICS410.ASM" end if libtype="PROC" | libtype="PROCLIB" then do dummy=outtrap("proclib.","*") "%PROCLIB" dummy=outtrap("OFF") do n=1 for proclib.0 pdslist=pdslist proclib.n end pdslist=strip(pdslist,"L") end if libtype="LINKLST" then do dummy=outtrap("linklst.","*") "%LINKLST" dummy=outtrap("OFF") do n=1 for linklst.0 pdslist=pdslist linklst.n end pdslist=strip(pdslist,"L") end /* Try and find requested DDNAME from TSO allocated DSN's */ /* SLOW ... but useful. */ if pdslist="" then do dummy=outtrap("alloced.","*") address TSO "LISTA ST" dummy=outtrap("OFF") allocflag=0 do n=1 for alloced.0 jj=n-1 ; dsn=alloced.jj if pos(".",word(alloced.n,1))¬=0 then iterate if substr(alloced.n,3,8)=libtype then do allocflag=1 ; pdslist=dsn end if allocflag=1 & substr(alloced.n,3,8)="" then do pdslist=pdslist dsn iterate end if substr(alloced.n,3,8)¬=libtype then do allocflag=0 end end end /* */ if sublib="P" then pdslist=word(pdslist,1) if sublib="T" then pdslist=word(pdslist,2) if substr(sublib,1,1)="S" then pdslist=word(pdslist,3) if pdslist="" then pdslist=libtype call pdsflist /* Display desired members from pdslist datasets */ exit