6 Using the Oracle Database Under openUTM

This chapter describes the specific points that you should consider when using Oracle Database 11g Release 2 (11.2) for BS2000/OSD under openUTM (Universal Transaction Monitor). The following topics are discussed in this chapter:

6.1 SQL Operations

UTM application program units must use embedded SQL. Calls to the Oracle Call Interface (OCI) are not allowed.


A connection is implicitly established when the UTM task is started. This connection uses the data specified in the open string. Further, explicit CONNECT operations issued by the program units are not allowed.

6.1.2 COMMIT

An explicit COMMIT statement is not allowed in UTM program units. The openUTM will automatically issue one on a PEND RE, FI, SP, or FC operation.


An explicit ROLLBACK statement is not allowed in UTM program units. The openUTM will automatically issue a ROLLBACK statement on encountering a PEND ER, RS, FR, or RSET operation.


The SAVEPOINT statement is not allowed in UTM program units.

6.1.5 Cursor Operations

A cursor is valid only until a PEND is executed. Because of a possible task change during a PEND KP, PA, or PR, you cannot perform operations on a previously filled cursor such as OPEN or FETCH after a PEND KP, PA, or PR.

However, you can open and fetch a new cursor after PEND KP. The alternative to using PEND KP is to use the PGWT-call (See the openUTM manual, Programming Applications with KDCS for COBOL, C and C++), which will wait until input comes from the terminal, to assign the same TACCLASS to subsequent programs after a PEND PA or PR.

6.1.6 Dynamic SQL

You may use dynamic SQL as described in Oracle Database Programmer's Guide to the Oracle Precompilers.

6.1.7 PL/SQL

COMMIT, ROLLBACK, CONNECT, and SAVEPOINT statements are not allowed in PL/SQL programs running under UTM.

6.1.8 Autocommit

Autocommit operations should be avoided because they violate the synchronization between Oracle Database and UTM transactions. Take precautions when using the DDL operations, as these often contain implicit autocommits.

For example, DDL statements such as CREATE TABLE, DROP TABLE, and CREATE INDEX are not allowed in a global transaction because they force pending work to be committed.

6.2 UTM Operations

This section describes the Oracle Database-specific points that you should consider when using UTM operations. It describes the effect of the PEND (Program Unit End) and RSET (Reset) operations of openUTM. These operations represent the common synchronization point between openUTM and the Oracle Database.

When you issue a PEND call, UTM calls the Oracle Database internally for synchronization. When the PEND takes place:

  • The user dialog/transaction is detached from the executing task.

  • Any resource that is still attached to the user is released.

6.2.1 RSET and PEND RS

Resetting a UTM transaction implies rolling back the Oracle Database transaction.

6.2.2 PEND ER and PEND FR

When using these calls to terminate a UTM transaction, the Oracle Database transaction is also rolled back.


These operations only end a UTM dialog step without affecting the corresponding Oracle Database transaction.


These PEND calls cause an implicit COMMIT to be executed. All cursors that are not explicitly closed, are closed.