OpenTP1 Version 7 Programming Reference COBOL Language
TXOPEN - Open a set of resource managers
Format
DATA DIVISION. * Include TX definitions. 01 TX-RETURN-STATUS. COPY TXSTATUS. PROCEDURE DIVISION. CALL "TXOPEN" USING TX-RETURN-STATUS. |
Description
TXOPEN opens a set of resource managers in a portable manner. It invokes a transaction manager to read information specific to the resource manager in a manner specific to the transaction manager and pass this information to the resource managers linked to the caller.
TXOPEN attempts to open all resource managers that have been linked with the application. This function is used in place of open calls specific to the resource manager and allows an application program to be free of calls, which may hinder portability. Since resource managers differ in their initialization semantics, the specific information needed to open a particular resource manager must be published by each resource manager.
If TXOPEN sets TX-ERROR, no resource managers are open. If TXOPEN sets TX-OK, some or all of the resource managers have been opened. Resource managers that are not open return errors specific to the resource manager when accessed by the application. TXOPEN must successfully return before a thread of control participates in global transactions.
Once TXOPEN sets success, subsequent calls to TXOPEN (before an intervening call to TXCLOSE) are allowed. However, such subsequent calls return success, and the TM does not attempt to reopen any RMs.
<<Data areas>>
<<TX-RETURN-STATUS
The results of TXOPEN execution are returned to this area.>>
Return value
Upon successful completion, TXOPEN sets TX-OK, a non-negative return value. <<0 is returned.>> <<The set of one or more resource managers linked to the TXOPEN caller is opened.>>
Errors
Under the following conditions, TXOPEN fails and sets one of these negative values:
See also
TXCLOSE.
<<Notes on use with OpenTP1>>
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.