Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : RETURN_SYSMSG

RETURN_SYSMSG
Returns the last $SYSCALL system error message when an exception is raised. RETURN_SYSMSG is a low-level tool that must be called immediately after an exception is trapped. (F)
Invocation
string = RETURN_SYSMSG
 
On return, contains the return message. Its syntax is V (variable-length character string) with length 128.
Usage Notes
RETURN_SYSMSG returns the last $SYSCALL system error message that is set when an exception is raised. It is used to obtain the system error message when a routine raises an exception. A routine is a low-level shareable tool that is not written in the rules language.
Example
The following rule returns the system message from the system exception ROUTINEFAIL. Notice the use of the local variable string. This code ensures that RETURN_SYSMSG is called immediately after the exception is trapped.

 
RETURN_MESSAGE_1;
_ LOCAL STRING;
_ ----------------------------------------------------------------------------
_ ----------------------------------------------------------------+-----------
_ CALL $LISTPDS(PDS, PDSBUFF, MEMBER); | 1
_ ----------------------------------------------------------------------------
_ ON ROUTINEFAIL:
_ STRING=RETURN_SYSMSG;
CALL ENDMSG(STRING);

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved