/* REXX */ /* */ /* AUTHOR: Mark Zelden */ /* */ /***************************************************************/ /* */ /* DISPLAY THE LAST (LATEST) IPL INFORMATION FOR ALL LPARS */ /* */ /* This exec is meant to run against the PDS that contains */ /* the output history created by the IPLHIST exec. */ /* */ /* From the TSO READY prompt or ISPF option 6: */ /* EX 'SYS1.IPL.HISTORY(LASTIPL)' */ /* or */ /* Type "EX" next to this member from an enhanced member list */ /* or */ /* Put this exec in a SYSPROC/SYSEXEC library and type */ /* TSO %LASTIPL */ /***************************************************************/ Arg dsn If dsn = '' then DSN = 'SYS1.IPL.HISTORY' junk = outtrap('MBR.') /* capture output to MBR. stem */ "LISTD '" || dsn || "' MEMBERS" /* issue LISTD cmd against PDS */ junk = outtrap('off') /* stop capturing output */ Do I = 1 to MBR.0 /* loop to get past vol info */ If MBR.I = "--MEMBERS--" then leave /* if member section, exit loop*/ End If I = MBR.0 then do /* no members in PDS */ Say 'ERROR - No MEMBERS found in' dsn'.' /* issue error msg */ Exit 12 /* exit RC=12 */ End /*********************************************************************/ /* Create a new member list without blanks and remove $$$DOC and any */ /* other names that don't start with "$" from the list (in case */ /* IPLINFO and IPLHIST are stored in the same library as the */ /* history. */ /*********************************************************************/ TOT = 0 /* total members in new stem */ Do newl = I+1 to mbr.0 ckmem = Strip(mbr.newl) If ckmem = '$$$DOC' then iterate /* ignore $$$DOC member */ If Substr(ckmem,1,1) <> '$' then iterate /* ignore non-hist mbrs */ TOT = TOT+1 /* add 1 to total stem members */ newm.TOT = ckmem /* new stem with member name */ End If TOT = 0 then do /* no valid members in PDS */ Say 'ERROR - No valid MEMBERS found in' dsn'.' /* issue error msg */ Exit 12 /* exit RC=12 */ End /******************************************/ /* allocate input files */ /******************************************/ Do alloc = 1 to tot "ALLOC FI("newm.alloc") DA('"dsn"("newm.alloc")') SHR REUSE" End /******************************************/ /* read input file into stem variables */ /******************************************/ Do rd = 1 to tot "EXECIO 1 DISKR" newm.rd "(STEM" Substr(newm.rd,2,4) "FINIS" End /******************************************/ /* queue records to the stack */ /******************************************/ Do q1 = 1 to tot Interpret Queue ' 'Substr(newm.q1,2,4) || 1 End /******************************************/ /* need to remove some blanks so the */ /* output will fit in 80 columns. */ /******************************************/ Do J = 1 to tot pull lpar parse var LPAR ipldate ipltime iplvol . ipladdr iplparm LastIPL.J = ipldate ipltime iplvol 'LOAD' || ipladdr || iplparm End /******************************************/ /* Queue output */ /******************************************/ Queue ' L A S T I P L I N F O R M A T I O N' , ' - A L L L P A R S' Queue Copies('-',78) Do q2 = 1 to tot Queue Substr(newm.q2,2,4)':' LastIPL.q2 End /******************************************/ /* Display output */ /******************************************/ If Sysvar('SYSISPF')='ACTIVE' then do ddnm = 'DD'||random(1,99999) /* choose random ddname */ junk = msg(off) "ALLOC FILE("||ddnm||") UNIT(SYSALLDA) NEW TRACKS SPACE(1,1)", " DELETE REUSE LRECL(80) RECFM(F B) BLKSIZE(3120)" junk = msg(on) "EXECIO" Queued() "DISKW" ddnm "(FINIS" address ISPEXEC "LMINIT DATAID(TEMP) DDNAME("||ddnm||")" address ISPEXEC "BROWSE DATAID("||temp")" address ISPEXEC "LMFREE DATAID("||temp")" junk = msg(off) "FREE FI("||ddnm||")" End Else do queued() Parse pull line Say line End /******************************************/ /* Free files */ /******************************************/ junk = msg(off) Do free = 1 to tot "FREE FI("newm.free")" End Exit 0