EMS FastStart Manual
EMS FastStart Manual–133701
C-1
C
COBOL85 Program Example
This appendix contains the COBOL85 source code file SATMCOB that is located on the
EMS FastStart subvolume after installation:
?HEADING "SATMCOB : COBOL PROGRAM EXAMPLE USING EGEN FOR AN ATM APPLICATION"
?SYMBOLS, INSPECT, SAVEABEND, NOMAP, NOICODE, ERRORS 0
*---------------------------------------------------------------------
*
* File Type: COBOL85 Source File for the ATM example
* Source File Name: SATMCOB
* Program File Produced: OATMCOB
* Generation Time: October 31, 1989 09:42
* Language Compiler Required: COBOL85
* Compiler Version Required: C20
*
* File Description: This program shows an example of how to use the
* EGEN module within a COBOL85 program. This program will use EGEN in
* mode 2, which is the mode that we recommend for the COBOL85 program.
*----------------------------------------------------------------------
* How to use this program example: To use this program example you will
* have to generate a set of EMS FastStart files by using the SATMACF
* file provided with the EMS FastStart product. After a successful
* generation, please modify the following statement to point to the
* volume and subvolume where your EMS FastStart generated files are.
*
* 1-?SEARCH <user-subvolume>.<application-prefix>EGEN
*
* 2-COPY egen-record OF "<user-subvolume>.<application-prefix>COB".
* COPY atm-ssid OF "<user-subvolume>.<application-prefix>COB".
* COPY egen-interface-definitions OF
* "<user-subvolume>.<application-prefix>COB".
*
* 3-COPY atm-event-numbers OF "<user-subvolume>.<application-prefix>COB".
* COPY atm-action-id OF "<user-subvolume>.<application-prefix>COB".
* COPY atm-constant-values OF "<user-subvolume>.<application-prefix>COB".
*----------------------------------------------------------------------
* The ?SEARCH directive tells the compiler to look in the proper object
* file to find the EGEN module and resolve the external references.
*----------------------------------------------------------------------
?SEARCH atm1egen
?HEADING "SATMCOB VARIABLES DECLARATIONS"
/
IDENTIFICATION DIVISION.
PROGRAM-ID. SATMCOB.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 return-code PIC S9(4).
01 file-number PIC 9(4) COMP.
01 user-tag PIC 9(8) COMP.
01 event-buffer-used PIC 9(4) COMP.
01 sync-depth PIC 9(4) COMP.
01 read-count PIC 9(4) COMP.
01 error-detail PIC 9(4) COMP.
?HEADING "COPY LIBRARIES STATEMENT"
/
*----------------------------------------------------------------------
*