/* REXX $$JFORM Shape JCL into the following canonical form: //JOBNAME. JOB ..ACCTGINFO.STARTS.IN.16.., // ..CONTINUED.JOBCARD.STARTS.IN.16.. //*------1-----:------------ */ //STEPNAM EXEC PGM=..STEP.INFO.STARTS.IN.16 //DDNAME DD DSN=..., // .....CONT.IN.16... //*------1-----:------------ */ |**-***-***-***-***-***-***-***-***-***-***-***-***-***-***-***-**| | | | WARNING: EMBEDDED COMPONENTS. | | See text following TOOLKIT_INIT | | | |**-***-***-***-***-***-***-***-***-***-***-***-***-***-***-***-**| Impact Analysis . ... ... Modification History 20030218 fxc avoid shifting characters to uppercase during processing. 20030227 fxc run with CAPS ON and restore when finished; 20030407 fxc run with CAPS OFF and restore when finished; 20030625 fxc correct handling of long comments; 20030819 fxc minor corrections; 20041124 fxc enable PCOMM and ICOMM; 20061015 fxc alignment parameters in the profile; 20061115 fxc post-verb text cannot start after 16; */ address ISREDIT /* REXXSKEL ver.20020513 */ "MACRO (argline)" upper argline parse var argline parms "((" opts signal on syntax signal on novalue call TOOLKIT_INIT /* conventional start-up -*/ info = parms rc = Trace("O"); rc = Trace(tv) call A_INIT /* -*/ address TSO "NEWSTACK" if \sw.0ErrorFound then, call B_SCAN_JCL /* -*/ address TSO "DELSTACK" if sw.0SaveLog then, call ZB_SAVELOG /* -*/ if \sw.nested then call DUMP_QUEUE /* -*/ exit /*@ $$JFORM */ /* . ----------------------------------------------------------------- */ A_INIT: /*@ */ if branch then call BRANCH address ISREDIT call AA_SETUP_LOG /* -*/ parse value "DD ELSE ENDIF EXEC IF INCLUDE", "JCLLIB JOB OUTPUT PEND PROC SET" with, $jfvalvb call AD_SET_DEFAULTS /* -*/ if sw.0ErrorFound then return call AK_KEYWDS /* -*/ "(lastline) = LINENUM .zlast" "(origcaps) = CAPS" "CAPS OFF" parse value "" with , working lastverb , . "F FIRST P'^' 73 80" /* numbered ? */ if rc = 0 then do /* Yes */ "RENUM" "UNNUM" "AUTOSAVE PROMPT" call ZL_LOGMSG("JCL was renumbered") end "F FIRST P'^'" "LABEL .zcsr = .JS 0" /* mark JCL-start */ return /*@ A_INIT */ /* . ----------------------------------------------------------------- */ AA_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".#CILIST" call ZL_LOGMSG(exec_name "started by" Userid() yyyymmdd hhmmss) call ZL_LOGMSG("Arg:" argline) return /*@ AA_SETUP_LOG */ /* Get alignment values from the user's profile. If no values, set initial values and start the 'SETUP' dialog. . ----------------------------------------------------------------- */ AD_SET_DEFAULTS: /*@ */ if branch then call BRANCH address ISPEXEC drop ($jfvalvb) parmlist = "$jfptdd $jfptel $jfpten $jfptex $jfptif $jfptin", "$jfptjc $jfptjo $jfptou $jfptpe $jfptpr $jfptse", "$jfpldd $jfplel $jfplen $jfplex $jfplif $jfplin", "$jfpljc $jfpljo $jfplou $jfplpe $jfplpr $jfplse" "VGET ("parmlist") PROFILE" if sw.0Setup |, /* Forced reset of PROFILE or */ rc > 0 then, /* no PROFILE info */ do if rc > 0 then, /* PROFILE was empty */ parse value "13 10 10 12 10 6 9 12 8 10 10 6", "16 16 16 16 16 16 16 16 16 16 16 12" with, $jfptdd $jfptel $jfpten $jfptex $jfptif $jfptin, $jfptjc $jfptjo $jfptou $jfptpe $jfptpr $jfptse, $jfpldd $jfplel $jfplen $jfplex $jfplif $jfplin, $jfpljc $jfpljo $jfplou $jfplpe $jfplpr $jfplse . call ADI_INIT_VARS /* Init all the $JF.... vars -*/ if sw.0ErrorFound then return "VPUT ("parmlist") PROFILE" end call ADL_LOAD_VARS /* Load all the $JF.... vars -*/ return /*@ AD_SET_DEFAULTS */ /* . ----------------------------------------------------------------- */ ADI_INIT_VARS: /*@ */ 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 "DISPLAY PANEL(PTINIT)" sw.0ErrorFound = rc > 0 @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 /*@ ADI_INIT_VARS */ /* Load PROFILE variables to stems. . ----------------------------------------------------------------- */ ADL_LOAD_VARS: /*@ */ if branch then call BRANCH address TSO parse value $jfptdd $jfptel $jfpten $jfptex $jfptif $jfptin, $jfptjc $jfptjo $jfptou $jfptpe $jfptpr $jfptse, $jfpldd $jfplel $jfplen $jfplex $jfplif $jfplin, $jfpljc $jfpljo $jfplou $jfplpe $jfplpr $jfplse, $jfvalvb with, pt.DD pt.ELSE pt.ENDIF pt.EXEC pt.IF pt.INCLUDE, pt.JCLLIB pt.JOB pt.OUTPUT pt.PEND pt.PROC pt.SET, plc.DD plc.ELSE plc.ENDIF plc.EXEC plc.IF plc.INCLUDE, plc.JCLLIB plc.JOB plc.OUTPUT plc.PEND plc.PROC plc.SET, valid_verbs return /*@ ADL_LOAD_VARS */ /* . ----------------------------------------------------------------- */ AK_KEYWDS: /*@ */ if branch then call BRANCH address TSO dfltpos = "RIGHT" pcomm = KEYWD("PCOMM") /* PROC comments */ icomm = KEYWD("ICOMM") /* regular comments */ commpos = KEYWD("COMMENTS") /* RIGHT, TIGHT, or col# */ parse value commpos dfltpos with commpos . /* Use PCOMM if specified, else COMMPOS if specified, else default*/ parse value pcomm commpos with pcomm . if Datatype(pcomm,"W") |, WordPos(pcomm,"RIGHT TIGHT") > 0 then nop else pcomm = "RIGHT" /* PCOMM specified incorr */ /* Use ICOMM if specified, else COMMPOS if specified, else default*/ parse value icomm commpos with icomm . if Datatype(icomm,"W") |, WordPos(icomm,"RIGHT TIGHT") > 0 then nop else icomm = "RIGHT" /* ICOMM specified incorr */ call ZL_LOGMSG("COMMENTS positioning set to" pcomm "for PROC", "comments; set to" icomm "for JCL comments") return /*@ AK_KEYWDS */ /* . ----------------------------------------------------------------- */ B_SCAN_JCL: /*@ */ if branch then call BRANCH address ISREDIT do bx = 1 to lastline "(text) = LINE" bx /* acquire line */ if sw.0Diagnose then do rc=Trace("O") say text address TSO "NEWSTACK"; pull trcreq; address TSO "DELSTACK" if trcreq <> "" then rc=Trace("?r") end /* Diagnose */ if Left(text,2) = "//" &, Left(text,3) <> "//*" then do /* real JCL */ if Pos("'",text) > 0 then call B0_PACK /* -*/ parse var text front verb back /* get verb */ line = front if WordPos(verb,valid_verbs) > 0 then do lastverb = verb call BA_PLACE_VERB /* -*/ end /* valid verb */ else do /* not valid verb */ comments = Strip(back) back = verb verb = "" end /* not valid verb */ call BF_FORM_LINE /* -*/ end /* real JCL */ queue Strip(text,"T") call ZL_LOGMSG(text) end /* bx */ do queued() /* every stacked line */ parse pull line "LINE_BEFORE .JS = (line)" end /* queued */ "RESET" "X ALL .JS .ZL" /* exclude original */ "DEL ALL X" /* ...and delete */ "F FIRST P'^'" /* position to top */ "CAPS =" origcaps return /*@ B_SCAN_JCL */ /* 'text' contains a quoted string. To ensure it does not get split incorrectly, change all blanks within any such string to hex-3f. . ----------------------------------------------------------------- */ B0_PACK: /*@ */ if branch then call BRANCH address TSO start = 1 origtext = text /* save original */ do forever qpt = Pos("'",text,start) if qpt = 0 then leave do forever qpt = qpt + 1 /* next byte */ if qpt > 71 then leave if Substr(text,qpt,1) = "'" then leave if Substr(text,qpt,1) = " " then do text = Overlay('3f'x,text,qpt,1) sw.0packed = 1 end /* */ end /* forever */ if qpt > 71 then do text = origtext /* restore */ sw.0asis = 1 /* leave it alone */ leave end start = qpt + 1 end /* forever */ return /*@ B0_PACK */ /* Position the verb on LINE and set the location and length of the text which may follow. . ----------------------------------------------------------------- */ BA_PLACE_VERB: /*@ */ if branch then call BRANCH address ISREDIT if Length(line) > pt.verb - 2 then, line = line verb else, line = Overlay(verb,line, pt.verb ) pt = Length(line)+2 if pt < plc.verb then, pt = plc.verb call ZL_LOGMSG("JCL pushed to" pt) if verb <> "IF" then, parse var back back comments comments = Strip(comments) return /*@ BA_PLACE_VERB */ /* Place variables 'back' and 'comments' on the line. Adjusted specification: place BACK on the line if it will fit, or split line if it will not. Place comments on the line if it will fit, or split line if it will not. . ----------------------------------------------------------------- */ BF_FORM_LINE: /*@ */ if branch then call BRANCH address ISREDIT if sw.0asis then do /* set in B0_PACK */ sw.0asis = 0 /* restore */ return /* no processing */ end if sw.0packed then do comments = Strip(Translate(comments," ",'3f'x) ) back = Strip(Translate(back ," ",'3f'x) ) sw.0packed = 0 end if lastverb = "PROC" then commpos = pcomm else commpos = icomm bklen = Length(back) cmlen = Length(comments) sw.0TooLong = (bklen + cmlen +pt) > 71 select when sw.0TooLong then, call BFS_SPLIT_LINE /* -*/ when commpos = "RIGHT" then do cmpt = 72 - cmlen /* start of comment */ line = Overlay(comments,line,cmpt) text = Overlay(back,line,pt) end /* RIGHT */ when commpos = "TIGHT" then do back = Space(back comments,1) /* rejoin back and comments */ text = Overlay(back,line,pt) end /* TIGHT */ otherwise do /* numeric */ line = Overlay(back,line,pt) /* place JCL */ if cmlen + commpos > 72 then do /* comment too long */ cmpt = 72 - cmlen /* where to place it */ text = Overlay(comments,line,cmpt) /* place comments */ end else, text = Overlay(comments,line,commpos) /* place comments */ end /* numeric */ end /* select */ pt = Min(plc.lastverb,16) /* set to standard indent */ return /*@ BF_FORM_LINE */ /* The text won't all fit on one line. Put the JCL on one line and the comments on the next. Always leave 'text' ready because when we return, the regular flow will output this line. . ----------------------------------------------------------------- */ BFS_SPLIT_LINE: /*@ */ if branch then call BRANCH address ISREDIT if (bklen + pt) > 71 then do /* it's already too long */ if Right(back,1) = "," then sw.0Comma = 1 do bz = bklen-1 to 1 by -1, /* find prior comma */ while Substr(back,bz,1) <> "," end /* bz */ if bz = 0 then do /* no commas ??? */ text = Space(line back comments,1) /* pack it tight */ end else do bz = bz + 1 /* */ parse var back slug =(bz) back /* snip after the comma */ line = Overlay(slug,line,pt) queue Strip(line) line = "//" /* ordinary JCL line */ text = Overlay(back,line,plc.lastverb) end end /* JCL is too long */ else, text = Overlay(back,line,pt) if comments <> "" then do queue Strip(text) call ZL_LOGMSG(text) if WordPos(commpos,"RIGHT TIGHT") > 0 then, cmpt = 72 - cmlen /* start of comment */ else cmpt = commpos line = "//*" text = Overlay(comments,line,cmpt) end return /*@ BFS_SPLIT_LINE */ /* . ----------------------------------------------------------------- */ LOCAL_PREINIT: /*@ customize opts */ address TSO sw.0Setup = SWITCH("SETUP") if sw.0Setup then do parse value "DD ELSE ENDIF EXEC IF INCLUDE", "JCLLIB JOB OUTPUT PEND PROC SET" with, $jfvalvb call AD_SET_DEFAULTS /* -*/ exit end sw.0Diagnose = SWITCH("DIAGNOSE") /* shows each line of JCL before processing. Respond with a non-blank to turn on trace. */ sw.0SaveLog = SWITCH("SAVELOG") 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") REU" 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 */ /* . ----------------------------------------------------------------- */ 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" if helpmsg <> "" then do ; say helpmsg; say ""; end ex_nam = Left(exec_name,8) /* predictable size */ say " "ex_nam" formats JCL to a predetermined standard. The 'standard' " say " is set in subroutine $$JFINIT where can be specified the " say " preferred alignment column for each verb and the preferred" say " continuation column for post-verb data. By default most " say " DD data aligns in column 16 with canonical text in the " say " area to its left with other verbs aligned to center them " say " over the DD verb. " say " " say " $$JFORM is an ISPF EDIT macro. " say " " say " Syntax: "ex_nam" " say " " say " '((' " say " " say " PCOMM specifies the alignment for the parameters for " say " a PROC " say " " say " ICOMM specifies the alignment for ordinary JCL " say " " say " (COMMENTS is a deprecated form of the above. If specified " say " and either PCOMM or ICOMM is not specified, the missing " say " specification will be set from COMMENTS. The default in all " say " cases is 'RIGHT'.) " "NEWSTACK"; pull ; "CLEAR" ; "DELSTACK" say " " say " PCOMM/ICOMM may be " say " " say " -- RIGHT to align the comments flush against column " say " 71, or " say " -- TIGHT to cause them to continue after the JCL " say " with one intervening space, or " say " -- a column-number to align them in that column. " say " " say " If the indicated column causes the realigned JCL " say " to overlay the comment, the comment will be " say " written on a following line. " say " " say " SAVELOG orders the process-log to be written to DASD at " say " task-end. " say " " "NEWSTACK"; pull ; "CLEAR" ; "DELSTACK" 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 arg mode . "QSTACK" /* how many stacks? */ stk2dump = rc - tk_init_stacks /* remaining stacks */ if stk2dump = 0 & queued() = 0 then return if mode <> "QUIET" then, 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. */ if mode <> "QUIET" then, say "Processing Stack #" dd " Total Lines:" queued() do queued();parse pull line;say line;end /* pump to the screen */ "DELSTACK" /* remove stack */ end /* dd = 1 to rc */ return /*@ DUMP_QUEUE */ /* Handle CLIST-form keywords added 20020513 . ----------------------------------------------------------------- */ CLKWD: Procedure expose info /*@ hide all except info */ arg kw kw = kw"(" /* form is 'KEY(DATA)' */ kw_pos = Pos(kw,info) /* find where it is, maybe */ if kw_pos = 0 then return "" /* send back a null, not found*/ rtpt = Pos(") ",info" ",kw_pos) /* locate end-paren */ slug = Substr(info,kw_pos,rtpt-kw_pos+1) /* isolate */ info = Delstr(info,kw_pos,rtpt-kw_pos+1) /* excise */ parse var slug (kw) slug /* drop kw */ slug = Reverse(Substr(Reverse(Strip(slug)),2)) return slug /*@CLKWD */ /* Handle multi-word keys 20020513 . ----------------------------------------------------------------- */ KEYWD: Procedure expose info /*@ hide all vars, except info*/ arg kw /* form is 'KEY DATA' */ 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+Words(kw))/* 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 /* form is 'KEY ;: DATA ;:' */ 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 ssct . /* 'call ss 122 6' maybe */ if ssct = "" then ssct = 10 if \datatype(ssbeg,"W") | \datatype(ssct,"W") then return ssend = ssbeg + ssct do ssii = ssbeg to ssend ; say Strip(sourceline(ssii),'T') ; end return /*@ SS */ /* . ----------------------------------------------------------------- */ SWITCH: Procedure expose info /*@ */ arg kw /* form is 'KEY' */ 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 */ sw.nested = sysvar("SYSNEST") = "YES" sw.batch = sysvar("SYSENV") = "BACK" sw.inispf = sysvar("SYSISPF") = "ACTIVE" 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 . 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 PTINIT )ATTR % TYPE(TEXT) INTENS(HIGH) SKIP(ON) + TYPE(TEXT) INTENS(LOW) SKIP(ON) _ TYPE(INPUT) INTENS(LOW) @ TYPE(TEXT) INTENS(HIGH) COLOR(YELLOW) ! TYPE(INPUT) INTENS(NON) )BODY EXPAND(||) WIDTH(&ZSCREENW) @|-|% Specify Alignment Columns @|-| %COMMAND ===>_ZCMD %SCROLL ===>_ZAMT+ + Preferred Columns for Verb-Alignment: (range: 1-20) DD _z + ELSE _z + ENDIF _z + EXEC _z + IF _z + INCLUDE_z + JCLLIB _z + JOB _z + OUTPUT _z + PEND _z + PROC _z + SET _z + Preferred Columns for Text-Alignment-after-Verb: (range: 1-16) DD _z + ELSE _z + ENDIF _z + EXEC _z + IF _z + INCLUDE_z + JCLLIB _z + JOB _z + OUTPUT _z + PEND _z + PROC _z + SET _z + Press ENTER to complete setting values. Press END to quit. + )INIT .HELP = HLPARMH .ZVARS = '($jfptdd $jfptel $jfpten $jfptex $jfptif $jfptin + $jfptjc $jfptjo $jfptou $jfptpe $jfptpr $jfptse + $jfpldd $jfplel $jfplen $jfplex $jfplif $jfplin + $jfpljc $jfpljo $jfplou $jfplpe $jfplpr $jfplse)' )PROC VER (&$jfptdd,RANGE,1,20) VER (&$jfptel,RANGE,1,20) VER (&$jfpten,RANGE,1,20) VER (&$jfptex,RANGE,1,20) VER (&$jfptif,RANGE,1,20) VER (&$jfptin,RANGE,1,20) VER (&$jfptjc,RANGE,1,20) VER (&$jfptjo,RANGE,1,20) VER (&$jfptou,RANGE,1,20) VER (&$jfptpe,RANGE,1,20) VER (&$jfptpr,RANGE,1,20) VER (&$jfptse,RANGE,1,20) VER (&$jfpldd,RANGE,1,16) VER (&$jfplel,RANGE,1,16) VER (&$jfplen,RANGE,1,16) VER (&$jfplex,RANGE,1,16) VER (&$jfplif,RANGE,1,16) VER (&$jfplin,RANGE,1,16) VER (&$jfpljc,RANGE,1,16) VER (&$jfpljo,RANGE,1,16) VER (&$jfplou,RANGE,1,16) VER (&$jfplpe,RANGE,1,16) VER (&$jfplpr,RANGE,1,16) VER (&$jfplse,RANGE,1,16) )END )))PLIB HLPARMH )ATTR DEFAULT(%{_) % 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(ºº) WIDTH(&ZSCREENW) %TUTORIAL º-º Specify Alignment Columns º-º TUTORIAL %Next Selection ===>_ZCMD { Specify the columns into which each verb will be moved (if possible) and the columns where the text of the remainder of the JCL statement will be aligned. For example: ----+----1----+----2----+----3----+----4----+----5----+----6 //JOBNAME JOB (ACCNT),...., // TYPRUN=SCAN //STEP0001 EXEC PGM=IEFBR14, // TIME=1 //SYSUDATA DD DSN=......, // DISP=SHR ----+----1----+----2----+----3----+----4----+----5----+----6 In this example, 'JOB' is aligned in 12 and the remainder ('(ACCNT)', 'TYPRUN=SCAN') in 16. 'EXEC' may have been requested in 11 but cannot be placed there because of an over-long STEPNAME; it has therefore been pushed to 12. The remainder ('TIME=1') was requested in 16. 'DD' has been aligned in 13, and the remainder in column 16 ('DSN=', 'DISP=SHR') )PROC )END */