The sysLib.commit() system function saves updates that were made to recoverable resources such as certain files and databases.
In most cases, EGL performs a single-phase commit that affects each recoverable manager in turn. In most cases, this releases the read position and the update locks in any file or databases. For information about when an implicit commit takes place, see Logical unit of work. You can enhance performance by avoiding unnecessary use of sysLib.commit(). For more information, see "Compatibility" later in this topic. Also see discussions about segmentation for various UI technologies in the related reference links at the end of this topic.
Syntax
sysLib.commit( )
Compatibility
| Platform |
Issue |
| Java™ generation |
- sysLib.commit() commits changes to relational
databases and MQ message queues, as well as changes made to remote server programs that were called using a client-controlled unit of work. |
| CICS^®^ for z/OS^®^ |
- sysLib.commit() results in a CICS SYNCPOINT,
which performs a two-phase commit that is coordinated across all resource managers.
- A generated Java program also saves the updates
done by a remote, CICS-based COBOL program (including updates to CICS recoverable files), but only when the call to the remote COBOL program involves a client-controlled unit of work. For more, refer to the EGL Generation Guide information on luwControl.
- Remotely called batch programs (programs that reside on a different system
than the invoking program) can invoke sysLib.commit(). If you set the luwControl attribute to SERVER, the commit functions normally. If you set the attribute to CLIENT, EGL throws a RuntimeException.
- Depending on the CICS file definition and file type, a file can be a
recoverable resource.
|
| COBOL generation |
When the cursorWithHold option
is used during relational database access (SQL), the read position and the
update locks might not be released; for more information, see "prepare" and
"open."
|
| IMS™ BMP |
- For a transaction-oriented BMP, sysLib.commit() is
ignored. For details on when an implicit commit occurs, see "Logical unit of work."
- For a batch-oriented BMP, sysLib.commit() results
in a DL/I basic CHKP call, which performs a two-phase commit that is coordinated across all resource managers. The contents of psbData.psbName are used as the checkpoint identifier on the CHKP call.
- Output written to a serial file associated with a non-express alternate
PCB is recoverable.
- GSAM files are not recoverable when used with basic CHKP. To make GSAM
files recoverable, use dliLib.AIBTDLI(), dliLib.EIBTDLI(), or vgLib.VGTDLI() to issue a DL/I symbolic checkpoint call.
|
| IMS/VS |
sysLib.commit is ignored in
this environment. For details on when an implicit commit occurs, see "Logical
unit of work."
|
| iSeries™ COBOL |
If the program issued SQL statements, sysLib.commit() results
in an SQL COMMIT WORK. If the program has not issued SQL requests, sysLib.commit() results
in the equivalent of an iSeries COMMIT command. For details on when an implicit
commit occurs, see "Logical unit of work."
|
| MQ message queues |
- Message queue updates are recoverable only if the includeMsgInTransaction property
is set to YES in the MQRecord part.
- Both message get and add statements
are affected by commit() and rollback() for recoverable messages. If a rollback() is issued following a get for a recoverable message, the message is placed back on the input queue so that the input message is not lost when the transaction fails to complete successfully. Also, if a rollback() is issued following an add for a recoverable message, the message is deleted from the queue.
|
| z/OS Batch |
- If the program has not specified a PSB but has issued SQL requests, invoking sysLib.commit() results
in an SQL COMMIT WORK.
- If the program has specified a PSB, invoking sysLib.commit() results
in a DL/I basic CHKP call, which performs a two-phase commit that is coordinated across all resource managers. The contents of psbData.psbName are used as the checkpoint identifier on the CHKP call.
- GSAM files are not recoverable when used with basic CHKP. To make GSAM
files recoverable, use dliLib.AIBTDLI(), dliLib.EIBTDLI(), or vgLib.VGTDLI() to issue a DL/I symbolic checkpoint call.
|