The primary purpose of the configuration variable 4GL_COMMIT_COUNT is to provide for applications that must communicate with a transaction-oriented database but have not explicitly coded transactions into their COBOL application.
The configuration variable A_ODBC_ALTERNATE_COMMIT_LOGIC determines how the interface will respond to the setting of 4GL_COMMIT_COUNT. When A_ODBC_ALTERNATE_COMMIT_LOGIC is set to 0 or FALSE (the default), the value of 4GL_COMMIT_COUNT is checked only at startup. The interface will issue a commit when the criteria set by 4GL_COMMIT_COUNT is met, regardless of the current transaction state.
When A_ODBC_ALTERNATE_COMMIT_LOGIC is set to 1, the value of 4GL_COMMIT_COUNT is checked after each WRITE, REWRITE, DELETE, or UNLOCK operation. A commit is issued, however, only if the run time is not currently in a transaction. For example
Each WRITE operation is committed to the database immediately. This prevents an application from being able to rollback a WRITE.