ContentsIndexPreviousNext

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 as follows:

Item
Returned value
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	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

Bit 0 is the least significant bit

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