EMS FastStart Manual
COBOL85 Program Example
EMS FastStart Manual–133701
C-4
 ENTER TAL "Egen" USING egen-record, file-number
 GIVING return-code.
 IF return-code NOT = ZERO
 PERFORM 400-validate-return-code.
?HEADING "230-ATM-LOW-ON-CASH SECTION"
/
 230-atm-low-on-cash.
*--------------------------------------------------------------------------
* EVENT # 100: ATM IS LOW ON CASH.
*
* The fields within the egen-record which are used for event # 100:
*
* event-type PIC S9(4).
* event-number NATIVE-2.
* atm-name PIC X(8).
* atm-location PIC X(24).
*--------------------------------------------------------------------------
 PERFORM 300-initialize-egen-record.
 MOVE ACTION-ATTENTION-EVENT TO event-type OF egen-record.
 MOVE ATM-ACTION-ID-1 TO action-id OF egen-record.
 MOVE ATM-EVT-LOW-ON-CASH TO event-number OF egen-record.
 MOVE "SFMAIN02" 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.
 ENTER TAL "Egen" USING egen-record, file-number
 GIVING return-code.
 IF return-code NOT = ZERO
 PERFORM 400-validate-return-code.
?HEADING "240-ATM-DOWN SECTION"
/
 240-atm-down.
*--------------------------------------------------------------------------
* EVENT # 200: ATM IS DOWN.
*
* the fields within the egen-record which are used for event # 200:
*
* event-type PIC S9(4).
* event-number NATIVE-2.
* atm-name PIC X(8).
* atm-location PIC X(24).
*--------------------------------------------------------------------------
 PERFORM 300-initialize-egen-record.
 MOVE CRITICAL-EVENT TO event-type OF egen-record.
 MOVE ATM-EVT-DOWN TO event-number OF egen-record.
 MOVE "LACENT99" TO atm-name OF egen-record.
 MOVE "atm-name" TO subject-field-name OF egen-record.
 MOVE "320 Main St. Los Angeles" TO atm-location OF egen-record.
 ENTER TAL "Egen" USING egen-record, file-number
 GIVING return-code.
 IF return-code NOT = ZERO
 PERFORM 400-validate-return-code.
?HEADING "250-ATM-SECURITY SECTION"
/
 250-atm-security.
*--------------------------------------------------------------------------










