openUTM supports coordinated interaction with database systems. openUTM uses two-phase-commits to synchronize the UTM transactions and the transactions of the database system (see the openUTM manual “Concepts and Functions”).
A UTM application can interact in coordination with multiple database systems. This means that a UTM transaction can contain calls to different database systems.
If a UTM program unit terminates a dialog or processing step with PEND KP, the transaction is normally continued in a different process. If the program unit run is terminated with PEND PA/PR, it is also possible that the processing step will be continued in a different process. In distributed OSI TP transactions, a transaction is normally also terminated in a different process after the KDCS calls PEND SP, RE, FI or PGWT CM. In this kind of environment, all database systems involved in the transaction must support the change of process.
Furthermore, it is possible in distributed transaction processing to process data from a number of different database systems on different computers in a single distributed transaction.
Rolling back transactions
If an errors occurs, openUTM rolls back all the databases of an transaction to a common synchronization point. There is no need for the programmer to coordinate openUTM and the database systems.
The database system can also roll back DB transactions itself, e.g. to release long-term locks. In this case the transactions are again synchronized and the program unit is informed by the corresponding DB system return code.
Internal interface between openUTM and database systems
openUTM employs a uniform and neutral interface to control the interaction with database systems. In this way openUTM is independent of any implementation-specific features of the various database systems.
On Unix, Linux and Windows systems, this is the XA interface standardized by X/Open, on BS2000 systems the XA interface is offered and the functionally equivalent IUTMDB interface.
Supported database systems
openUTM on BS2000 systems supports coordination with the following database systems:
UDS/SQL
SESAM/SQL
Oracle
LEASY (the LEASY file system behaves like a database system with openUTM).
On Unix, Linux and Windows systems openUTM supports coordination with the database system Oracle.
Connecting openUTM with database systems
The database systems with which a UTM application is to coordinate and interact are specified in the KDCDEF statement during generation of the UTM application: on Unix, Linux and Windows systems you use the RMXA statement, for BS2000 systems the DATABASE statement (see the openUTM manual “Generating Applications”).
Note for BS2000 systems
Some database systems provide various call interfaces for the application program. These may be implemented as CALL interfaces or language elements in the programming language (e.g. in COBOL). You use the KDCDEF statement DATABASE to specify the interfaces which the program units of a UTM application use for communication.
Note for Unix, Linux and Windows systems and for XA-capable databases on BS2000 systems
No interface is specified for the application program at generation of a XA-capable database. The interface depends on the resource manager used.
Note on using XA
As a rule, there is a static and dynamic XA switch. A database can provide one or both variants. If the database provides a dynamic XA switch, you should use this. This minimizes the resources occupied in the database system.