ContentsIndexPreviousNext

COMMIT-COUNT

The value of COMMIT-COUNT indicates the conditions under which you want to issue an automatic COMMIT-WORK operation.

Examples

1) COMMIT-COUNT 0

A commit will be issued when no locks are held, either because all files that had locked records have been closed, or because a COBOL COMMIT verb has been issued. This is the default value.

2) COMMIT-COUNT n

A commit will be issued after n operations. WRITE, REWRITE, and DELETE count towards n; READ, START, and READ NEXT do not.

3) COMMIT-COUNT -1

No commit will be issued by the Acu4GL product. When COMMIT-COUNT is set to -1, there are two alternate ways to perform a commit or rollback.

One way is to call sql.acu with COMMIT WORK or ROLLBACK WORK.

The second way is to use the COBOL verbs COMMIT and ROLLBACK, available in ACUCOBOL-GT.

COMMIT-COUNT is set to -1 internally when you use the transaction management facilities available in the ACUCOBOL-GT compiler.

A COMMIT WORK will, however, be issued on exit from the runtime (for example, on execution of a STOP RUN).

See also

"Using the sql.acu Program" in Chapter 2, and section C.5.1 "Supported Features" in this appendix.