COMMIT (Commit)

Free-Form Syntax COMMIT{(E)} {boundary}
Code Factor 1 Factor 2 Result Field Indicators
COMMIT (E) boundary _ ER _

The COMMIT operation:

The file changes and the record-lock releases apply to all the files you have under commitment control, whether the changes have been requested by the program issuing the COMMIT operation, or by another program in the same activation group or job, dependent on the commit scope specified on the STRCMTCTL command. The program issuing the COMMIT operation does not need to have any files under commitment control. The COMMIT operation does not change the file position.

Commitment control starts when the CL command STRCMTCTL is executed. See the section on “Commitment Control” in the IBM Rational Development Studio for i: ILE RPG Programmer's Guide for more information.

For the boundary operand, , you can specify a constant or variable (of any type except pointer) to identify the boundary between the changes made by this COMMIT operation and subsequent changes. If boundary is not specified, the identifier is null.

To handle COMMIT exceptions (program status codes 802 to 805), either the operation code extender 'E' or an error indicator ER can be specified, but not both. For example, an error occurs if commitment control is not active. For more information on error handling, see Program Exception/Errors.

For more information, see File Operations.



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