O PRTFIL
O PAGES# 25
O OPNDAT
OQPRINT E LSTERR 1
O 22 'List data not valid'
OQPRINT E HDRERR 1
O 22 'Unknown Generic Header'
Integrated Language Environment (ILE) APIs—Examples
This section includes the examples in Chapter 4, “Common Information across
APIs—Advanced (ILE) Example.”
Register Exit Point and Add Exit Program—OPM COBOL Example
Refer to “Register Exit Point and Add Exit Program—ILE C Example” on page 4-9
for the original example.
IDENTIFICATION DIVISION.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\
\ Program: Register an Exit Point
\ Add an Exit Program
\
\ Language: OPM COBOL
\
\ Description: This program registers an exit point with the
\ registration facility. After the successful
\ completion of the registration of the exit point,
\ an exit program is added to the exit point.
\
\ APIs Used: QUSRGPT - Register Exit Point
\ QUSADDEP - Add Exit Program
\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
PROGRAM-ID. REGFAC1.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-AS4ðð.
OBJECT-COMPUTER. IBM-AS4ðð.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT LISTING ASSIGN TO PRINTER-QPRINT
ORGANIZATION IS SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD LISTING RECORD CONTAINS 132 CHARACTERS
LABEL RECORDS ARE STANDARD
DATA RECORD IS LIST-LINE.
ð1 LIST-LINE PIC X(132).
WORKING-STORAGE SECTION.
\
\ Keyed Variable Length Record includes
\
COPY QUS OF QSYSINC-QLBLSRC.
Appendix B. Original Examples in Additional Languages B-47