/* REPEAT NX LINES -- BEFORE/AFTER original NX line -- REXX*/ /* The default is to repeat the line AFTER the original line */ /* The INFOLINE will always be inserted between the orig. and newline*/ /* created 1989/03/13 by David McRitchie, "The REXX Macros Toolbox" */ /* converted to rexx 1994/03/09 F. David McRitchie, and add label range*/ address "ISREDIT";"macro (mac)" parse var mac beg1'.'range1'.'range2' 'beg2 if range2 \= "" then range = '.'range1 '.'range2 else range = '.zfirst .zlast' mac = translate(strip(beg1||beg2)) If mac = "BEFORE" then Do last = "first" after = "before" before = "after" prev = "next" end Else Do last = "LAST" after = "after" before = "before" prev = "prev" end "seek" last range "nx 1 p'='" If rc \= 0 then return 1 Do forever "(ln1) = line .zcsr" commandx = """line_"after" .zcsr = dataline (ln1)""" interpret commandx commandx = """line_"after" .zcsr = infoline (ln1)""" interpret commandx "x all .zcsr .zcsr" "seek" prev range "nx 1 p'='" If rc \= 0 then leave end