/* REXX DENUM removes numbering from the source section of a PL/I compiler listing. Written by Frank Clarke rexxhead@yahoo.com 20240525 Impact Analysis . SYSEXEC SEGMENT returns line numbers of various sections Modification History 20240527 fxc fix I/A section; reconfigure; */ arg argline address ISREDIT "MACRO (opts)" if rc > 0 then opts = argline parse source . . exec_name . call A_INIT /* -*/ rc = Trace("O"); rc = Trace(tv) if WordPos( '?',opts ) > 0 then call HELP /* -*/ "SEGMENT LABELS " /* gen LBLLIST */ address ISPEXEC "VGET LBLLIST " parse var lbllist . ".SRC" srcstart . srcend . srcstart = srcstart + 0 srcend = srcend + 0 "F P'^' FIRST" /* first non-blank */ "(text) = LINE .zcsr" if Left(text,5) = "15655" then, /* Enterprise */ seqpt = 105 /* Where's the sequence #? */ else, if Left(text,5) = "15668" then, /* Optimizer */ seqpt = 90 /* Where's the sequence #? */ else, do /* Unknown */ zerrhm = "ISR00001" zerralrm = "YES" zerrsm = "Unknown compiler" zerrlm = "The header information on this listing cannot be ", "mapped to a recognized compiler." address ISPEXEC "SETMSG MSG(ISRZ002)" return /* halt processing */ end /* Unknown */ call S_SKINNY /* excise line numbers -*/ if sw.batch then address ISREDIT "END" exit 1 /*@ DENUM */ /* . ----------------------------------------------------------------- */ A_INIT: /*@ */ address ISREDIT upper opts origopts = opts /* save original */ if Wordpos("TRACE",opts) > 0 then do parse var opts front "TRACE" tv back opts = front back end else tv = "N" sw.batch = sysvar("SYSENV") = "BACK" return /*@ A_INIT */ /* Excise line numbers . ----------------------------------------------------------------- */ S_SKINNY: /*@ */ address ISREDIT "X ALL " do exx = srcstart to srcend /* for every line */ "(txt) = LINE" exx /* acquire the text */ seq = Substr( txt,seqpt,8 ) /* snapshot sequence # */ if Datatype( seq,'W' ) then do /* is it a real number? */ txt = Overlay( ' ',txt,seqpt,8 ) /* blank it out */ "LINE" exx "= (txt) " /* and replace it */ "XSTATUS" exx "= NX " /* un-exclude */ end /* seq */ end /* exx */ return /*@ S_SKINNY */ /* . ----------------------------------------------------------------- */ HELP: /*@ */ address TSO;"CLEAR" ; say "" parse source sys_id how_invokt exec_name . say ex_nam = Left(exec_name,8) /* predictable size */ say " "ex_nam" (edit macro) spins a PL/1 compiler listing and removes the" say " source sequence numbers ahead of a PLIXREF operation. " say " This makes the notations inserted by PLIXREF stand out. " say " " say " Syntax: "ex_nam" (no parms) " say " " "NEWSTACK"; pull; "CLEAR"; "DELSTACK" say " " say " Debugging tools provided include: " say " " say " TRACE tv: will use value following TRACE to place the execution in" say " REXX TRACE Mode. " say " " say " " say " Debugging tools can be accessed in the following manner: " say " " say " " ex_nam " debug-options " say " " say " For example: " say " " say " " ex_nam " (( trace ?r " if sysvar("SYSISPF") = "ACTIVE" then, address ISPEXEC "CONTROL DISPLAY REFRESH" exit /*@ HELP */