Managing Error and Informational Messages in an RPF
search cancel

Managing Error and Informational Messages in an RPF

book

Article ID: 55411

calendar_today

Updated On:

Products

Roscoe

Issue/Introduction

How To monitor error messages coming back from a command when you are running an RPF:

Environment

Release:
Component: ROSCOE

Resolution

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.