EMS FastStart Manual
Building Your Application for Event Generation
EMS FastStart Manual–133701
6-14
Global Program Modifications
Global Program Modifications
Add the SEARCH Directive
Add the ?SEARCH directive to the user application, specifying the location of EGEN.
The compiler must know where EGEN resides in order to bind it with your application.
Example:
?SEARCH $data.atm.atm1egen
Add New Variables
Add variables for the specific values needed by EGEN. Example of variables added to
the COBOL85 ATM program to support the EGEN interface:
01 cobol-val-true PIC xx value high-values*
01 cobol-val-false PIC xx value low-values*
01 return-code PIC S9(4)
01 file-number PIC 9(4) COMP
01 error-detail PIC 9(4) COMP.
*These need to be moved into the suppress-display field of the egen record to suppress
the display.
Insert Copy Statements
The five copy statements described below must be inserted in the record-definition of the
Data Division in your program. You can also add copy statements to include specific
definitions for your program. Example 6-8 below shows a copy statement.
egen-record The definition of the egen-record as specified in your ACF. It
contains other fields needed by EGEN (for example,
egen-error)
atm-ssid The definition for your SSID.
egen-interfaces-
definitions
Defines constants used to tell EGEN which type of event to
generate and constants used to define all the return codes that
EGEN can return to your application.
user-event-numbers Defines constants used to specify each event generated by
your application (for example, ATM-DOWN).
user-action-id Defines constants used to generate action attention and action
completion events.