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

TXSETTRANCTL(3cbl)

Name

TXSETTRANCTL() - set transaction_control characteristic

Synopsis

DATA DIVISION.
* Include TX definitions.
01
TX-RETURN-STATUS.
COPY TXSTATUS.
01
TX-INFO-AREA.
COPY TXINFDEF.
PROCEDURE DIVISION.
CALL "TXSETTRANCTL" USING
TX-INFO-AREA TX-RETURN-STATUS.

Description

TXSETTRANCTL() sets the transaction_control characteristic to the value specified in TRANSACTION-CONTROL. This characteristic determines whether TXCOMMIT() and TXROLLBACK() start a new transaction before returning to their caller. TXSETTRANCTL() may be called regardless of whether the application program is in transaction mode. This setting remains in effect until changed by a subsequent call to TXSETTRANCTL().

The initial setting for this characteristic is TX-UNCHAINED.

The following are the valid settings for TRANSACTION-CONTROL.

TX-UNCHAINED

This flag indicates that TXCOMMIT() and TXROLLBACK() should not start a new transaction before returning to their caller. The caller must issue TXBEGIN() to start a new transaction.

TX-CHAINED

This flag indicates that TXCOMMIT() and TXROLLBACK() should start a new transaction before returning to their caller.

TX-RETURN-STATUS is the record used to return a value.

Return Value

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

Errors

Under the following conditions, TXSETTRANCTL() does not change the setting of the transaction_control characteristic and returns one of these negative values.

[TX-EINVAL]

TRANSACTION-CONTROL is not one of TX-UNCHAINED or TX-CHAINED.

[TX-PROTOCOL-ERROR]

The function was called in an improper context (for example, the caller has not yet called TXOPEN()).

[TX-FAIL]

The transaction manager encountered a fatal error. The nature of the error is such that the transaction manager can no longer perform work on behalf of the application. The exact nature of the error is written to a log file.

See Also

TXBEGIN(3cbl), TXCOMMIT(3cbl), TXOPEN(3cbl), TXROLLBACK(3cbl), TXINFORM(3cbl)