An openUTM transaction begins when a program unit is started and ends when a synchronization point is set by terminating the program unit again (see the openUTM “ Concepts and Functions” manual).
The synchronization point is the point from which a system is restarted after the subsequent transactions have been rolled back.
Exception:
With some methods of termination, such as PEND KP, the program unit terminates without setting a synchronization point and without completing the transaction.
Only one database transaction is allowed to run in an openUTM transaction.
In the case of CALL DML transactions, termination is initiated with an ETA statement. Following the ETA statement, no other DB statement is allowed within the openUTM transactions.
The linked-in CALL DML statements “statement; ETA” and “ETA; BTA” are not allowed in openUTM applications.Neither COMMIT WORK nor ROLLBACK WORK is allowed in SQL transactions within openUTM transactions. PEND terminates the DB transaction.
When a SESAM/SQL-openUTM transaction is rolled back, both the DB transaction and the openUTM transaction are rolled back.
The SESAM/SQL-openUTM DB/DC system synchronizes the end of the openUTM transaction with the end of the DB transaction (see the openUTM manuals “ Generating and Handling Applications” and “ Concepts and Functions”).
Synchronization proceeds as follows:
In the case of CALL DML transactions:
The DB transaction in the openUTM program unit is caused to stop. The DB transaction is not terminated immediately, since errors might still occur and stop the openUTM transaction from being completed.
SESAM/SQL informs openUTM of the request to end the DB transaction and delays its termination until the openUTM transaction is ended.
The openUTM program unit is still busy with jobs belonging to the openUTM transaction but not to the DB transaction, e.g. format or print output.In the case of SQL transactions:
The end of the DB transaction and the end of the openUTM transaction are both instigated simultaneously (with a PEND).
The DB/DC transaction is completed successfully when the DB transaction has been completed successfully and the changes in the UTM areas have been committed. Locked system resources are freed again now.
Figure 36: Synchronization of DB transaction and openUTM transaction