Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 3 Tools : GETENDMSG

GETENDMSG
Returns the current value of the end-of-transaction message. (F)
Invocation
message = GETENDMSG
 
Usage Notes
Each transaction starts with an empty end-of-transaction message.
Example
The set of rules in this example:
1.
2.
3.
Sample Rule 1

 
RULE EDITOR ===> SCROLL: P
DELETE_EMPNO(REGION, EMPNO);
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ EXECUTE VALIDATE_EMP(REGION, EMPNO); | 1
_ CALL VALID_EMPNO(REGION, EMPNO); | 2
_ ---------------------------------------------------------------------------

 
Sample Rule 2

 
RULE EDITOR ===> SCROLL: P
VALIDATE_EMP(REGION, EMPNO);
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ GET EMPLOYEE(REGION) WHERE EMPNO = EMPNO; | 1
_ CALL ENDMSG('YES'); | 2
_ ---------------------------------------------------------------------------
_ ON GETFAIL :
_ CALL ENDMSG('INVALID EMPLOYEE NUMBER');

 
Rule Using GETENDMSG

 
RULE EDITOR ===> SCROLL: P
VALID_EMPNO(REGION, EMPNO);
_
_ ---------------------------------------------------------------------------
_ GETENDMSG = 'YES'; | Y N
_ ------------------------------------------------------------+--------------
_ DELETE EMPLOYEE(REGION) WHERE EMPNO = EMPNO; | 1
_ CALL ENDMSG('THE EMPLOYEE IS DELETED'); | 2
_ ---------------------------------------------------------------------------

 
Executing this rule displays the following screen:

 
                   USR40 TEST: N BROWSE: N 12:48 AM THURSDAY MAR 26 2000
ER edit rule ==> SU MO TU WE TH FR SA
EX execute rule ==> DELETE_EMPNO 1 2 3 4 5 6 7
DB debug rule ==> 8 9 10 11 12 13 14
BR browse table ==> 15 16 17 18 19 20 21
ED edit table ==> 22 23 24 25 26 27 28
29 30 31
OS object set ==>
DS define screen ==>
DR define report ==>
DT define table ==>
DL define library ==>
GR generate rpt ==>
COMMAND ==> __
execute rule: EX DELETE_EMPNO 1
 
 
 
 
PFKEYS: 2=LOGS 3=EXIT 12=EXIT
12:48:55 THE EMPLOYEE IS DELETED

 
The new end of transaction message is printed on the bottom row and the employee is deleted from the employee table.

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved