/* REXX Edit macro to change a label prefix (and all of its referents) to one specified by the caller. Usage: @NEWPREF DC put cursor on label-line to be chgd to DC */ address ISREDIT "MACRO ( opts )" parse source sys_id how_invokt exec_name DD_nm DS_nm, as_invokt cmd_env addr_spc usr_tokn upper opts parse var opts parms '((' opts opts = Strip( opts,"T",'5d'x ) /* yes we want no bananas */ parse var opts 'TRACE' tv . parse value tv 'N' with tv . rc = Trace( 'O' ); rc = Trace( tv ) parse var parms newpref case . if newpref = '?' | newpref = '' 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 newpref newpref /* shift to uppercase */ "(data) = LINE .zcsr" parse var data word1 ":" . word1 = Strip( word1 ) parse var word1 oldpref "_" oldlbl tgt = newpref"_"oldlbl (##TCASE) "C ALL NX " word1 tgt "CAPS OFF" exit /*@ NEWPREF */ /* . ----------------------------------------------------------------- */ HELP: /*@ */ address TSO;"CLEAR" ex_nam = Left( exec_name,8 ) /* predictable size */ say " " say " "ex_nam" assigns a new label prefix for the label at the cursor " say " line. " say " " say " Syntax: "ex_nam" newpref " say " CAPS | ASIS " say " " say " newpref the new prefix to be assigned to this label. Type " say " '@NEWPREF pref' on the command line, place the " say " cursor on the line containing the label to be " say " adjusted, and press ENTER. The selected label and " say " all references to it will be changed to have the " say " prefix specified. " say " " say " CAPS/ASIS defaults to CAPS. " say " " "NEWSTACK"; pull ; "CLEAR" ; "DELSTACK" say " " 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, address ISPEXEC "CONTROL DISPLAY REFRESH" exit /*@ HELP */