![]() |
![]() |
e-docs > Tuxedo > ATMI COBOL Function Reference > Section 3(cbl) - COBOL Functions |
ATMI COBOL Function Reference
|
Name
TXBEGIN() - begin a global transaction
Synopsis
01 TX-RETURN-STATUS.
COPY TXSTATUS.
CALL "TXBEGIN" USING TX-RETURN-STATUS.
Description
TXBEGIN() is used to place the calling thread of control in transaction mode. The calling thread must first ensure that its linked resource managers have been opened (via TXOPEN()) before it can start transactions. TXBEGIN fails (with a TX-STATUS value of [TX-PROTOCOL-ERROR]) if the caller is already in transaction mode or TXOPEN() has not been called.
Once in transaction mode, the calling thread must call TXCOMMIT() or TXROLLBACK() to complete its current transaction. There are certain cases related to transaction chaining where TXBEGIN() does not need to be called explicitly to start a transaction. See TXCOMMIT() and TXROLLBACK() for details. TX-RETURN-STATUS is the record used to return a value.
Optional Set-up
TXSETTIMEOUT()
Return Value
Upon successful completion, TXBEGIN() returns TX-OK, a non-negative return value.
Errors
Under the following conditions, TXBEGIN() fails and returns one of these negative values:
See Also
TXCOMMIT(3cbl), TXOPEN(3cbl), TXROLLBACK(3cbl), TXSETTIMEOUT(3cbl)
Warnings
XA-compliant resource managers must be successfully opened to be included in the global transaction. (See TXOPEN for details.)
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |