/* rexx */ /*-------------------------------------------------------------------*/ /* */ /* REXX Exec : CHGLOG */ /* */ /* ***** Edit Macro ***** */ /* */ /* Description : Add change log to a rexx exec */ /* Use the line command "A" to specify where to place */ /* the comments. If no line command is found the box */ /* is placed at the top of the member. */ /* If the Rexx exec has been created by Rexxit or it */ /* contains the string "Change Activity" the box is */ /* positioned immediately following the text */ /* */ /* Created on : 13 Jun 2021 */ /* Created by : Kevin Ferguson */ /* : Userid MIT001 */ /* : Using ABBYDALE.DEVL.EMACS(CHGLOG) */ /* */ /* Called by : Nothing */ /* */ /* Calls : Nothing */ /* */ /* Panels Used : None */ /* */ /* Change Activity : */ /* */ /* ©Copyright of Abbydale Systems LLC. */ /* */ /*-------------------------------------------------------------------*/ Parse Arg Help /* Check for Help */ If SYSVAR("SYSISPF")<>"ACTIVE" then do Say "ISPF must be active to use "CHGLOG exit(16) end Address ISREDIT "MACRO (Help) NOPROCESS" If Help = "?" Then do Call Disp_Help exit(4) end signal on novalue /* un-initialized vars*/ signal on halt /* attention key */ chg = "N" Address ISPEXEC "CONTROL ERRORS RETURN" Address ISREDIT "(CR, CC) = CURSOR" Address ISREDIT "CAPS OFF" Address ISREDIT "PROCESS RANGE A" Address ISREDIT "(RC) = RANGE_CMD" kef = rc Address ISREDIT "(FIRST) = LINENUM .ZFRANGE" if kef = 0 then do /* if first > 1 then do */ num = first signal doit end else do If First > 1 then do num = first end else do fndparm = """Change Activity""" Address ISREDIT "(LEFTON,RIGHTON) = BOUNDS" Address ISREDIT "SCAN OFF" Address ISREDIT "SEEK" fndparm "FIRST" /* find the string */ if rc > 0 then do num = 0 end else do Address ISREDIT "(NUM) = LINENUM .ZCSR" chg = "Y" end end end doit: if first = 0 then num = first blankout='/*'||copies(' ',67)||'*/' lineout ='/*'||copies('-',67)||'*/' headout='/* MM/DD/YYYY ID Comment'||copies(' ',41)||'*/' chgout='/* Change Activity :'||copies(' ',48)||'*/' ulinout='/* '||copies('-',63)||' */' if chg = "N" then do Address ISREDIT "LINE_AFTER "num "= '"lineout"'" Address ISREDIT "LINE_AFTER "num + 1 "= '"blankout"'" Address ISREDIT "LINE_AFTER "num + 2"= '"chgout"'" num = num + 3 end Address ISREDIT "LINE_AFTER "num "= '"blankout"'" Address ISREDIT "LINE_AFTER "num + 1" ='"headout"'" Address ISREDIT "LINE_AFTER "num + 2" ='"ulinout"'" Address ISREDIT "LINE_AFTER "num + 3" ='"blankout"'" Address ISREDIT "LINE_AFTER "num + 4" ='"blankout"'" if chg = "N" then do Address ISREDIT "LINE_AFTER "num + 5"= '"lineout"'" num = num + 1 end /* Address ISREDIT "SAVE" */ return /*-------------------------------------------------------------------*/ /* Disp_Help Procedure */ /*-------------------------------------------------------------------*/ Disp_Help: Procedure say "CHGLOG -" say"" say "Usage: CHGLOG | ?" say"" say" ? - Generates this information." say"" say" Return Codes :" say" 4 - Help displayed" say" 16 - Not under ISPF" say"" Return /*-------------------------------------------------------------------*/ /* End of Disp_Help Procedure */ /*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/ /* Trap NOVALUE Condition */ /*-------------------------------------------------------------------*/ novalue: say "NOVALUE entered from line" sigl say condition("D") say "The instruction is suppressed" address "TSO" "delstack" exit(16) /*-------------------------------------------------------------------*/ /* Trap HALT Condition */ /*-------------------------------------------------------------------*/ halt: say "HALT acknowledged in line" sigl say "Cleanup processing in progress" address "TSO" "delstack" exit(16) /*-------------------------------------------------------------------*/ /* End of CHGLOG */ /*-------------------------------------------------------------------*/