The commit and rollback operations are available in several iSeries™ programming languages, including the RPG/400®, COBOL/400®, PL/I, SQL, and the i5/OS™ control language (CL). You can open logical files for output under commitment control when underlying physical files are journaled to different journals. Commitment control can also be used in a batch environment.
However, the checks for violations are deferred if a record change affects underlying physical files that are journaled to the same journal. If the record change affects underlying physical files that are not journaled to the same journal, and it causes a duplicate key or referential constraint violation, an error will occur during the input/output operation. For example, assume physical file A with a unique key is journaled to journal X, while physical file B with a unique key is journaled to journal Y. Logical file C is created over physical files A and B and opened under commitment control. A delete operation performed using logical file C removes a record from physical file A with key K. It is possible to add a record back to physical file A with key K before the transaction is committed. However, an attempt to add a record to physical file B with key K, before the transaction is committed, will fail since physical files A and B are journaled to different journals.
Just as it provides assistance in interactive transaction recovery, commitment control can also help in batch job recovery.