Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Transaction in application programs

Transactions are opened and closed in different ways:

SQL transaction: 

Transaction begins when the program starts or when the preceding transaction ends; it begins with the SQL statement that initiates the transaction. The statement that commits a transaction is COMMIT WORK; the statement that rolls back a transaction is ROLLBACK WORK.

CALL DML transaction: 

You define the beginning and the end of a transaction in your program with CALL DML statements. The transaction begins with the “begin transaction” statement (BTA) and ends with the “end transaction” statement (ETA) or when DBH performs an internal rollback of the transaction.


SQL and CALL DML transactions may not be combined within a single transaction.

However, in a CALL DML transaction certain SQL statements may be issued. Exceptions are the COMMIT WORK and ROLLBACK WORK statements as well as the SQL statements used for queries and modifications which must also not be used in an SQL transaction (see the “SQL Reference Manual Part 1: SQL Statements”).

Applications with linked-in DBH may contain only CALL DML or SQL transactions.

A transaction may contain statements that pertain to one or more tables.


Figure 17: A number of different transactions concurrently access several different tables


SESAM/SQL allows a maximum of 32,767 transactions to concurrently access between 1 and 254 databases. CALL DML allows up to 254 tables (see OLD-TABLE-CATALOG in the “Database Operation” manual).