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
-
param-block
- Group predefined as
cblt-exit-info-params containing
01 cblt-exit-info-params typedef.
03 cblte-gei-size cblt-x4-comp5. *> pic x(4) comp-5 value 16.
03 cblte-gei-return-code cblt-x4-comp5. *> pic x(4) comp-5.
03 cblte-gei-rts-error cblt-x4-comp5. *> pic x(4) comp-5.
03 cblte-gei-exit-flags cblt-x4-comp5. *> pic x(4) comp-5.
-
status-code
- See
Library Routines - Key.
On Entry:
-
cblte-gei-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 0
-
0
|
Not running under Debugger
|
1
|
Running under Debugger
|
- Bit 1
- Escaped from Debugger
- Bit 2
- Terminated due to STOP RUN
- Bit 3
-
0
|
Terminated in COBOL
|
1
|
Terminated in non-COBOL
|
- Bit 4
- Terminated due to the interrupt key being pressed (for example, CTRL+C), or some other similar mechanism for terminating a
program
- Bit 5
- Exit procedure invoked during thread termination
- Bits 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.