EMS FastStart Manual
EMS FastStart Manual–133701
6-1
6
Building Your Application for Event 
Generation
To use EMSFS, you must modify your application to use the EGEN module generated 
by EMS FastStart. These modifications will enable you to generate the event messages 
needed for your application. This section includes information on defining, modifying, 
and compiling an application (EGEN Operating Modes). It details the specific steps a 
programmer must take to use EGEN with a specific application and shows how to use 
EGEN with a COBOL85 program (Mode 1
). For a description of TAL and C examples 
using EGEN, see the ATM example in the EMS FastStart Distribution subvolume.
How EGEN Works
EGEN is the TAL module which links the application process and the EMS system. 
Your application interfaces with EGEN by moving values to the event record structure 
(called egen-record in this section) defined by the ACF. The ENTER TAL constructs 
pass these parameters to EGEN. EGEN then generates the tokenized event by 
performing a WRITE-READ of the event buffer to the collector $0 or to an alternate 
location. 
EGEN Operating Modes
EGEN is designed to be used by a number of different application types such as 
COBOL85 batch programs, COBOL85, C or TAL servers, or multi-threaded TAL 
programs. Each type of application has specific requirements (for example, a simple 
interface or full control of all I/O operations) which can be addressed by choosing one of 
the four operating modes supported by EGEN. Before any modifications can be made, 
you must select the correct EGEN operating mode. Each mode has a pre-defined set of 
procedures and parameters provided within the EGEN module. Table 6-1
 and Table 6-2 
summarize the procedures and parameters required for each mode of operation. 
Mode 1
This is the simplest operating mode and is used mainly by COBOL85 applications. In 
mode 1, EGEN sends approximately three messages to the collector for each event 
generated. Each of the other operating modes sends only one message per event. 
Because of the heavy use of CPU resources, it is recommended that mode 1 be used only 
by applications which generate few events.
For each event generated, EGEN opens the defined collector, writes the event, completes 
the write operation and then closes the defined collector.










