/* REXX */ /* */ /* AUTHOR: Mark Zelden */ /* */ /* TRACE ?R */ Address ISREDIT "MACRO" /* Address ISPEXEC "CONTROL ERRORS RETURN" */ /* */ /* This edit macro will delete all lines from the */ /* line the cursor is on to the top line. */ /* */ /***********************************************/ /* BEGIN DT PROCESSING */ /***********************************************/ "ISREDIT (row,col) = CURSOR" If row < 2 then do zedsmsg = 'NEED AT LEAST 2 LINES' zedlmsg = 'YOU MUST DELETE AT LEAST 2 LINES IN THE FILE', 'TO EXECUTE THE DT EDIT MACRO.' Address ISPEXEC "SETMSG MSG(ISRZ001)" /* msg - with alarm */ Exit 12 End "ISREDIT LABEL 1 = .FROM" "ISREDIT LABEL " row "= .TO" "DELETE ALL .FROM .TO" /* delete labeled lines */ /***********************************************/ /* END DT PROCESSING */ /***********************************************/ count = row + 0 /* remove leading zeros */ zedsmsg = count 'LINES DELETED' zedlmsg = count 'LINES WERE DELETED FROM THE CURSOR LINE' , 'TO THE TOP LINE.' Address ISPEXEC "SETMSG MSG(ISRZ000)" /* msg - no alarm */ Exit 0