COMMIT statement ends the logical unit of work.
- The COMMIT will close all the locks that are acquired, except the cursors used with CURSOR WITH HOLD
- COMMIT we should not use in stored procedures
Syntax for ROLLBACK:
- It rolls back all the changes made to its last Save Point
- In DB2, when abend occurs DB2 will do all the changes ROLLBACK implicitly
- Ends logical unit of work
- Cursors open with WITH HOLD will not be closed in IMS/CICS-when no work is performed since last commit point