ATMI COBOL Function Reference
TXSETTRANCTL()
- set transaction_control
characteristic
DATA DIVISION.
* Include TX definitions.
01TX-RETURN-STATUS
.
COPY TXSTATUS.
01TX-INFO-AREA
.
COPY TXINFDEF.
PROCEDURE DIVISION.
CALL "TXSETTRANCTL" USINGTX-INFO-AREA TX-RETURN-STATUS
.
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
.
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.
Upon successful completion, TXSETTRANCTL()
returns TX-OK
, a non-negative return value.
Under the following conditions, TXSETTRANCTL()
does not change the setting of the transaction_control
characteristic and returns one of these negative values:
The function was called in an improper context (for example, the caller has not yet called TXOPEN()
).
TXBEGIN(3cbl)
, TXCOMMIT(3cbl)
, TXOPEN(3cbl)
, TXROLLBACK(3cbl)
, TXINFORM(3cbl)