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


Chapter 3 Tools : CONFIRMACTION

CONFIRMACTION
Issues a confirmation message for a PF key action or for a specified command. (C)
Invocation
CALL CONFIRMACTION(screen, confirmmsg, key, defaultmsg, table, commandfield)
 
Usage Notes
Text is concatenated to confirmmsg telling the user how to confirm the action.

Exceptions
 
Example
The rules in this example do the following:
1.
2.
3.
4.
DELETE_EMPLOYEE Rule
DELETE_EMPLOYEE displays the screen DELETE_EMPLOYEE and initializes the function keys:

 
RULE EDITOR ===> SCROLL: P
DELETE_EMPLOYEE;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ FCNKEY_SPECS.FCNKEYS = FCNKEY_MSG('DELETE_EMPLOYEE'); | 1
_ INSERT FCNKEY_SPECS('DELETE_EMPLOYEE'); | 2
_ UNTIL EXIT_DISPLAY DISPLAY DELETE_EMPLOYEE : | 3
_ CALL PROCESS_FCNKEY('DELETE_EMPLOYEE'); |
_ END; |
_ ---------------------------------------------------------------------------

 
DEL_EMP_1 Rule
DEL_EMP_1 is the rule initiated when you press PF22. It gets the requested occurrence, prompts for confirmation with CONFIRMACTION and deletes the occurrence if confirmation is given:

 
RULE EDITOR ===> SCROLL: P
DEL_EMP_1;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ GET EMPLOYEE_INFO('DELETE_EMPLOYEE'); | 1
_ GET EMPLOYEES(EMPLOYEE_INFO.REGION) WHERE EMPNO = | 2
_ EMPLOYEE_INFO.EMPNO; |
_ CALL CONFIRMACTION('DELETE_EMPLOYEE', | 3
_ 'ABOUT TO DELETE EMPLOYEE ' || EMPLOYEE_INFO.EMPNO, |
_ 'OK', '', '', ''); |
_ DELETE EMPLOYEE(EMPLOYEE_INFO.REGION); | 4
_ CALL SCREENMSG('DELETE_EMPLOYEE', | 5
_ 'Deleted employee with no.: ' || EMPLOYEE_INFO.EMPNO || |
_ '.'); |
_ ---------------------------------------------------------------------------
_ ON ACTION_CANCELLED :
_ CALL SCREENMSG('DELETE_EMPLOYEE', 'Deletion cancelled');
_ ON GETFAIL :
_ CALL SCREENMSG('DELETE_EMPLOYEE',
_ 'Employee does not exist, re-enter a valid employee number');

 

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