COMMIT() |
DEVELOPER |
|
|
Purpose |
COMMIT() is a transaction processing command which requests an immediate commit (checkpoint) of the database. |
Syntax |
#variable = COMMIT() |
Operation |
#variable is a numeric scratch variable. This is set to zero if the commit is successful. |
Remarks |
A COMMIT() is effective only for previously written records, and not for any record currently being processed. Potential problems involving application with extremely large transactions on systems with limited rollback space can be alleviated by specifying an iteration counter. PROIV issues a COMMIT() command after processing the specified number of iterations. The use of the iteration counter precludes the possibility of rollback after the first group of records has been written. A COMMIT() command used in a PROIV Global screen (WINDOW) function directs the database to close all open ODBC (e.g. SELECT) cursors. If both of the following conditions are TRUE then the ODBC driver will return error ‘cursor does not exist’ when a SQL UPDATE is executed:
Oracle (e.g. SELECT) cursors are not explicitly closed by COMMIT() calls. A COMMIT() command on Oracle clears all cursors so the fetch for the next record on the master file fails and this results in an Oracle error: 'ORA-01002: fetch out of sequence. ' Please refer to Oracle documentation to determine the effect of an explicit COMMIT() on open Oracle cursors. The COMMIT() does not necessarily close the cursor, it depends on the type of cursor. |
Example |
IF $COMPLETE = ‘Y’, ‘y’ |
PROIV normally issues a COMMIT when a function exits. |
Topic ID: 520032