The COMMIT command is used control the commit frequency during execution of the Engine. The commit frequency is based the number of source datastore records processed.
This command applies to target datastores that support commit/rollback operations such as database management systems (i.e. IMS, Db2, Oracle and SQL Server) and IBM MQ. When the commit frequency is reached, the target datastore updates are committed.
To control the commit behavior for Kafka targets, use the —max_uow=n
option on the command line when you execute Apply engine.
COMMIT EVERY <commit_frequency> | <source_field_name> | KEY CHANGE FOR <datastore_alias>;
Keyword | Description |
---|---|
<commit_frequency> | Specifies the number of source records to be read before issuing a commit to the target datastore(s). |
<source_field_name> |
This parameter specifies that the commit scope be based on the value of a source field changing. This can be used when a group of records must be committed together, such as for changed data propagation where the field name would be specified as the unit-of-work token. |
KEY
CHANGE
FOR
datastore_alias
- This command commits the specified DATASTORE after every record key change.
Example 1:
JOBNAME SQDTEST;
COMMIT EVERY 1;
Example 2:
JOBNAME SQDTEST;
DESCRIPTION file_name AS SRC_DESCR;
COMMIT SRC_RECORD_ID;