Error codes associated with transaction management are stored in a special register called TRANSACTION-STATUS. These codes tell you the status of the last transaction and are documented in Appendix E.4. Transaction management errors fall into two categories:
A subcategory of these errors are intermediate runtime errors that call installed error procedures. They are:
where the # signs are replaced at run time by error names, numbers, or other information. See Appendix I. Library Routines for detailed discussion of the error and exit procedures.
The TRANSACTION-STATUS variable has the same format as a file's status variable. It is automatically created by the compiler, and is implicitly shared by all programs of a run unit. TRANSACTION-STATUS is a reserved word.
You can specify procedures for transaction error handling with the USE statement and the reserved word TRANSACTION. The syntax is:
USE AFTER STANDARD {EXCEPTION} PROCEDURE ON TRANSACTION {ERROR }
If TRANSACTION is specified, the procedure executes when an error occurs during a START TRANSACTION, COMMIT, ROLLBACK, or call to C$RECOVER.
A transaction error 10 is returned by a START TRANSACTION statement when the LOG-FILE configuration variable (that specifies the default log file) is undefined. The COBOL program may choose to ignore this error in the cases where the filename-LOG variables are used.