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.
Following are the valid settings for TRANSACTION-CONTROL.
TX-UNCHAINED
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
TXCOMMIT and TXROLLBACK should start a new transaction before returning to their caller.
TX-RETURN-STATUS is the record used to return a value.
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.
TX-EINVAL]
TRANSACTION-CONTROL is not one of TX-UNCHAINED or TX-CHAINED.
TX-PROTOCOL-ERROR]
TXOPEN()).
TX-FAIL]
TXBEGIN(), TXCOMMIT(), TXOPEN(), TXROLLBACK(), TXINFORM()