Forces COBSQL to load the stop run module that performs a rollback if the application terminates abnormally
Syntax:
[NO]{CSTOP|CSP}
Properties:
Default:
NOCSTOP
Comments:
This directive is not available on UNIX. However, you can emulate the CSTOP functionality by installing a closedown procedure that performs an EXEC SQL ROLLBACK.
Here is an example of the call to the library routine CBL_EXIT_PROC:
working-storage section.
EXEC SQL INCLUDE SQLCA END-EXEC.
EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 DUMMY PIC x.
EXEC SQL END DECLARE SECTION END-EXEC.
78 func-install value 0.
78 func-deinstall value 1.
78 Initial-Call value 9.
01.
03 install-flag pic x comp-x value Initial-Call.
03 install-params.
05 install-addrs procedure-pointer.
05 install-prrty pic x comp-x value 64.
procedure division.
if install-flag = Initial-Call
set install-addrs to entry "myexitpc"
move func-install to install-flag
call "CBL_EXIT_PROC" using install-flag install-params
end-call
end-if
Comments:
This directive is not available on UNIX. However, you can emulate the CSTOP functionality by installing a closedown procedure that performs an EXEC SQL ROLLBACK. Here is an example of the call to the library routine CBL_EXIT_PROC: