How To monitor error messages coming back from a command when you are running an RPF:
To monitor error messages coming back from a command when you are running an RPF:
Set TRAP ON before issuing the command. An error will set the trap code (s.tc). See pages 2-12 & 13 of the Advantage CA-Roscoe RPF Language Guide.
TRAP ON : activate facility
SUB : put your command here
TRAP OFF : deactivate
IF (S.TC EQ ) : test trap code
..... : no error
ELSE
WRITE 'error message'
Trap codes are documented on page B-25.
To obtain the message text from an informational message:
SET MSGLEVEL ERROR
When informational messages are suppressed, you can still obtain the text of the message from the S.LASTERR session variable. See page 1-7 of the Roscoe RPF Language Guide.