+-------------------------------IBM Extension--------------------------------+
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. The format of the COMMIT statement is:
COMMIT Statement - Format >>-COMMIT------------------------------------------------------><
When the COMMIT statement is executed, all changes made to files under commitment control, for the current commitment definition 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, 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 current commitment definition since the last commitment boundary for files under commitment control are released and the records become available. Commitment control can be scoped at the job level or the activation group level. Commitment control scopes to the activation group by default. This is important when your application involves non-ILE COBOL programs that run in a different activation group, such as a CL program.
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:
For more information on commitment control, see the ILE COBOL for AS/400 Programmer's Guide.
+----------------------------End of IBM Extension----------------------------+
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.