COMMIT (Commit)

COMMIT Command syntax diagram

 

Purpose

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 established 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 in the Information Center.

 

Optional Parameters

CMTID
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.

*NONE: No text is used to identify the group of changes committed with this commitment boundary.

*LUWID: The logical unit of work identifier and the default journal name for this logical unit of work are used to identify the group of changes being committed with this commitment boundary.

'description': Specify a maximum of 3000 characters, enclosed in apostrophes, to identify the group of changes being committed with this commitment boundary.

Example for COMMIT

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.

Error messages for COMMIT

*ESCAPE Messages

CPF5030
Partial damage on member &4.
CPF509F
Job has successfully connected after I/O error.
CPF5104
Cancel reply received for message &7.
CPF511D
Parameter integrity error occurred with reason code &1.
CPF5134
Not authorized to process request on member &4.
CPF5149
Operation for program device or member &4, file &2 in library &3 is not valid.
CPF5168
Cannot open member &3 file &1 in &2.
CPF5169
Cannot complete input or output (I/O) to DDM file &2 in &3.
CPF5173
&6 records in buffer not valid.
CPF5235
Entry for member &4 not journaled.
CPF5257
Failure for device or member &4 file &2 in library &3.
CPF5272
Records not added to member &4.
CPF83DB
Commit operation resulted in rollback.
CPF83D0
Commitment operation not allowed.
CPF83E1
Commit operation failed due to constraint violation.
CPF83E2
Rollback operation required.
CPF835F
Commit or rollback operation failed.
CPF8350
Commitment definition not found.
CPF8363
Commit operation failed.
CPF8367
Cannot perform commitment control operation.
CPF9203
Reply &1 received from DDM target system not expected.
CPF9255
Commitment control operation failed.