Managing Error and Informational Messages in an RPF

Document ID : KB000055411
Last Modified Date : 14/02/2018
Show Technical Document Details

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 ( 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
   WRITE 'error message'

Trap codes are documented on page B-25.

To obtain the message text from an informational message:


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.