EMS FastStart Manual
Building Your Application for Event Generation
EMS FastStart Manual–133701
6-9
An Example Using Mode 2
An Example Using Mode 2
After you have selected the operating mode for your application, modify the application 
code accordingly. Example 6-6 shows sample code for using EGEN in mode 2 within a 
COBOL85 program. (For a detailed example refer to Appendix C, COBOL85 Program 
Example.) As shown in Table 6-1, mode 2 requires the following procedures:
•
Initialize^egen^record
•
Open^egen^collector
•
Egen
•
Close^egen^collector
Calling these procedures opens the collector at the beginning of the program and then 
closes it before the end of the program.
Next, look at Table 6-2
 for the parameters to use with the mode 2 EGEN procedure: 
•
egen-record
•
user-file-number
suppress-display ZSPI-DDL-BOOLEAN 
If TRUE, tells the Viewpoint application not to display the event 
message; Viewpoint will display it if the token is either FALSE or 
missing. By default, the value is FALSE, which mean that the event 
will be displayed on Viewpoint. See the EMS Manual, under the 
ZEMS-TKN-SUPPRESS-DISPLAY heading, for more 
information.
subsystem-manager ZSPI-DDL-FNAME32 
This field contains the process name of a particular subsystem 
process. See the DSM programing manual, under the ZSPI-TKN-
MANGER heading for more information.
event-text ZSPI-DDL-CHAR254 
This field contains the displayable text describing the event. If you 
use the DSM templates services, then you do not need to put text 
into this field. See the EMS manual, under the ZEMS-TKN-TEXT 
heading for more information. 
subject-field-name ZSPI-DDL-CHAR24 
This field contains the name of the other field in the egen-record 
which will contains the subject of this event. (Example, Initializing 
subject-field-name with ATM-NAME will cause the subject of this 
event to be the value contained by ATM-NAME (for example, 
“SFMAIN01”).
Table 6-3. Egen-record Fields and Descriptions (page 2 of 2)
Field Name Field Data Type and Description










