/* 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 bottom line. */ /* */ /***********************************************/ /* BEGIN DB PROCESSING */ /***********************************************/ "ISREDIT (row,col) = CURSOR" "(lastln) = LINENUM .ZLAST" /* last data line */ If row = lastln then do zedsmsg = 'NEED AT LEAST 2 LINES' zedlmsg = 'YOU MUST DELETE AT LEAST 2 LINES IN THE FILE', 'TO EXECUTE THE DB EDIT MACRO.' Address ISPEXEC "SETMSG MSG(ISRZ001)" /* msg - with alarm */ Exit 12 End "ISREDIT LABEL " row "= .FROM" "ISREDIT LABEL " lastln "= .TO" "DELETE ALL .FROM .TO" /* delete labeled lines */ /***********************************************/ /* END DB PROCESSING */ /***********************************************/ count = lastln - row + 1 zedsmsg = count 'LINES DELETED' zedlmsg = count 'LINES WERE DELETED FROM THE CURSOR LINE' , 'TO THE BOTTOM LINE.' Address ISPEXEC "SETMSG MSG(ISRZ000)" /* msg - no alarm */ Exit 0