Please enable JavaScript to view this site.

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.

Note, commits are performed automatically for by the Engine for each Unit-of-Work published by the Change Data Capture agents making the COMMIT command obsolete for virtually all Apply Engines. If during the processing oa a UOW an error occurs none of the data will be committed by the Engine. Once the cause of the error is resolved. The Publisher will resend the entire UOW to the Apply Engine for processing. This ensures that data is not lost in the event of a target datastore error or a system failure. Contact Support@precisely.com for assistance with this command.

Syntax

COMMIT EVERY  <commit_frequency> | <source_field_name> | KEY CHANGE FOR <datastore_alias>;

 

Keyword and Parameter Descriptions

<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.
 
Note: If this parameter is used, the COMMIT command must be specified after the DESCRIPTION command that references the structure that contains the source field.

KEY CHANGE FOR datastore_alias - This command commits the specified DATASTORE after every record key change.

Example 1:

Specify a commit frequency of one (1) in the Environment Section of the Apply Engine script.

JOBNAME SQDTEST;

COMMIT EVERY  1;

 

Example 2:

Specify a commit scope based on the value of field (SRC_RECORD_ID) changing values.

JOBNAME SQDTEST;

DESCRIPTION file_name AS SRC_DESCR;

COMMIT SRC_RECORD_ID;