[Top] [Prev] [Next] [Bottom]

TXSETTIMEOUT(3CBL)

TXSETTIMEOUT(3CBL)

Name

TXSETTIMEOUT-set transaction_timeout characteristic

synopsis

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

Description

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.

Return Value

Upon successful completion, TXSETTIMEOUT returns TX-OK, a non-negative return value.

Errors

Under the following conditions, TXSETTIMEOUT does not change the setting of the transaction_timeout characteristic and returns one of these negative values.

[TX-EINVAL]
The timeout value specified is invalid.

[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 an 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(), TXCOMMIT(), TXOPEN(), TXROLLBACK(), TXINFORM()



[Top] [Prev] [Next] [Bottom]