IDENTIFICATION DIVISION.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

\

 

 

\ Program:

Register an

Exit Point

\

Add an Exit

Program

\

 

 

\Language: ILE 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: QusRegisterExitPoint - Register Exit Point

\

QusAddExitProgram - 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.

\Error Code parameter include. As this sample program

\uses COPY to include the error code structure, only the fi￿rst

\16 bytes of the error code structure are available. If the

\application program needs to access the variable length￿

\exception data for the error, the developer should physic￿ally

\copy the QSYSINC include and modify the copied include to￿

\define additional storage for the exception data.

\

COPY QUSEC OF QSYSINC-QLBLSRC.

\

\Error message text

ð1 BAD-REG.

ð5

TEXT1

PIC

X(39)

 

 

 

VALUE "Attempt

to register exit point failed: ".

ð5

EXCEPTION-ID PIC

X(ð7).

ð1 BAD-ADD.

Appendix B. Original Examples in Additional BLanguages-51

Page 329
Image 329
IBM Version 4 manual Identification Division, TEXT1 PIC