The COMMIT transaction management statement requests that changes to the database made by the SQL session be made permanent. Optionally, the SQL session continues or terminates.
None required.
►►─── COMMIT work ─┬────────────┬─────────────────────────────────────────────►◄ ├─ CONTINUE ─┤ └─ RELEASE ─┘
Directs CA IDMS to maintain the state of the SQL session after committing changes to the database. This has the effect of maintaining the position of open cursors, retaining temporary tables and associating a new transaction with the session after terminating the current one.
If you do not specify CONTINUE, CA IDMS terminates the current transaction and does not start a new one. It also closes all open cursors and drops all temporary tables. The CONTINUE parameter is a CA IDMS extension of the SQL standard.
Directs CA IDMS to end the current SQL session as well as the current transaction after committing the changes to the database. The RELEASE parameter is a CA IDMS extension of the SQL standard.
Effect of a COMMIT on the SQL Session's Transaction
If the SQL session's database transaction is not shared, a COMMIT statement has the following impact on its transaction:
Effect of a COMMIT on an SQL Session
A COMMIT statement without the CONTINUE option has the following impact on the SQL session:
If CONTINUE is specified, the COMMIT statement impacts the SQL session's transaction but has no impact on the session itself. Its state remains as it was before the COMMIT statement was issued.
Effect of Transaction Sharing
A COMMIT statement requests that changes made by an SQL session be committed. However, if more than one database session is sharing the session's transaction, those changes might not be committed immediately. All sharing sessions that have had activity since the last commit, rollback or session start must signal their willingness to commit by issuing a COMMIT statement before changes are actually made permanent. The last one to do so causes the transaction to be committed.
A teleprocessing commit statement such as a COMMIT TASK can be used to cause the immediate committing of a shared transaction, since it impacts all of the associated sessions. A COMMIT issued by an encompassing session automatically commits all of its subordinate sessions.
Committing Changes to the Database
The following COMMIT statement commits changes made during the current transaction to the database, but does not end the transaction:
EXEC SQL COMMIT CONTINUE END-EXEC
|
Copyright © 2014 CA.
All rights reserved.
|
|