TXSETTIMEOUT-set transaction_timeout characteristic
DATA DIVISION.
* Include TX definitions.
01TX-RETURN-STATUS.
COPY TXSTATUS.
*
01TX-INFO-AREA.
COPY TXINFDEF.
PROCEDURE DIVISION.
CALL "TXSETTIMEOUT" USINGTX-INFO-AREA TX-RETURN-STATUS.
TXSETTIMEOUT sets the transaction_timeout characteristic to the value specified in TRANSACTION-TIMEOUT. This value specifies the time period in which the transaction must complete before becoming susceptible to transaction timeout; that is, the interval between the AP calling TXBEGIN() and TXCOMMIT() or TXROLLBACK(). TXSETTIMEOUT may be called regardless of whether its caller is in transaction mode or not. If TXSETTIMEOUT is called in transaction mode, the new timeout value does not take effect until the next transaction.
The initial transaction_timeout value is 0 (no timeout).
TRANSACTION-TIMEOUT specifies the number of seconds allowed before the transaction becomes susceptible to transaction timeout. It may be set to any value up to the maximum value for an S9(9) COMP-5 as defined by the system. A TRANSACTION-TIMEOUT value of zero disables the timeout feature.
TX-RETURN-STATUS is the record used to return a value.
Upon successful completion, TXSETTIMEOUT returns TX-OK, a non-negative return value.
Under the following conditions, TXSETTIMEOUT does not change the setting of the transaction_timeout characteristic and returns one of these negative values.
TX-EINVAL]
TX-PROTOCOL-ERROR]
TXOPEN().
TX-FAIL]
TXBEGIN(), TXCOMMIT(), TXOPEN(), TXROLLBACK(), TXINFORM()