Professional Documents
Culture Documents
Commitment Control
Commitment Control
Synon/CA 2E
2E and Commitment Control
July 26, 2012 Mark No comments
What is Commitment Control?
Commitment control is a function that ensures data integrity. It defines and pro
cesses a group of changes to resources, such as database files or tables, as a t
ransaction.
Commitment control ensures that either the entire group of individual changes oc
cur on all systems that participate or that none of the changes occur. IBM® DB2 Un
iversal Database for iSeries uses the commitment control function to commit and ro
llback database transactions that are running with an isolation level other than
*NONE (No Commit).
You can use commitment control to design an application so that the system can r
estart the application if a job, an activation group within a job, or the system
ends abnormally. With commitment control, you can have assurance that when the
application starts again, no partial updates are in the database due to incomple
te transactions from a prior failure.
A program that implements the function runs under i OS Commitment Control and, i
f so, whether it contains the main commit points. i OS commitment control provid
es a means of automatically grouping a number of database updates into a single
transaction for the purposes of recovery: either all or none of the updates take
place.
Commitment control ensures that either the entire group of individual changes oc
curs on all systems that participate or that none of the changes occur.
The *COMMIT built-in function enables you to add your own commit points to a pro
gram that is executing under IBMi commitment control. Commitment control is a me
thod of grouping database file operations that allow the processing of a databas
e change to be either fully processed (COMMIT) or fully removed (ROLLBACK).
Implementing Commitment Control in 2E
CA 2E implements the *COMMIT built-in function as an RPG COMMIT statement, and a
s a COBOL COMMIT statement.
There are two types of functions used in Commitment Control.
The Master function. This function is an external function defined with the func
tion Option:Commit control = M. The master function is a parent function of a t
ransaction. It is used to define the beginning and ending of the transaction.
The Slave function. This function is an external function that is contained with
in the transaction. It is defined by the function Option: Commit control = S.
The Slave is part of a transaction controlled the the parent Master function.
Using Commitment Control in CA 2E
Setup files with jounaling to use Commitment Control.
Start with a Master.
Enter a *commit at beginning of transaction.
Enter a *commit at end of transaction.
Enter *rollback if transaction fails.
Master can contain multiple slave functions.
Slaves cannot exist in a transaction without a master.