When you change resources that are categorized as non-recoverable (such
as serial files on Windows® 2000), your work is relatively permanent;
neither your code nor EGL runtime services can simply rescind the changes.
When you change resources that are categorized as recoverable (such
as relational databases), your code or EGL runtime services either can commit
the changes to make the work permanent or can rollback the changes to return
to content that was in effect when changes were last committed.
Recoverable resources are as follows:
- Relational databases
- CICS® queues
and files that are configured to be recoverable
- MQSeries® message
queues, unless your MQSeries record specifies otherwise, as described
in MQSeries support
A
logical unit of work identifies input operations that are either
committed or rolled back as a group. A unit of work begins when your code
changes a recoverable resource; and ends when the first of these events occurs:
- Your code invokes the system function sysLib.commit or sysLib.rollback to
commit or roll back the changes
- EGL runtime services performs a rollback in response to a hard error that
is not handled in your code; in this case, all the programs in the run unit
are removed from memory
- An implicit commit occurs, as happens in the following cases--
- A program issues a show statement.
- The top-level program in a run unit ends successfully, as described in Run
unit.
- A Web page is displayed, as when a PageHandler issues a forward statement.
- A program issues a converse statement and any
of the following applies:
- You are not in VisualAge® Generator compatibility mode, and the
program is a segmented program
- ConverseVar.commitOnConverse is set to 1
- You are in VisualAge Generator
compatibility mode, and ConverseVar.segmentedMode is
set to 1