BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo COBOL Function Reference

TXROLLBACK(3cbl)

Name

TXROLLBACK() - roll back a transaction

Synopsis

DATA DIVISION.
* Include TX definitions.
01
TX-RETURN-STATUS.
COPY TXSTATUS.
PROCEDURE DIVISION.
CALL "TXROLLBACK" USING
TX-RETURN-STATUS.

Description

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.

Optional Set-up

Return Value

Upon successful completion, TXROLLBACK() returns TX-OK, a non-negative return value.

Errors

Under the following conditions, TXROLLBACK() fails and returns one of these negative values.

[TX-NO-BEGIN]

The current transaction rolled back; however, a new transaction could not be started and the caller is no longer in transaction mode. This return value may occur only when the transaction_control characteristic is TX-CHAINED.

[TX-MIXED]

The work done on behalf of the transaction was partially committed and partially rolled back. In addition, if the transaction_control characteristic is TX-CHAINED, a new transaction is started.

[TX-MIXED-NO-BEGIN]

The work done on behalf of the transaction was partially committed and partially rolled back. In addition, a new transaction could not be started and the caller is no longer in transaction mode. This return value can occur only when the transaction_control characteristic is TX-CHAINED.

[TX-HAZARD]

Due to a failure, some of the work done on behalf of the transaction may have been committed and some of it may have been rolled back. In addition, if the transaction_control characteristic is TX-CHAINED, a new transaction is started.

[TX-HAZARD-NO-BEGIN]

Due to a failure, some of the work done on behalf of the transaction may have been committed and some of it may have been rolled back. In addition, a new transaction could not be started and the caller is no longer in transaction mode. This return value can occur only when the transaction_control characteristic is TX-CHAINED.

[TX-COMMITTED]

The work done on behalf of the transaction was heuristically committed. In addition, if the transaction_control characteristic is TX-CHAINED, a new transaction is started.

[TX-COMMITTED-NO-BEGIN]

The work done on behalf of the transaction was heuristically committed. In addition, a new transaction could not be started and the caller is no longer in transaction mode. This return value can occur only when the transaction_control characteristic is TX-CHAINED.

[TX-PROTOCOL-ERROR]

The function was called in an improper context (for example, the caller is not in transaction mode).

[TX-FAIL]

Either the transaction manager or one or more of the resource managers encountered a fatal error. The nature of the error is such that the transaction manager and/or one or more of the resource managers can no longer perform work on behalf of the application. The exact nature of the error is written to a log file. The caller's state with respect to the transaction is unknown.

See Also

TXBEGIN(3cbl), TXSETTIMEOUT(3cbl), TXSETTRANCTL(3cbl)