CBL_GET_EXIT_INFO

Enables an application to determine under what circumstances an exit procedure has been invoked.

Syntax:
call "CBL_GET_EXIT_INFO" using     param-block
                         returning status-code
Parameters:
Using call prototype (see Library Routines - Key) Picture (32-bit systems)
param-block Group predefined as cblt-get-exit-info containing: Group containing:
  cblte-gei-block-size   cblt-x4-comp5   pic x(4) comp-5 value 16.
  cblte-gei-return-code   cblt-x4-comp5   pic x(4) comp-5.
  cblte-gei-rts-error   cblt-x4-comp5   pic x(4) comp-5.
  cblte-gei-exit-flags   cblt-x4-comp5   pic x(4) comp-5.
status-code See Library Routines - Key.
On Entry:
cblte-gei-block-size The size of parameter block including this field (must be set to 16).
On Exit:
cblte-gei-return-code Current value of RETURN-CODE.
cblte-gei-rts-error Error number of the run-time system error that caused termination (zero if none).
cblte-gei-exit-flags A 32-bit word providing additional termination information:
Bit Meaning
0
0 Not running under Animator
1 Running under Animator
1 Escaped from Animator
2 Terminated due to STOP RUN
3
0 Terminated in COBOL
1 Terminated in non-COBOL
4 Terminated due to the interrupt key being pressed (for example, CTRL+C), or some other similar mechanism for terminating a program
5 Exit procedure invoked during thread termination
6-31 Reserved for future use - set to 0
status-code
0 Success.
1006 API called from outside of exit procedure.
1009 Invalid parameter passed to API.
Comments:

This routine must only be called from within an exit procedure that has been installed using CBL_EXIT_PROC.

A typical use of this routine would be in database applications which need to be able to determine under what circumstances an exit procedure has been invoked. Database applications would typically need to be able to determine whether the exit procedure had been invoked due to a normal or abnormal run-time system termination. This routine would enable them to decide whether to commit or rollback.

See Also: