CBL_GET_EXIT_INFO provides an exit procedure with certain information about the termination that invoked it. It is included mainly for compatibility with other COBOL implementations.
CALL "CBL_GET_EXIT_INFO" USING EXIT-INFO [RETURNING STATUS-CODE]
|EXIT-INFO Group item.|| Group item containing four elementary data items laid out as follows:
exit-info. p-block-size PIC X(4) COMP-N VALUE 16. p-return-code PIC X(4) COMP-N. p-rts-error PIC X(4) COMP-N. p-exit-flags PIC X(4) COMP-N.
|STATUS-CODE Any numeric data item.||Return status of the operation.|
Termination information is returned in the last three items of exit-info and in status-code. The items returned and their values are as follows:
most recent value of RETURN-CODE
error number of the most recent runtime error, or zero if none
a 32-bit word with flag bits as follows (bit 0 is the least significant bit):
|Bit||Meaning of "1" in this bit|
|2||terminated by STOP RUN, CALL PROGRAM, or CHAIN|
|4||terminated by operator|
|6-31||reserved; always zero|
the status of the operation as follows:
|1006||called from outside exit procedure|
|1009||value of p-block-size is not 16|