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


Chapter 3 Tools : RETURN_MESSAGE

RETURN_MESSAGE
Returns the system error message whenever an exception is raised. RETURN_MESSAGE is a low-level tool that must be called immediately after an exception is trapped. (F)
Invocation
string = RETURN_MESSAGE
 
On return, contains the return message. Its syntax is V (variable-length character string) with length 258.
Usage Notes
RETURN_MESSAGE returns the system error message that is set whenever an exception is raised. It is used to obtain the system error message whenever a table access or 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 GETFAIL. Notice the use of the local variable string. This code ensures that RETURN_MESSAGE is called immediately after the exception is trapped.

 
RETURN_MESSAGE_1;
_ LOCAL STRING;
_ ----------------------------------------------------------------------------
_ ----------------------------------------------------------------+-----------
_ GET EMPLOYEE WHERE EMPNO > 90000; | 1
_ ----------------------------------------------------------------------------
_ ON ACCESSFAIL:
_ STRING=RETURN_MESSAGE;
CALL ENDMSG(STRING);

 

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