Commit (COMMIT)

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

Parameters

Keyword Description Choices Notes
CMTID Commit identification Character value, *NONE, *LUWID Optional, Positional 1
Top

Commit identification (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 transaction 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.
Top

Examples

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

Error messages

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

*STATUS Messages

CPF5001
End of file &2 detected in library &3.
CPF83E6
Commitment control operation completed with resynchronization in progress.

*NOTIFY Messages

CPF5018
Member &4 at maximum size. Increment not allowed.
CPF502A
Variable length record error on member &4.
CPF502B
Error occurred in trigger program.
CPF502D
Referential constraint violation on member &4.
CPF502E
Referential constraints could not be validated for member &4.
CPF502F
Check constraint violation on member &4.
CPF5026
Duplicate key not allowed for member &4.
CPF5029
Data mapping error on member &4.
CPF503A
Referential constraint violation on member &4.
CPF503B
Record could not be inserted or updated in member &4.
CPF503F
Partition key error on member &4.
CPF5030
Partial damage on member &4.
CPF5033
Select/omit error on member &4.
CPF5034
Duplicate key on access path.
CPF5079
Commitment control resource limit exceeded for this job.
CPF5084
Duplicate key not allowed for member &4.
CPF5085
Duplicate key on access path for based-on member of &4.
CPF5090
Unique access path problems prevent updates to member &4.
CPF5097
Key mapping error on member &4.
Top