/* REXX Edit macro to prefix a label (and all of its referents) with an identifier specified by the caller. The specified prefix will be prepended with an underscore character thus: @LBLID AA results in AA_Initialize: */ address ISREDIT "MACRO ( opts )" upper opts parse source sys_id how_invokt exec_name DD_nm DS_nm, as_invokt cmd_env addr_spc usr_tokn parse var opts parms "((" opts opts = Strip( opts,"T",'5d'x ) /* yes we want no bananas */ parse upper var opts "TRACE" tv parse value tv 'N' with tv . rc = Trace( 'O' ) ; rc = Trace( tv ) parse var parms pfx case . if pfx = '?' | pfx = '' then call HELP /* -*/ address ISPEXEC "VGET (@@TCASE)" @@TCASE = Word( case @@TCASE "CAPS",1 ) /* Case specification is ( in order of preference:) 1. specified at invocation 2. used for last run 3. CAPS */ address ISPEXEC "VPUT (@@TCASE)" /* store it away */ if @@TCASE = "ASIS" then ##TCASE = "CAPS OFF" else ##TCASE = @@TCASE parse upper var pfx pfx /* shift to uppercase */ "(data) = LINE .zcsr" parse var data word1 ":" . word1 = Strip( word1 ) tgt = pfx"_"word1 (##TCASE) "C ALL NX " word1 tgt "CAPS OFF" exit /* . ----------------------------------------------------------------- */ HELP: /*@ */ address TSO;"CLEAR" ex_nam = Left( exec_name,8 ) /* predictable size */ say " " say " " say " "ex_nam" Add a label prefix to the selected label. Type '"ex_nam" " say " pref' on the command line, position the cursor to the " say " label to be changed, and press ENTER. " say " " say " Syntax: "ex_nam" pref " say " ASIS/CAPS " say " " say " pref the prefix to be added. " say " " say " ASIS/CAPS is optional and defaults to 'CAPS'. " say " " "NEWSTACK"; pull ; "CLEAR" ; "DELSTACK" say " Debugging tools provided include: " say " " say " TRACE tv: will use value following TRACE to place the execution " say " into 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" (( trace ?r " if sysvar( "SYSISPF" ) = "ACTIVE" then, mmdress ISPEXEC "CONTROL DISPLAY REFRESH" exit /*@ HELP */