CBL_GET_EXIT_INFO

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.

Usage

CALL "CBL_GET_EXIT_INFO" 
    USING EXIT-INFO 
    [RETURNING STATUS-CODE]

Parameters

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.

Description

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:

p-return-code

most recent value of RETURN-CODE

p-rts-error

error number of the most recent runtime error, or zero if none

p-exit-flags

a 32-bit word with flag bits as follows (bit 0 is the least significant bit):

Bit Meaning of "1" in this bit
0 always zero
1 always zero
2 terminated by STOP RUN, CALL PROGRAM, or CHAIN
3 always zero
4 terminated by operator
5 always zero
6-31    reserved; always zero

status-code

the status of the operation as follows:

Value Meaning
0 success
1006    called from outside exit procedure
1009 value of p-block-size is not 16