OpenTP1 Version 7 Programming Reference COBOL Language

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

TXSETTRANCTL - Set transaction_control characteristic

Format

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

Description

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.

<<Data areas>>

<<TRANSACTION-CONTROL>>

The valid settings for TRANSACTION-CONTROL are as follows:

Return value

Upon successful completion, TXSETTRANCTL sets TX-OK, a non-negative return value. <<0 is returned.>> <<The transaction_control characteristic was changed to the value of TRANSACTION-CONTROL.>>

Errors

Under the following conditions, TXSETTRANCTL does not change the setting of the transaction_control characteristic and sets one of these negative values;

TX-EINVAL
TRANSACTION-CONTROL is not one of TX-UNCHAINED or TX-CHAINED.

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 a fatal 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 Open TP1>>

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