ADDRESS null
SIGNAL ON HALT
SIGNAL ON SYNTAX
SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY')
rxtype.1 = 'ENTRY'
rxflags.1 = 'REPORT'
rxlabel.1 = 'Script to run:|'
rxpos.1 = '-1 5 5 150'
rxval.1 = 'TEXT'
text.1 = ''
rx = ''
CALL RXCREATE('RX', 1, 'Main Window', 'NOCLOSE')
DO FOREVER
CALL RXMSG()
IF rxid == '' THEN SIGNAL HALT
IF rxid == 1 & rxsubid == 1 THEN DO
err = RXRUNSCRIPT(text.1)
IF err == "" THEN DO
IF SYMBOL('RC') == 'VAR' THEN CALL RXSAY(rc, , 'REXX return')
ELSE CALL RXSAY("", , 'No REXX return')
END
END
END
syntax:
CALL RXSAY(CONDITION('D') || '0D0A0D0A'x || SOURCELINE(sigl),,'Error '||condition('E')||' at line '||sigl)
halt:
error:
CALL RXMSG(,'END')
EXIT
|