Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
I'm curious about ending commitment control. A co-worker tells me you must do an ENDCMTCTL after a COMMIT to release any locks from the commitment control.
I understand that once a COMMIT is issued, the records are posted to the database and any READ/UPDATE locks are released. Am I correct?
Thanks
George
You are correct. ENDCMTCTL stops the commitment control environment. If nothing has changed since the last COMMIT or ROLLBACK (i.e., last boundary), there's nothing to release. If there are pending, uncommitted changes, then an ENDCMTCTL will send a message to an interactive job, or will do an implied ROLLBACK in a batch job.
I should add that you should do an ENDCMTCTL. It just doesn't have anything to do with releasing locks after a COMMIT.
Thanks Dale!
GF