IBM Version 4 manual Move 16 to BYTES-PROVIDED of QUS-EC

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 365
Image 365

MOVE 16 TO BYTES-PROVIDED OF QUS-EC.

\

\Call the API to remove the exit program.

CALL "QUSRMVEP" USING EXIT-POINT-NAME, FORMAT-NAME,

PGM-NBR, QUS-EC.

\

\If an exception occurs, the API returns the exception in t￿he

\error code parameter. The bytes available field is set to

\zero if no exception occurs and greater than zero if an

\exception does occur.

\

IF BYTES-AVAILABLE OF QUS-EC > ð

OPEN OUTPUT LISTING,

MOVE EXCEPTION-ID OF QUS-EC

TO EXCEPTION-ID OF BAD-EXIT-POINT, WRITE LIST-LINE FROM BAD-EXIT-POINT, STOP RUN.

\

\If the call to remove the exit program is successful,

\deregister the exit point.

\

\Call the API to deregister the exit point.

CALL "QUSDRGPT" USING EXIT-POINT-NAME, FORMAT-NAME, QUS-EC.

\If an exception occurs, the API returns the exception in t￿he

\error code parameter. The bytes available field is set to

\zero if no exception occurs and greater than zero if an

\exception does occur.

\

IF BYTES-AVAILABLE OF QUS-EC > ð

OPEN OUTPUT LISTING,

MOVE EXCEPTION-ID OF QUS-EC

TO EXCEPTION-ID OF BAD-EXIT-PGM, WRITE LIST-LINE FROM BAD-EXIT-PGM, STOP RUN.

\

STOP RUN.

\

\End of MAINLINE

Remove Exit Program and

Deregister

Exit

Point—ILE

COBOL Example

Refer

to “Remove

Exit

Program

and Deregister Exit Point—ILE C Example”

page 4-19 for the original example.

IDENTIFICATION DIVISION.

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

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

\

 

\ Program:

Remove an Exit Program

\

Deregister an Exit Point

\

 

\Language: ILE COBOL

\Description: This program removes an exit program and

Appendix B. Original Examples in Additional BLanguages-87

Page 365
Image 365
IBM Version 4 manual Move 16 to BYTES-PROVIDED of QUS-EC, Call Qusdrgpt Using EXIT-POINT-NAME, FORMAT-NAME, QUS-EC