OpenTP1 Version 7 Programming Reference COBOL Language

[Contents][Index][Back][Next]

TXSETTIMEOUT - Set transaction_timeout characteristic

Format

 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).

<<When a value is specified for trn_expiration_time in system definition, it is treated as the initial value.>>

<<Data areas>>

<<TX-INFO-AREA>>

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

The results of TXSETTIMEOUT execution are returned to this area.>>

Return value

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

<<The transaction_timeout characteristic has become the value assigned to TX-INFO-AREA.>>

Errors

Under the following conditions, TXSETTIMEOUT does not change the setting of transaction_timeout characteristic and sets 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.

See also

TXBEGIN, TXCOMMIT, TXOPEN, TXROLLBACK, TXINFORM.

<<Notes on use with OpenTP1>>

  1. <<TXSETTIMEOUT cannot be used along with OpenTP1 CBLDCTRN.>>