TXROLLBACK-roll back a transaction
DATA DIVISION.
* Include TX definitions.
01TX-RETURN-STATUS.
COPY TXSTATUS.
PROCEDURE DIVISION.
CALL "TXROLLBACK" USINGTX-RETURN-STATUS.
TXROLLBACK is used to roll back the work of the transaction active in the caller's thread of control.
If the transaction_control characteristic (see TXSETTRANCTL()) is TX-UNCHAINED, then when TXROLLBACK returns, the caller is no longer in transaction mode. However, if the transaction_control characteristic is TX-CHAINED, then when TXROLLBACK returns, the caller remains in transaction mode on behalf of a new transaction (see the RETURN VALUE and ERRORS sections below).
TX-RETURN-STATUS is the record used to return a value.
TXSETTRANCTL()
Upon successful completion, Under the following conditions, Return Value
TXROLLBACK returns TX-OK, a non-negative return value.
Errors
TXROLLBACK fails and returns one of these negative values.
TX-NO-BEGIN]
transaction_control characteristic is TX-CHAINED.
TX-MIXED]
transaction_control characteristic is TX-CHAINED, a new transaction is started.
TX-MIXED-NO-BEGIN]
transaction_control characteristic is TX-CHAINED.
TX-HAZARD]
transaction_control characteristic is TX-CHAINED, a new transaction is started.
TX-HAZARD-NO-BEGIN]
transaction_control characteristic is TX-CHAINED.
TX-COMMITTED]
transaction_control characteristic is TX-CHAINED, a new transaction is started.
TX-COMMITTED-NO-BEGIN]
transaction_control characteristic is TX-CHAINED.
TX-PROTOCOL-ERROR]
TX-FAIL]
TXBEGIN(), TXSETTRANCTL(), TXSETTIMEOUT()