TX (Transaction Demarcation) is a program interface for defining distributed transactions, which has been standardized by X/Open.
openUTM provides the TX program interface for the programming languages COBOL, C and C++.
With openUTM, TX calls should only be used in CPI-C services. XATMI services are included implicitly in global transactions by means of the TPTRANS or TPNOTRANS flag. The XATMI call tpreturn() determines whether a transaction is terminated successfully or rolled back.
With TX, transactions can be executed in chained or unchained mode. In chained mode, only the first transaction need be started explicitly: the end of this transaction implicitly marks the beginning of the next transaction.
In unchained mode, the beginning of each transaction must be specifically marked.
However, openUTM always works in chained mode. When a service is started under openUTM, a transaction is begun automatically. For this reason, the first transaction need not be marked.
The OpenCPIC carrier system also enables openUTM clients to control transactions with TX.
Overview: TX calls in openUTM
C/C++ call | COBOL call | Description |
tx_commit | TXCOMMIT | Terminate global transaction successfully |
tx_rollback | TXROLLBACK | Roll back global transaction |
tx_info | TXINFORM | Query global transaction information |
tx_set_commit_return | TXSETCOMMITRET | Set commit_return characteristic |
tx_set_transaction_control | TXSETTRANCTL | Set transaction_control characteristic |
tx_set_transaction_timeout | TXSETTIMEOUT | Set transaction_timeout characteristic |
tx_open | TXOPEN | Always returns TX_OK under openUTM |
(The tx_begin() (TXBEGIN) and tx_close() (TXCLOSE) calls always return TX_PROTOCOL_ERROR under openUTM ). |
The individual calls are described in detail in the X/Open CAE Specification on TX of April 1995. All UTM-specific details are described in the openUTM manual “Creating Applications with X/Open Interfaces”. |