/**rexx************************************************************** --------- do not install on TSO -------- --------- only install on SPF/PC or SPF2 ------ FLIP Author: David McRitchie, created 1993/10/27 IS03 "The REXX Macros Toolbox" -- F. David McRitchie created 1993/10/27 16:30 IS03 from NXNX clist ******************************************************************* Title: FLIP -- reverse X/NX status of lines Users: SPF/PC only as FLIP is and ISPF editor command Author: David McRitchie, "The REXX Macros Toolbox" 1993/10/27 This clist is universally available with the stipulation that that the original author remains credited and that no charge or licensing fee accrues to any party. EXAMPLE: FLIP FLIP .zfirst .last --DEFAULTS Documented: IS03.SHARE.TEXT(FLIP) OPTIONS: LABEL RANGE or CC-range USAGE: reverse x/nx status of lines ================================================================ **/ /*********************************************************************/ address 'ISREDIT'; 'MACRO (PARMS) NOPROCESS'; label=''; Labf=''; Labl=''; Remainder=''; Zedlmsg='' Zedsmsg=''; /* Collect Parameters */ parms = translate(parms) do iii = 1 to 10; token = word(parms,iii) if token = '' Then leave tokenx = translate(token); if substr(token,1,1) = '.' Then do if labf = '' Then labf = token else if labl = '' Then labl = token else do zedsmsg = '.LABEL RC=8' zedlmsg = 'too many labels --' Labf labl token /*Address*/ "ISPEXEC" "SETMSG MSG(ISRZ000)" exit 8 end iterate iii end remainder = remainder token end iii if remainder <> "" Then do zedsmsg = Remainder zedlmsg = remainder "-- Labels are only FLIP parameters" /*Address*/ "ISPEXEC" "SETMSG MSG(ISRZ000)" Exit 8 end if labl = '' Then do "PROCESS RANGE C" if RC = 0 THEN DO "LABEL .zfrange = .labf 1" "LABEL .zlrange = .labl 1" labf = ".labf" LABL = ".labl" end end if labl = '' Then do; labf='.ZFIRST'; labl='.ZLAST'; end; "(LABFNO) = LINENUM" LABF "(LABLNO) = LINENUM" LABL /* code here similar to NXNX FLIP coding*/ do i = labfno to lablno "(VAR075) = XSTATUS" i if VAR075 = "NX" then "XSTATUS" i "= X" else "XSTATUS" i "= NX" end zedsmsg = 'Completed' zedlmsg = "FLIP" parms "-- Completed", " -- simulates TSO ispf editor command" /*Address*/ "ISPEXEC" "SETMSG MSG(ISRZ000)"