/* REXX PULLSAR Get SAR reports into a TSO dataset |**-***-***-***-***-***-***-***-***-***-***-***-***-***-***-***-**| | | | WARNING: EMBEDDED COMPONENTS. | | See text following TOOLKIT_INIT | | | |**-***-***-***-***-***-***-***-***-***-***-***-***-***-***-***-**| Written by Frank Clarke 20011114 Impact Analysis . SYSEXEC TRAPOUT . (alias) STORANAL Modification History 20070905 fxc removed redundant SYSTSIN/SYSTSPRT; */ arg argline address TSO /* REXXSKEL ver.20010802 */ arg parms "((" opts signal on syntax signal on novalue call TOOLKIT_INIT /* conventional start-up -*/ rc = trace(tv) info = parms /* to enable parsing */ address ISPEXEC "CONTROL ERRORS RETURN" /* I'll handle my own */ call A_INIT /* -*/ call B_READ_SAR /* -*/ if \sw.nested then call DUMP_QUEUE /* -*/ exit /*@ PULLSAR */ /* . ----------------------------------------------------------------- */ A_INIT: /*@ */ if branch then call BRANCH address TSO call A0_SETUP_LOG /* -*/ parse value "?" with , skl. progress , . parse value "0 0" with , s# , . sardsn = "ACN1.PR.D502.S01" skl.PULLSAR = "SARBCH" skl.STORANAL = "SARVIO" parse var info pgmname . return /*@ A_INIT */ /* . ----------------------------------------------------------------- */ A0_SETUP_LOG: /*@ */ if branch then call BRANCH address TSO parse value "0" with, log# log. parse value Date("S") Time("S") Time("N") with, yyyymmdd sssss hhmmss . parse var yyyymmdd 4 yrdigit 5 mm 7 dd /* 9 12 14 maybe */ if Pos(yrdigit,"13579") > 0 then mm = mm + 12 /* mm=24 */ logtag = Substr("ABCDEFGHIJKLMNOPQRSTUVWX",mm,1) /* logtag=X */ subid = logtag""dd""Right(sssss,5,0) /* X1423722 ? */ vb4k.0 = "NEW CATALOG UNIT(SYSDA) SPACE(1 5) TRACKS", "RECFM(V B) LRECL(4096) BLKSIZE(0)" vb4k.1 = "SHR" /* if it already exists... */ logdsn = "@@LOG."exec_name"."subid".LIST" origds = FIND_ORIGIN() call ZL_LOGMSG("Log started by" Userid() yyyymmdd hhmmss) call ZL_LOGMSG("Arg:" argline) call ZL_LOGMSG("Running from" origds) parse var origds "'" sysexec "(" return /*@ A0_SETUP_LOG */ /* . ----------------------------------------------------------------- */ B_READ_SAR: /*@ */ if branch then call BRANCH address TSO call BA_PROLOG /* -*/ call BR_RETRIEVE /* -*/ call BZ_EPILOG /* -*/ return /*@ B_READ_SAR */ /* DEIMBED, set up LIBDEFs . ----------------------------------------------------------------- */ BA_PROLOG: /*@ */ if branch then call BRANCH address ISPEXEC call DEIMBED /* -*/ dd = "" do Words(ddnlist) /* each LIBDEF DD */ parse value ddnlist dd with dd ddnlist $ddn = $ddn.dd /* PLIB322 <- PLIB */ "LIBDEF ISP"dd "LIBRARY ID("$ddn") STACK" end ddnlist = ddnlist dd return /*@ BA_PROLOG */ /* Invoke SARBCH to produce the SAR.SAPRINT dataset. This is done via a background job because SARBCH is authorized and cannot be run in the foreground. . ----------------------------------------------------------------- */ BR_RETRIEVE: /*@ */ if branch then call BRANCH address ISPEXEC call BRA_NEXT_JOB /* */ "FTOPEN TEMP" "FTINCL JOBCARDS" if Words(info) > 1 then, call BRS_STACK_JOBS /* -*/ else, call BRB_SHOW_SARPARM /* -*/ if progress = "" then do /* nothing queued */ "FTCLOSE" /* nothing usable */ zerrsm = "Entry refused" zerrlm = "Panel PROLSAR requires you to enter a report name", "and press ENTER. ", "You may have pressed PF3 in error." "SETMSG MSG(ISRZ002)" call ZL_LOGMSG("("BRANCH("ID")")", zerrlm) end /* no report selected */ else call BRR_RUN_SAR /* acquire report from SAR -*/ return /*@ BR_RETRIEVE */ /* . ----------------------------------------------------------------- */ BRA_NEXT_JOB: /*@ */ if branch then call BRANCH address ISPEXEC alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZA" "VGET JOB1 PROFILE" if job1 = "" then do /* doesn't exist? */ address TSO "JOBCARDS" argline /* setup jobcards */ "VGET JOB1 PROFILE" end parse var job1 jobn . /* //DOPUCDF */ jobchar = Right(jobn,1) /* F */ pt = Pos(jobchar,alphabet) + 1 /* 7 */ jobchar = Substr(alphabet,pt,1) /* G */ job1 = Overlay(jobchar,job1,, Length(jobn)) /* //DOPUCDG */ "VPUT JOB1 PROFILE" return /*@ BRA_NEXT_JOB */ /* . ----------------------------------------------------------------- */ BRB_SHOW_SARPARM: /*@ */ if branch then call BRANCH address ISPEXEC do forever report = pgmname writedsn = pgmname "DISPLAY PANEL(SARPARM)" /* get report genin seqin */ if WordPos("?",report genin seqin writedsn) > 0 then do "SELECT PGM(SARSPF) PARM("sardsn") NEWAPPL(SAR)" iterate /* redisplay panel */ end if rc > 4 then leave /* user hit PF3 ? */ if report = "" then leave /* no more reports */ call ZL_LOGMSG("("BRANCH("ID")")", "Report="report " Genin="genin " Seqin="seqin) parse value "" with sysdsorg ldrc = Listdsi(writedsn "directory norecall") if Pos("PO",sysdsorg) > 0 |, Pos( "(", writedsn) > 0 then do zerrsm = "Must be sequential" zerrlm = "Output dataset must be sequential. DSORG=PO", "is not yet supported." "SETMSG MSG(ISRZ002)" iterate end if Left(writedsn,1) = "'" then, /* originally quoted */ jcldsn = Strip(writedsn,,"'") /* unquoted */ else, /* originally unquoted */ jcldsn = Userid()"."writedsn /* fully qualified */ s# = Right(s#+1,2,0) /* 01 02 03 04 ... */ "FTINCL" skl.exec_name /* JCL for SARBCH */ queue "/DBASE NAME="sardsn queue "/LOAD ID="Strip(report) if genin <> "-0" &, genin <> "" then, queue "GEN="Strip(genin) if seqin <> "+0" &, seqin <> "" then, queue "SEQ="Strip(seqin) queue "DDNAME=WRITE" call BRC_INSERT_CMD /* -*/ if progress = "" then, progress = "Prepared:" report else, progress = progress report if exec_name = "STORANAL" then leave end /* forever */ if exec_name = "STORANAL" then, "FTINCL SARANAL" return /*@ BRB_SHOW_SARPARM */ /* Write the isolated queue to ISPSLIB and run SAR to acquire the report. . ----------------------------------------------------------------- */ BRC_INSERT_CMD: /*@ */ if branch then call BRANCH address ISPEXEC daid = daid.SLIB /* provided by DEIMBED */ mbr = "SARCMDS" "LMOPEN DATAID("daid") OPTION(OUTPUT)" do queued() parse pull line "LMPUT DATAID("daid") MODE(INVAR) DATALOC(LINE) DATALEN(80)" end "LMMREP DATAID("daid") MEMBER("mbr")" "LMCLOSE DATAID("daid")" "FTINCL SARCMDS" /* control info for SARBCH */ return /*@ BRC_INSERT_CMD */ /* The JCL jobstream is complete. Submit to the background reader. . ----------------------------------------------------------------- */ BRR_RUN_SAR: /*@ */ if branch then call BRANCH address ISPEXEC "FTCLOSE" "VGET (ZTEMPF ZTEMPN)" if sw.0modify then do "LMINIT DATAID(DDNID) DDNAME("ztempn")" zerrsm = "CAUTION!!!!!" zerrlm = "This JCL -WILL- be automatically submitted when", "EDIT completes. If you DO NOT want the JOB to run", "you must erase this JCL, saving an empty", "dataset." "SETMSG MSG(ISRZ002)" "EDIT DATAID("ddnid")" end if noupdt then return rc = Outtrap("JS.") /* catch SUBMITTED message */ address TSO "SUBMIT '"ZTEMPF"'" rc = Outtrap("OFF") do ccx = 1 to js.0 /* each line */ if WordPos("SUBMITTED",js.ccx) > 0 then leave end /* ccx */ if ccx > js.0 then, do ccx = 1 to js.0; say js.ccx call ZL_LOGMSG("("BRANCH("ID")")", js.ccx) end else do /* SUBMITTED */ if Left(Strip(js.ccx),3) = "IKJ" then , js.ccx = Subword(js.ccx,2) /* snip msgid */ zerrsm = js.ccx ; zerrlm = zerrsm parse var js.ccx "(JOB" jn ")" /* job number */ jn = jn + 0 /* strip zeroes */ "SETMSG MSG(ISRZ002)" end return /*@ BRR_RUN_SAR */ /* . ----------------------------------------------------------------- */ BRS_STACK_JOBS: /*@ */ if branch then call BRANCH address ISPEXEC report = "" do Words(info) parse value info report with report info s# = Right(s#+1,2,0) /* 01 02 03 04 ... */ "FTINCL" skl.exec_name /* JCL for SARBCH */ queue "/DBASE NAME="sardsn queue "/LOAD ID="Strip(report) queue "DDNAME=WRITE" call BRC_INSERT_CMD /* -*/ if progress = "" then, progress = "Prepared:" report else, progress = progress report "FTINCL SARANAL" end /* words(info) */ return /*@ BRS_STACK_JOBS */ /* Remove LIBDEFs . ----------------------------------------------------------------- */ BZ_EPILOG: /*@ */ if branch then call BRANCH address ISPEXEC dd = "" do Words(ddnlist) /* each LIBDEF DD */ parse value ddnlist dd with dd ddnlist $ddn = $ddn.dd /* PLIB322 <- PLIB */ "LIBDEF ISP"dd address TSO "FREE FI("$ddn")" end ddnlist = ddnlist dd return /*@ BZ_EPILOG */ /* . ----------------------------------------------------------------- */ LOCAL_PREINIT: /*@ customize opts */ address TSO sw.0modify = SWITCH("EDIT") if SWITCH("DIAGNOSE") then tsoparm = "((trace r" else tsoparm = "" return /*@ LOCAL_PREINIT */ /* subroutines below LOCAL_PREINIT are not selected by SHOWFLOW */ /* Parse out the embedded components at the back of the source code. . ----------------------------------------------------------------- */ DEIMBED: Procedure expose, /*@ */ (tk_globalvars) ddnlist $ddn. daid. address TSO fb80po.0 = "NEW UNIT(VIO) SPACE(5 5) TRACKS DIR(40)", "RECFM(F B) LRECL(80) BLKSIZE(0)" parse value "" with ddnlist $ddn. daid. lastln = sourceline() currln = lastln /* */ if Left(sourceline(currln),2) <> "*/" then return currln = currln - 1 /* previous line */ "NEWSTACK" address ISPEXEC do while sourceline(currln) <> "/*" text = sourceline(currln) /* save with a short name ! */ if Left(text,3) = ")))" then do /* package the queue */ parse var text ")))" ddn mbr . /* PLIB PANL001 maybe */ if Pos(ddn,ddnlist) = 0 then do /* doesn't exist */ ddnlist = ddnlist ddn /* keep track */ $ddn = ddn || Random(999) $ddn.ddn = $ddn address TSO "ALLOC FI("$ddn")" fb80po.0 "LMINIT DATAID(DAID) DDNAME("$ddn")" daid.ddn = daid end daid = daid.ddn "LMOPEN DATAID("daid") OPTION(OUTPUT)" do queued() parse pull line "LMPUT DATAID("daid") MODE(INVAR) DATALOC(LINE) DATALEN(80)" end "LMMADD DATAID("daid") MEMBER("mbr")" "LMCLOSE DATAID("daid")" end /* package the queue */ else push text /* onto the top of the stack */ currln = currln - 1 /* previous line */ end /* while */ address TSO "DELSTACK" return /*@ DEIMBED */ /* Find where code was run from. It assumes cataloged data sets. Original by Doug Nadel With SWA code lifted from Gilbert Saint-flour's SWAREQ exec . ----------------------------------------------------------------- */ FIND_ORIGIN: Procedure /*@ */ answer="* UNKNOWN *" /* assume disaster */ Parse Source . . name dd ds . /* get known info */ Call listdsi(dd "FILE") /* get 1st ddname from file */ Numeric digits 10 /* allow up to 7FFFFFFF */ If name = "?" Then /* if sequential exec */ answer="'"ds"'" /* use info from parse source */ Else /* now test for members */ If sysdsn("'"sysdsname"("name")'")="OK" Then /* if in 1st ds */ answer="'"sysdsname"("name")'" /* go no further */ Else /* hooboy! Lets have some fun!*/ Do /* scan tiot for the ddname */ tiotptr=24+ptr(12+ptr(ptr(ptr(16)))) /* get ddname array */ tioelngh=c2d(stg(tiotptr,1)) /* nength of 1st entry */ Do Until tioelngh=0 | tioeddnm = dd /* scan until dd found */ tioeddnm=strip(stg(tiotptr+4,8)) /* get ddname from tiot */ If tioeddnm <> dd Then /* if not a match */ tiotptr=tiotptr+tioelngh /* advance to next entry */ tioelngh=c2d(stg(tiotptr,1)) /* length of next entry */ End If dd=tioeddnm Then, /* if we found it, loop through the data sets doing an swareq for each one to get the dsname */ Do Until tioelngh=0 | stg(4+tiotptr,1)<> " " tioejfcb=stg(tiotptr+12,3) jfcb=swareq(tioejfcb) /* convert SVA to 31-bit addr */ dsn=strip(stg(jfcb,44)) /* dsname JFCBDSNM */ vol=storage(d2x(jfcb+118),6) /* volser JFCBVOLS (not used) */ If sysdsn("'"dsn"("name")'")='OK' Then, /* found it? */ Leave /* we is some happy campers! */ tiotptr=tiotptr+tioelngh /* get next entry */ tioelngh=c2d(stg(tiotptr,1)) /* get entry length */ End answer="'"dsn"("name")'" /* assume we found it */ End Return answer /*@ FIND_ORIGIN */ /* . ----------------------------------------------------------------- */ ptr: Return c2d(storage(d2x(Arg(1)),4)) /*@ */ /* . ----------------------------------------------------------------- */ stg: Return storage(d2x(Arg(1)),Arg(2)) /*@ */ /* . ----------------------------------------------------------------- */ SWAREQ: Procedure /*@ */ If right(c2x(Arg(1)),1) \= 'F' Then /* SWA=BELOW ? */ Return c2d(Arg(1))+16 /* yes, return sva+16 */ sva = c2d(Arg(1)) /* convert to decimal */ tcb = c2d(storage(21c,4)) /* TCB PSATOLD */ tcb = ptr(540) /* TCB PSATOLD */ jscb = ptr(tcb+180) /* JSCB TCBJSCB */ qmpl = ptr(jscb+244) /* QMPL JSCBQMPI */ qmat = ptr(qmpl+24) /* QMAT QMADD */ Do While sva>65536 qmat = ptr(qmat+12) /* next QMAT QMAT+12 */ sva=sva-65536 /* 010006F -> 000006F */ End return ptr(qmat+sva+1)+16 /*@ SWAREQ */ /* . ----------------------------------------------------------------- */ ZB_SAVELOG: /*@ */ if branch then call BRANCH address TSO if Symbol("LOG#") = "LIT" then return /* not yet set */ "ALLOC FI($LOG) DA("logdsn") REU" vb4k.0 "EXECIO" log# "DISKW $LOG (STEM LOG. FINIS" "FREE FI($LOG)" return /*@ ZB_SAVELOG */ /* . ----------------------------------------------------------------- */ ZL_LOGMSG: Procedure expose, /*@ */ (tk_globalvars) log. log# rc = Trace("O") address TSO parse arg msgtext parse value log#+1 msgtext with, zz log.zz 1 log# . if monitor then say, msgtext return /*@ ZL_LOGMSG */ /* . ----------------------------------------------------------------- */ HELP: /*@ */ address TSO;"CLEAR" ; say if helpmsg <> "" then do ; say helpmsg; say ""; end ex_nam = Left(exec_name,8) /* predictable size */ say " "ex_nam" retrieves reports or sysout from SAR to a TSO dataset. " say " " if ex_nam = "PULLSAR" then, say " Syntax: "ex_nam" " if ex_nam = "STORANAL" then, say " Syntax: "ex_nam" " say " (( " say " " say " " say " "ex_nam" runs as an ISPF dialog and obtains all its run-time " say " information via a panel. The panel requires you to " say " specify the report/sysout name, the GEN, and the " say " SEQuence number, all of which should be specified in" say " order to avoid unpredictable results. " say " " if ex_nam = "PULLSAR" then do say " In addition, you must also specify a dataset to hold" say " the delivered output. The dataset will be built, if" say " it does not exist, as PS/VBA/137. " end "NEWSTACK"; pull ; "CLEAR" ; "DELSTACK " say " " say " Debugging tools provided include: " say " " say " MONITOR: displays key information throughout processing. " say " " say " BRANCH: show all paragraph entries. " say " " say " TRACE tv: will use value following TRACE to place the " say " execution in REXX TRACE Mode. " say " " say " " say " Debugging tools can be accessed in the following manner: " say " " say " TSO "ex_nam" parameters (( debug-options " say " " say " For example: " say " " say " TSO "ex_nam" (( MONITOR TRACE ?R " address ISPEXEC "CONTROL DISPLAY REFRESH" exit /*@ HELP */ /* . ----------------------------------------------------------------- */ BRANCH: Procedure expose, /*@ */ sigl exec_name rc = trace("O") /* we do not want to see this */ arg brparm . origin = sigl /* where was I called from ? */ do currln = origin to 1 by -1 /* inch backward to label */ if Right(Word(Sourceline(currln),1),1) = ":" then do parse value sourceline(currln) with pgfname ":" . /* Label */ leave ; end /* name */ end /* currln */ select when brparm = "NAME" then return(pgfname) /* Return full name */ when brparm = "ID" then do /* wants the prefix */ parse var pgfname pgfpref "_" . /* get the prefix */ return(pgfpref) end /* brparm = "ID" */ otherwise say left(sigl,6) left(pgfname,40) exec_name "Time:" time("L") end /* select */ return /*@ BRANCH */ /* . ----------------------------------------------------------------- */ DUMP_QUEUE: /*@ Take whatever is in stack */ rc = trace("O") /* and write to the screen */ address TSO "QSTACK" /* how many stacks? */ stk2dump = rc - tk_init_stacks /* remaining stacks */ if stk2dump = 0 & queued() = 0 then return say "Total Stacks" rc , /* rc = #of stacks */ " Begin Stacks" tk_init_stacks , /* Stacks present at start */ " Excess Stacks to dump" stk2dump do dd = rc to tk_init_stacks by -1 /* empty each one. */ say "Processing Stack #" dd " Total Lines:" queued() do queued();pull line;say line;end /* pump to the screen */ "DELSTACK" /* remove stack */ end /* dd = 1 to rc */ return /*@ DUMP_QUEUE */ /* . ----------------------------------------------------------------- */ KEYWD: Procedure expose info /*@ hide all vars, except info*/ arg kw kw_pos = wordpos(kw,info) /* find where it is, maybe */ if kw_pos = 0 then return "" /* send back a null, not found*/ kw_val = word(info,kw_pos+1) /* get the next word */ info = Delword(info,kw_pos,2) /* remove both */ return kw_val /*@ KEYWD */ /* . ----------------------------------------------------------------- */ KEYPHRS: Procedure expose, /*@ */ info helpmsg exec_name /* except these three */ arg kp wp = wordpos(kp,info) /* where is it? */ if wp = 0 then return "" /* not found */ front = subword(info,1,wp-1) /* everything before kp */ back = subword(info,wp+1) /* everything after kp */ parse var back dlm back /* 1st token must be 2 bytes */ if length(dlm) <> 2 then /* Must be two bytes */ helpmsg = helpmsg "Invalid length for delimiter("dlm") with KEYPHRS("kp")" if wordpos(dlm,back) = 0 then /* search for ending delimiter*/ helpmsg = helpmsg "No matching second delimiter("dlm") with KEYPHRS("kp")" if helpmsg <> "" then call HELP /* Something is wrong */ parse var back kpval (dlm) back /* get everything b/w delim */ info = front back /* restore remainder */ return Strip(kpval) /*@ KEYPHRS */ /* . ----------------------------------------------------------------- */ NOVALUE: /*@ */ say exec_name "raised NOVALUE at line" sigl say " " say "The referenced variable is" condition("D") say " " zsigl = sigl signal SHOW_SOURCE /*@ NOVALUE */ /* . ----------------------------------------------------------------- */ SHOW_SOURCE: /*@ */ call DUMP_QUEUE /* Spill contents of stacks -*/ if sourceline() <> "0" then /* to screen */ say sourceline(zsigl) rc = trace("?R") nop exit /*@ SHOW_SOURCE */ /* . ----------------------------------------------------------------- */ SS: Procedure /*@ Show Source */ arg ssbeg ssend . if ssend = "" then ssend = 10 if \datatype(ssbeg,"W") | \datatype(ssend,"W") then return ssend = ssbeg + ssend do ssii = ssbeg to ssend ; say Strip(sourceline(ssii),'T') ; end return /*@ SS */ /* . ----------------------------------------------------------------- */ SWITCH: Procedure expose info /*@ */ arg kw sw_val = Wordpos(kw,info) > 0 /* exists = 1; not found = 0 */ if sw_val then /* exists */ info = Delword(info,Wordpos(kw,info),1) /* remove it */ return sw_val /*@ SWITCH */ /* . ----------------------------------------------------------------- */ SYNTAX: /*@ */ errormsg = exec_name "encountered REXX error" rc "in line" sigl":", errortext(rc) say errormsg zsigl = sigl signal SHOW_SOURCE /*@ SYNTAX */ /* Can call TRAPOUT. . ----------------------------------------------------------------- */ TOOLKIT_INIT: /*@ */ address TSO info = Strip(opts,"T",")") /* clip trailing paren */ parse source sys_id how_invokt exec_name DD_nm DS_nm, as_invokt cmd_env addr_spc usr_tokn parse value "" with tv helpmsg . parse value 0 "ISR00000 YES" "Error-Press PF1" with, sw. zerrhm zerralrm zerrsm if SWITCH("TRAPOUT") then do "TRAPOUT" exec_name parms "(( TRACE R" info exit end /* trapout */ if Word(parms,1) = "?" then call HELP /* I won't be back */ "QSTACK" ; tk_init_stacks = rc /* How many stacks? */ parse value SWITCH("BRANCH") SWITCH("MONITOR") SWITCH("NOUPDT") with, branch monitor noupdt . parse value mvsvar("SYSNAME") sysvar("SYSNODE") with, #tk_cpu node . sw.nested = sysvar("SYSNEST") = "YES" sw.batch = sysvar("SYSENV") = "BACK" sw.inispf = sysvar("SYSISPF") = "ACTIVE" parse value KEYWD("TRACE") "O" with tv . tk_globalvars = "exec_name tv helpmsg sw. zerrhm zerralrm ", "zerrsm zerrlm tk_init_stacks branch monitor ", "noupdt" call LOCAL_PREINIT /* for more opts -*/ return /*@ TOOLKIT_INIT */ /* )))PLIB SARPARM )ATTR % TYPE(TEXT) INTENS(HIGH) SKIP(ON) + TYPE(TEXT) INTENS(LOW) SKIP(ON) @ TYPE(TEXT) INTENS(HIGH) COLOR(YELLOW) _ TYPE(INPUT) INTENS(LOW) CAPS(ON) $ TYPE(INPUT) INTENS(HIGH) CAPS(ON) ! TYPE(OUTPUT) INTENS(LOW) CAPS(OFF) COLOR(PINK) )BODY EXPAND(||) @|-|% PROL SAR Report Selection Panel @|-| %COMMAND ===>_ZCMD + @ Verify or Respecify: + + Report ===>$report + + + GEN ===>$genin+ + + SEQ ===>$seqin+ + OUTPUT To ===>$writedsn + + Enter a report name, GEN, and/or SEQ to@acquire a report. GEN and SEQ are optional. + + Enter a "?" in any field to@go to SAR. + Leave "Report" blank and press ENTER when finished. !PROGRESS )INIT &REPORT = &PGMNAME &GENIN = '-0' &SEQIN = '+0' .HELP = SARPARMH )REINIT REFRESH(*) )PROC IF (&REPORT EQ '?') .RESP = END IF (&GENIN EQ '?') .RESP = END IF (&SEQIN EQ '?') .RESP = END IF (&WRITEDSN EQ '?') .RESP = END VER (&REPORT,NB) VER (&WRITEDSN,NB) )END VER (&GENIN,ENUM) VER (&SEQIN,ENUM) )))PLIB SARPARMH )ATTR % TYPE(TEXT) INTENS(HIGH) SKIP(ON) + TYPE(TEXT) INTENS(LOW) SKIP(ON) _ TYPE(INPUT) INTENS(HIGH) ! TYPE(OUTPUT) INTENS(HIGH) SKIP(ON) @ TYPE(OUTPUT) INTENS(LOW) SKIP(ON) )BODY EXPAND(||) %TUTORIAL |-| PROL SAR Report Selection Panel |-| TUTORIAL %Next Selection ===>_ZCMD + Enter the report name as known by SAR. If GEN and SEQ are left as-is, the most recent version of the SYSOUT will be retrieved; otherwise enter the appropriate generation and sequence for the desired SYSOUT. When finished selecting reports/SYSOUTs, leave "Report" blank and press ENTER. If you specified "EDIT", the JCL for acquiring the SYSOUTs will be presented to you for last-minute changes. The JCL is automatically submitted for you. )PROC )END )))SLIB JOBCARDS &JOB1 &JOB2 &JOB3 &JOB4 )))SLIB SARBCH //* ------------------------------------------------------- */ //GET&S#. EXEC PGM=SARBCH RETRIEVE FROM SAR //SYSUDUMP DD SYSOUT=* //SYSPRINT DD SYSOUT=W //WRITE DD DSN=&JCLDSN, // DISP=(MOD,CATLG),UNIT=SYSDA, // SPACE=(TRK,(10,20)), // DCB=(RECFM=VBA,LRECL=137,BLKSIZE=27998) //SYSIN DD * (member SARCMDS is inserted here) )))SLIB SARVIO //* ------------------------------------------------------- */ //GET&S#. EXEC PGM=SARBCH RETRIEVE FROM SAR //SYSUDUMP DD SYSOUT=* //SYSPRINT DD SYSOUT=W //WRITE DD DISP=(NEW,PASS),UNIT=VIO, // SPACE=(TRK,(10,20)), // DCB=(RECFM=VBA,LRECL=137,BLKSIZE=27998) //SYSIN DD * (member SARCMDS is inserted here) )))SLIB SARANAL //* ------------------------------------------------------- */ //SARAN&S# EXEC PGM=IKJEFT01,DYNAMNBR=300 //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * ISPSTART CMD(SARANAL &TSOPARM) //SYSEXEC DD DISP=SHR,DSN=&SYSEXEC //SARLIST DD DISP=(OLD,PASS),DSN=*.GET&S#..WRITE //ISPLOG DD DISP=NEW,UNIT=VIO, // SPACE=(TRK,(1,1)), // DCB=(LRECL=121,RECFM=FB,BLKSIZE=0) //ISPPROF DD DISP=NEW,UNIT=VIO,SPACE=(CYL,(1,1,15)), // DCB=(LRECL=80,RECFM=FB,BLKSIZE=0) //ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU //ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU //ISPSLIB DD DISP=SHR,DSN=ISP.SISPSENU //ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU */