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


Chapter 3 Tools : ENDMSG

ENDMSG
Sets the transaction completion message. (C)
Invocation
CALL ENDMSG(message)
 
A string specifying the new transaction completion message. Its syntax can be C (fixed-length character string), UN (Unicode), V (variable-length character string), or W (double-byte character).
Usage Notes
If the value of message is of syntax UN and it cannot be coerced to syntax V, ENDMSG returns a Unicode literal.
Example
The CHECK_EMP rule checks the EMPLOYEES table for a particular region to see if an employee exists. If the employee does exist, the name, number, position, and city of the employee appear in the end message. If the employee does not exist, the end message informs the user.

 
RULE EDITOR ===> SCROLL: P
CHECK_EMP(REGION, LAST_NAME);
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ GET EMPLOYEES(REGION) WHERE LNAME = LAST_NAME; | 1
_ CALL ENDMSG('NAME: ' || 'EMPLOYEES'.LNAME || | 2
_ ' EMPLOYEE #: ' || EMPLOYEES.EMPNO || ' POSITION: ' || |
_ EMPLOYEES.POSITION || ' CITY: ' || EMPLOYEES.CITY); |
_ ---------------------------------------------------------------------------
_ ON GETFAIL :
_ CALL ENDMSG(LAST_NAME || ' NOT FOUND');

 
Entering the value midwest for REGION and smith for LASTNAME results in the following end message:
NAME: SMITH EMPLOYEE #: 41009 POSITION: TESTER CITY: MILTON
Entering the value midwest for REGION and Takada for LAST_NAME results in :
TAKADA NOT FOUND

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