The --- COMMIT MODE pdf has four valid values. (You may see AUTOCOMMIT as
well, but it's not implemented yet):
MANUAL - Appx will not automatically COMMIT your changes. You must use
the COMMIT statement.
END - Appx COMMITs your changes when the process ends.
PCF CYCLE - Appx COMMITs your changes as you progress from PCF record to
PCF record.
COMPATIBLE - Appx COMMITs your changes as soon as -all- record locks are
released.
Appx never automatically issues a ROLLBACK. Based on the structure of your
application, there may be other places where you want to COMMIT a transaction.
That's what the COMMIT statement is for. One thing to keep in mind is that the
frequency of COMMITs will affect performance. The more COMMITs you do, the
slower your application will be. For interactive processes, you can probably
ignore the performance issue, but for batch-mode operations, COMMITing too
often can really slow things down.
Another issue to be aware of is that AppxIO files do not support transaction
processing. If you ROLLBACK a change to an RDBMS-hosted file, any changes made
to AppxIO will not be rolled back. Related to this is the issue of visibility.
Changes made to an RDBMS-hosted file are invisible to other users until they
are committed. Changes made to an AppxIO-hosted file are visible immediately.
Appx also supports save-points. A save-point is a partial transaction. You
mark the beginning of a save-point with the SAVEPNT statement - the only
argument is a name of your choosing. Executing a SAVEPNT tells the RDBMS that
it should write a marker into the current transaction. If you find that you
want to ROLLBACK part of a transaction, you can specify a save-point name in
the ROLLBACK statement. The transaction is still open and you can commit other
changes, but changes made since the save-point was created are lost. |