IBM Extension

COMMITMENT CONTROL Clause

The COMMITMENT CONTROL clause specifies the files that will be placed under commitment control when they are opened.

COMMITMENT CONTROL Clause - Format

Read syntax diagramSkip visual syntax diagramCOMMITMENTCONTROL1 FORfile-name-6
Notes:
  • 1 IBM Extension

File-name-6 must be specified in the FILE CONTROL paragraph of the same program as the I-O-CONTROL paragraph in which the COMMITMENT CONTROL clause appears.

These files will then be affected by the COMMIT and ROLLBACK statements. The COMMIT statement allows the synchronization of changes to database records while preventing other jobs from modifying those records until the COMMIT is complete. The ROLLBACK statement provides a method of cancelling changes made to database files when those changes should not be made permanent.

The COMMITMENT CONTROL clause can specify only files assigned to a device type of DATABASE. Files under commitment control may have an organization of sequential, relative or indexed, and may have any access mode valid for a particular organization.

The system locks records contained in files under commitment control when these records are accessed. Records remain locked until released by a COMMIT or ROLLBACK statement. For more information about record locking for files under commitment control, see the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide.
Note: Always try to use files in a consistent manner to avoid record locking problems, and to avoid reading records that have not yet been permanently committed to the database. Typically, a file should either always be accessed under commitment control or never be accessed under commitment control.
End of IBM Extension