Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

5.3.4 Event Procedures Associated with Controls

Event procedures associated with controls are treated as internal programs. Consequently, the data controls that are defined in the DATA DIVISION of a control's event procedure are applicable only within that procedure.

Internal event data cannot be referenced by other event procedures. If you need to share data or retain data states between individual event procedures, the data items should be defined as GLOBAL and placed in the form's WORKING-STORAGE SECTION.

If you wish to share data across forms and/or modules, the data items must be defined identically in each form or module's WORKING STORAGE SECTION with the IS EXTERNAL clause added.

You may use the IS GLOBAL or IS EXTERNAL clause with FD's in a Form's DATA DIVISION FILE section to allow data files to be referenced globally or externally as well.