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


Chapter 3 Tools : DELETESCREENDATA

DELETESCREENDATA
Deletes all the occurrences from all the screen tables of a screen. (C)
Invocation
CALL DELETESCREENDATA(screen)
 
Example
The rules in this example do the following:
1.
2.
3.
NEW_EMPLOYEE Rule
NEW_EMPLOYEE displays the screen NEW_EMPLOYEE and initializes the function keys:

 
NEW_EMPLOYEE;
_
_ ---------------------------------------------------------------------
_ ------------------------------------------------------------+--------
_ FCNKEY_SPECS.FCNKEYS = FCNKEY_MSG('NEW_EMPLOYEE'); | 1
_ INSERT FCNKEY_SPECS('NEW_EMPLOYEE'); | 2
_ UNTIL EXIT_DISPLAY DISPLAY NEW_EMPLOYEE : | 3
_ CALL PROCESS_FCNKEY('NEW_EMPLOYEE'); |
_ END; |
_ ---------------------------------------------------------------------

 
Rule using DELETESCREENDATA
SAVE_EMP is the rule initiated when Enter is used. It saves the data, clears the screen tables with DELETESCREENDATA, and re-displays the data contained in the function keys screen table:

 
SAVE_EMP;
_
_ ---------------------------------------------------------------------
_ ------------------------------------------------------------+--------
_ GET ADD_EMPLOYEE('NEW_EMPLOYEE'); | 1
_ EMPLOYEE.* = ADD_EMPLOYEE.*; | 2
_ INSERT EMPLOYEE(ADD_EMPLOYEE.REGION); | 3
_ CALL DELETESCREENDATA('NEW_EMPLOYEE'); | 4
_ FCNKEY_SPECS.FCNKEYS = FCNKEY_MSG('NEW_EMPLOYEE'); | 5
_ INSERT FCNKEY_SPECS('NEW_EMPLOYEE'); | 6
_ CALL SCREENMSG('NEW_EMPLOYEE', 'EMPLOYEE ADDED'); | 7
_ ---------------------------------------------------------------------
_ ON INSERTFAIL :
_ CALL SCREENMSG('NEW_EMPLOYEE', 'EMPLOYEE ALREADY EXISTS');
_ ON GETFAIL :
_ CALL SCREENMSG('NEW_EMPLOYEE', 'ENTER DATA');

 

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