/* REXX RX1PERLN Finds REXX source lines which contain more than one semicolon so that they may be split. */ address ISREDIT "MACRO (opts)" parse value 0 with sw. upper opts parse var opts "TRACE" tv . parse value tv "N" with tv . rc = Trace("O"); rc = Trace(tv) sw.0Mon = WordPos( "MONITOR",opts ) > 0 "RESET" "X ALL" PRorLST = "LAST" do forever "SEEK ';'" PRorLST /* locate last semicolon */ if rc > 0 then leave /* didn't find one */ PRorLST = "PREV" "(txt) = LINE .zcsr" /* acquire line */ if sw.0mon then say txt pt = LastPos( ';',txt ) if Left( txt,1 ) <> '' then indent = 0 else, indent = Verify( txt,' ' ) - 1 parse var txt front =(pt) back back = Strip( back,'L',';' ) /* nip semicolon off */ rc = Trace("O"); rc = Trace(tv) "LINE .zcsr = (front) " "XSTATUS .zcsr = NX" back = Copies( ' ',indent )Strip( back ) "LINE_AFTER .zcsr = (back) " end /* forever */ "F ' ' FIRST NX" /* position to top */ exit 1 /*@ RX1PERLN */