Commit by Statement (-CS or -CSTMT)

Use the Commit by Statement adapter command (-CSTMT) to commit or roll back the transaction after the execution of every statement, or, optionally, after a specified number of statements. A statement is one of the following:

  • An INSERT or UPDATE statement as generated in an output card or PUT function.
  • The execution of a stored procedure.
  • The statement specified in a DBLOOKUP, DBQUERY, or GET function.

In an example for a target, if an output card is a database table for which the Update adapter command (-UPDATE) has also been specified, the Commit by Statement adapter command (-CSTMT) would cause each row to be committed as it is inserted or updated into the database.

For a source, the Commit by Statement adapter command (-CSTMT) can be used when the input is a query that executes a stored procedure performing inserts, updates, or deletes.

-CSTMT [number]
Value
Description
number
Specify the number of statements to be executed before committing the data.

The Commit by Statement adapter command (-CS) is an extra call to the database and may degrade performance. However, this command may be beneficial in situations in which the number of statements is large because the database server writes all such updates to its rollback segment, which increases continually with each call.

Commit by Card (-CCARD) and Commit by Statement (-CSTMT) are mutually exclusive. Also, if -CSTMT is specified, it overrides the value in the PUT > Target > Transaction > Scope card setting that was compiled into the map.