/* Rexx */ /* Exec to display the JES2 Proclib concatenation. */ /* Also called by LIBGROUP facility to dynamically define PROCLIB */ /* concatenation to Library group structure. Ashley - TSG */ Trace arg option . !svc99dsn="SYS1.PROCLIB" fc=svc99dsn("RACHECK","READ") /* check for read authority */ if fc¬=0 then do say "You are not authorised to read SYS1.PROCLIB" exit 4 end !svc99dsn="SYS1.PROCLIB(JES2)" fc=svc99dsn("ALLOC","JES2PROC") "EXECIO * DISKR JES2PROC (FINIS STEM DATA." fc=svc99dsn("FREE","JES2PROC") pl=1 sublibs="OEM OEM." , "CA CAPROD." , "MPM MPM." , "DSC DSC." , "SAL SAL." , "PROD PROD." , /* Must be penultimate entry */ "IBM *" /* Must be last entry */ do n=1 for data.0 if word(data.n,1)="//PROC00" | , word(data.n,1)="// " | , word(data.n,1)="//TEST" | , word(data.n,1)="//TSG" then do if word(data.n,2)¬="DD" then iterate dsnrec=translate(data.n," ",",") do w=1 for words(dsnrec) if substr(word(dsnrec,w),1,4)="DSN=" then , procdsn=strip(substr(word(dsnrec,w),5,44)) end do ll=1 by 2 for words(sublibs)/2 sublibdsn.pl=word(sublibs,ll) if pos(word(sublibs,ll+1),procdsn)¬=0 then leave end libinc.pl="DSN='"procdsn"',"sublibdsn.pl if word(data.n,1)="//TEST" then , libinc.pl="DSN='"procdsn"',TEST" if word(data.n,1)="//TSG " then , libinc.pl="DSN='"procdsn"',TSG" pl=pl+1 end end /* If we were called as part of LIBGROUP processing, then set */ /* up the global variable values */ if option="LIBGROUP" then do fc=globalv("PROCLIB","SET","LIBINC.0",pl+1) fc=globalv("PROCLIB","SET","LIBINC.1","LIB=PROCLIB") !globalv="TAG='Sublibs=Ibm,Oem,Ca,Mpm,Prod,Dsc,Sal,TEst,TSg'" fc=globalv("PROCLIB","SET","LIBINC.2") do jj=1 for pl-1 fc=globalv("PROCLIB","SET","LIBINC."jj+2,libinc.jj) end exit end /* Otherwise, display details at terminal */ address TSO "CLRSCRN" do d=1 for pl-1 say word(translate(libinc.d," ","'"),2) end exit