EMS FastStart Manual
Building Your Application for Event Generation
EMS FastStart Manual–133701
6-18
Move Values to the Event Record
The application needs to tell EGEN which field in the event buffer is the subject of the
event. This is accomplished in the user's application by moving the name of the selected
field to another field called subject-field-name. At this point, you can move the specific
values into the field that will become the subject.
The following example illustrates the point. An informative event will be generated
which will alert the operations staff that the ATM named SFMAIN01 is now up and
running. Since this event is about this specific ATM, we want the subject of this event to
be SFMAIN01. To accomplish this, we use the field named “atm-name” to contain the
name of the ATM (SFMAIN01) and then we initialize the field called subject-field-name
with the name of the field containing the subject, in this case atm-name. Example 6-14
shows the subject fields from the COBOL85 ATM program.
Move Values to the Event Record
Move the values associated with the specific events into the fields that were defined in
the ACF. In Example 6-15 below, the fields associated with the event #200 (ATM
DOWN) are:
•
Event type
•
Event number
•
ATM name
•
ATM location
•
Event text
The programmer is responsible for determining the values for each field and moving
them into the event record.Example 6-15
shows the ATM COBOL85 example.
Example 6-14. Sample Code Showing Subject Data
MOVE INFORMATIVE-EVENT TO event-type OF egen-record.
MOVE ATM-EVT-UP TO event-number OF egen-record.
MOVE "SFMAIN01" TO atm-name OF egen-record.
MOVE "atm-name" TO subject-field-name OF egen-record.
MOVE "245 A St., San Francisco" TO atm-location OF egen-record.