/* rexx */ /*-------------------------------------------------------------------*/ /* */ /* REXX Exec : STARTMAC */ /* */ /* ***** Edit Macro ***** */ /* */ /* Description : Build a boilerplate for an assembler DSECT */ /* */ /* Created on : 30 Mar 2022 */ /* Created by : Wendy Miller */ /* : Userid MIT002 */ /* : Using ABBYDALE.DEVL.REXX(STARTMAC) */ /* */ /* Called by : ** Edit Macro ** */ /* */ /* 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 "STARTMAC exit(16) end Address ISREDIT "MACRO (Help) PROCESS" If Help = "?" Then do Call Disp_Help exit(4) end Address ISREDIT "(MEMBER) = MEMBER" Address ISREDIT "Profile unlock" Address ISREDIT '(LASTLINE) = LINENUM .ZLAST' if lastline > 0 then do Address ISREDIT "(LINE) = LINE 1" end Address ISREDIT "HILITE ASM" Address ISREDIT "Profile lock" Address ISREDIT "CAPS OFF" Address ISREDIT "RESET" uline = translate(LINE) s = userid() ascb = storage(224,4) /* psaaold */ asxb = storage(d2x(c2d(ascb)+108),4) /* ascbasxb */ acee = storage(d2x(c2d(asxb)+200),4) /* acee */ unam = storage(d2x(c2d(acee)+100),4) /* aceeunam */ name=strip(storage(d2x(c2d(unam)+1),20)) /* Get name */ row = 0 padmem = "" xmem = "" exitmem = "END OF "||member do i = 1 to length(member) padmem = padmem||substr(member,i,1)||' ' end do i = 1 to length(exitmem) xmem = xmem||substr(exitmem,i,1)||' ' end mem = left(member,8,' ') mline = mem 'DSECT' call putcode tline = '-' fill = '-' call putline fill = ' ' tline = padmem call putline tline = '-' fill = '-' call putline tline = ' ' fill = ' ' call putline tline = 'Description :' call putleft tline = ' ' call putline tline = 'Created on : 'date() call putleft tline = 'Created by : 'name call putleft tline = ' : Userid('s')' call putleft tline = ' ' fill = ' ' call putline tline = ' Used by :' call putleft tline = ' ' call putline tline = ' Change Activity :' call putleft tline = ' ' fill = ' ' call putline tline = '-' fill = '-' call putline fill = ' ' tline = '©Copyright of Abbydale Systems LLC.' call putline fill = '-' tline = '-' call putline mline = ' PUSH PRINT' call putcode mline = ' PRINT ON' call putcode Address ISREDIT '(LASTLINE) = LINENUM .ZLAST' row = lastline mline = member||'_End EQU *' call putcode mline = member||'_Length EQU '||member||'_End-'member call putcode mline = ' POP PRINT' call putcode tline = '-' fill = '-' call putline fill = ' ' tline = xmem call putline tline = '-' fill = '-' call putline signal on novalue /* un-initialized vars*/ signal on halt /* attention key */ return putline: mline = '*'CENTER(tline,69,fill)'*' Address ISREDIT "LINE_AFTER "row "= '"mline"'" row = row + 1 return putleft: mline = '* 'LEFT(tline,67,fill)'*' putcode: Address ISREDIT "LINE_AFTER "row "= DATALINE (mline)" row = row + 1 return /*-------------------------------------------------------------------*/ /* Disp_Help Procedure */ /*-------------------------------------------------------------------*/ Disp_Help: Procedure say "STARTMAC - This EDIT MACRO will add a boilerplate for an" say " assembler DSECT. If the member being edited has" say " data in it the boilerplate is wrapped around it." say " Your data will not be lost." say"" say " The DSECT will have the same name as the member being" say " edited. It will generate a length for DSECT by naming" say " an equate member_End and name the length value as" say " member_Length." say"" say "Usage: STARTMAC | ?" 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 STARTMAC */ /*-------------------------------------------------------------------*/