Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Commit (COMMIT) command is used to complete the current transaction and to establish a new commitment boundary for the commitment definition associated with the program issuing the command.
The Start Commitment Control (STRCMTCTL) command must be issued first to establish the commitment definition before the COMMIT command is issued; otherwise, a message is sent.
When the COMMIT command is issued, all pending changes made to resources under commitment control for the commitment definition since the last commitment boundary was started are made permanent. A commitment identifier can be specified that is associated with this set of changes. If any files or API commitment resources associated with a journal are under commitment control, the commitment identifier is placed in the changes committed (CM) journal entry of each journal.
The commitment identifier is also used by the system when updating the notify object if it needs updating during activation group end, job end, or IPL (initial program load) processing.
No error occurs if there are no resources under commitment control for the commitment definition at the time the commit is issued. All record locks held for files opened under commitment control for the commitment definition are released when the commit is issued. Locks on object level commitment control resources, acquired when the resources are created or changed during the transaction, are released when the commit is issued.
More information on commitment control is in the "Commitment control" article is in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
CMTID | Commit identification | Character value, *NONE, *LUWID | Optional, Positional 1 |
Top |
Specifies the text used to identify a group of changes committed with the commitment boundary. This text is placed in the object specified on the NFYOBJ parameter of the STRCMTCTL command during IPL processing if an abnormal system failure occurs, or if a job ends with uncommitted changes or with a nonzero completion code.
Top |
COMMIT CMTID('Account #123456 changes end')
This command specifies that all changes made to this point for the commitment definition associated with the program issuing the command are committed. The commitment identifier is 'Account #123456 changes end' and may be used by the system when updating the notify object if it needs updating during activation group end, job end, or IPL processing.
Top |
*ESCAPE Messages
*STATUS Messages
*NOTIFY Messages
Top |