COBOL/400 Language Help


COMMIT Statement

Description
The COMMIT statement provides a way of synchronizing changes to data base records while preventing other jobs from modifying those records until the COMMIT is performed.

When the COMMIT statement is executed, all changes made to files under commitment control since the previous commitment boundary are made permanent. A commitment boundary is established by the successful execution of a ROLLBACK or COMMIT statement. If no COMMIT or ROLLBACK has been issued in the current job, a commitment boundary is established by the first OPEN of any file under commitment control in the job. Changes are made to all files under commitment control in the job, not just to files under commitment control in the COBOL program that issues the COMMIT statement.

When a COMMIT is executed, all record locks held by the job since the last commitment boundary for files under commitment control are released and the records become available to other jobs.

The COMMIT statement only affects files under commitment control. If a COMMIT is executed and there are no files opened under commitment control, the COMMIT statement has no effect and no commitment boundary is established.

The COMMIT statement does not:

->->---COMMIT-----------------------------------><-


[ Top of Page | Previous Page | Next Page | Table of Contents ]