/* REXX *** */ /* Produce a brief report on an SVC DUMP dataset */ PARSE ARG dsn opt ADDRESS TSO SELECT; WHEN dsn = '' then DO SAY 'Function: Report on SVC DUMP dataset' SAY 'Syntax : %DI dump-dataset-name ¢RECALL!' EXIT 8 END WHEN opt = 'RECALL' then recall = 'RECALL' WHEN opt = '' then recall = 'NORECALL' OTHERWISE DO SAY 'Invalid argument 'opt EXIT 8 END END cc = LISTDSI(dsn recall) IF cc >= 16 then DO SAY sysmsglvl2 EXIT 8 END IF sysrecfm ^= 'FBS' & syslrecl < 4000 then DO SAY 'This is probably not a dump dataset' EXIT 8 END 'ALLOC DA('dsn') F(DUMPIN) INPUT SHR REU OPTCD(B)' 'EXECIO 1 DISKR DUMPIN 1 (STEM in. FINIS)' 'FREE F(DUMPIN)' IF in.0 < 1 then DO SAY 'I/O error on input or empty dump dataset' EXIT 8 END IF SUBSTR(in.1,1,2) ^= 'DR' | SUBSTR(in.1,5,2) ^= 'H ' then DO SAY 'Invalid or missing dump header' EXIT 8 END SAY 'DSNAME : 'sysdsname SAY 'Dump Title : 'STRIP(SUBSTR(in.1,89,100),trailing) IF sysdsname \= SUBSTR(in.1,445,44) then , SAY 'Original DSN: 'SUBSTR(in.1,445,44) jobnm = SUBSTR(in.1,1101,8) ofst = C2D(SUBSTR(in.1,2195,2)) /* adjustment for offset */ if ofst > 32767 then , ofst = ofst - 65535 /* v2r10 */ syml = C2D(SUBSTR(in.1,2114+ofst,1)) SAY '' IF syml > 0 then DO strsym = STRIP(SUBSTR(in.1,2115+ofst,syml),trailing)' ' fin = LASTPOS(' ',strsym,66) hdr = 'Symptoms :' DO WHILE fin ^= 0 SAY hdr SUBSTR(strsym,1,fin - 1) hdr = ' :' strsym = SUBSTR(strsym,fin+1) fin = LASTPOS(' ',strsym,66) END IF strsym ^= ' ' then SAY ' : 'SUBSTR(strsym,fin+1) END ELSE SAY 'Symptoms : None Recorded' cpid = C2X(SUBSTR(in.1,82,3)) modl = C2X(SUBSTR(in.1,85,2)) SAY '' SAY 'CPU ID : 'cpid' Model 'modl /* using the DAE information */ date = SUBSTR(C2X(SUBSTR(in.1,2399+ofst,3)),1,5) dtype = C2D(SUBSTR(in.1,37,1)) /* 1=STAND ALONE 2=SVCDUMP 3=SYSMDUMP 4=SLIP DUMP */ SELECT WHEN date ^= '00000' then DO call tformat C2D(SUBSTR(in.1,2394+ofst,4)) SAY 'Date : 'date SAY 'Time : 'result count = C2D(SUBSTR(in.1,2402+ofst,2)) SELECT; WHEN count > 1 then SAY 'Occurrences : 'count WHEN count = 1 then SAY 'First occurrence recorded in DAE' WHEN dtype = 3 then SAY 'DUMP created using SYSMDUMP' OTHERWISE SAY 'No previous occurrences recorded in DAE' END END WHEN dtype = 4 then SAY 'DUMP requested by SLIP command' OTHERWISE SAY 'No DAE information found' END Say 'Jobname='jobnm date = SUBSTR(C2X(SUBSTR(in.1,2384+ofst,3)),1,5) IF date ^= '00000' then DO cpid = C2X(SUBSTR(in.1,2388+ofst,3)) modl = C2X(SUBSTR(in.1,2391+ofst,2)) SAY '' SAY 'Original Occurrence Data:' SAY '-------------------------' SAY 'CPU ID : 'cpid' Model 'modl call tformat C2D(SUBSTR(in.1,2379+ofst,4)) SAY 'Date : 'date SAY 'Time : 'result END SAY ' ' EXIT 0 tformat: procedure /* format a time value in hundredths of seconds */ arg time mins = TRUNC(time / 600) secs = TRUNC((time - (mins*600))/10) hrs = TRUNC(mins/ 60) mins = mins - (hrs*60) return hrs':'RIGHT(mins,2,'0')':'RIGHT(secs,2,'0')