COMMIT
The COMMIT statement commits the current transaction and automatically starts a new transaction.
General format
EXEC SQL [ AT Database ] COMMIT { WORK } [ RELEASE ] { TRAN } { TRANSACTION } END-EXEC |
General Rules
1. Database identifies the active connection that will execute the query and must be previously defined using a Format 4
DECLARE statement.
2. WORK, TRAN and TRANSACTION are synonymous and are assumed if omitted.
3. The RELEASE option frees all resources (locks and cursors) held by the program and logs off the database.
4. The
iscobol.jdbc.autocommit (boolean) configuration setting must be set to false, otherwise all statements are automatically commited. With
iscobol.jdbc.autocommit (boolean) set to false, a transaction is started as soon as you connect to the database. The COMMIT statement allows you to confirm that transaction and immediately start a new one.
Examples
Commit transaction
exec sql commit work end-exec |