The 4GL_COMMIT_COUNT variable sets the conditions used to issue an automatic COMMIT-WORK operation. Valid values are:
When 4GL_COMMIT_COUNT is set to -1, the following alternate methods to perform a commit or rollback are available:
4GL_COMMIT_COUNT is set to -1 automatically when you use the transaction management facilities available in the compiler. A COMMIT WORK is, however, issued on exit from the run time system (for example, on execution of a STOP RUN).
Examples
4GL_COMMIT_COUNT 0
A commit is issued when no locks are held, either because all files that had locked records are closed, or because a COBOL COMMIT verb has been issued. This is the default value.
Note that some data sources lose the current row when a COMMIT or ROLLBACK is executed. For these data sources, setting 4GL_COMMIT_COUNT to 0 can slow performance.
4GL_COMMIT_COUNT n
A commit is issued after n operations. WRITE, REWRITE, and DELETE count towards n; READ, START, and READ NEXT do not.
4GL_COMMIT_COUNT -1
No commit is issued by . When 4GL_COMMIT_COUNT is set to -1, the only way to perform a commit or rollback is to use the COBOL verbs COMMIT and ROLLBACK.
4GL_COMMIT_COUNT is set to -1 internally when you use the transaction management facilities available in your COBOL development system.
A COMMIT is issued on exit from the run time system (for example, on execution of a STOP RUN).