DL/I considerations for non-CICS environments

In non-CICS environments, PSB scheduling is handled differently than in CICS® environments. The following sections describe PSB scheduling and the use of an alternate PSB at run time.

Understanding PSB scheduling

During program execution for IMS/VS, IMS™ BMP, and z/OS® batch, DL/I initialization schedules a single PSB. This PSB is the only one available for one batch job step or IMS transaction.

All EGL programs and non-EGL programs in the run unit must share the same PSB. The run unit includes all programs that you call or transfer to using a transfer statement of the form transfer to a program. For IMS BMP and z/OS batch, the run unit also includes all programs that you transfer to using a transfer statement of the form transfer to a transaction. For IMS/VS, the run unit for a program that you transfer to using a transfer statement of the form transfer to a transaction differs from that of the transferring program.

For IMS/VS, you specify the PSB that is to be used in the IMS system definition. The IMS PSB must have the same name as the program name. The PSB is scheduled at the beginning of the IMS transaction.

For IMS BMP and z/OS batch, you specify the name of the PSB to be used in the JCL used to run the batch job. The PSB is scheduled at the beginning of the IMS BMP or z/OS batch job.

Understanding commit points and the logical unit of work

A logical unit of work (LUW) ends whenever a commit point or a rollback occurs.

A commit point occurs when one or more of the following events happen:
  • The top-level program in a run unit ends successfully.

    For z/OS batch and IMS BMP, a run unit consists of all EGL programs and non-EGL programs that transfer control among themselves using a transfer or call statement. For non-EGL programs, this also includes any transfer that uses an OS XCTL macro or a call statement.

    For IMS/VS, a run unit is equivalent to a single transaction and consists of all EGL programs and non-EGL programs that transfer control among themselves using a transfer statement of the form transfer to a program or call statement. For non-EGL programs, this also includes any transfer that uses a call statement.

  • A program uses a converse I/O statement, and either of the following is set to 1:
    • converseVar.segmentedMode (defaults to 1 if the program is defined as segmented)
    • converseVar.commitOnConverse
    The best time for a commit point to occur is after terminal output and before the next terminal input. A commit point at terminal I/O synchronizes updates to the database and confirmation messages to the program user.
  • For z/OS batch and batch-oriented IMS BMP programs, a program transfers using a transfer statement of the form transfer to a transaction and the synchOnTrxTransfer generation option is set to YES for the program from which you are transferring
  • A program calls the sysLib.commit() function or the COMMIT service.

    For z/OS batch, EGL programs that do not use DL/I issue a commit point only if the program has made changes to an SQL table. A commit point does not occur for changes to an SQL table made by a non-EGL program.

    For IMS/VS and transaction-oriented IMS BMP programs (programs that scan a serial file associated with the I/O PCB), sysLib.commit() is ignored. A commit point occurs whenever there is a GU (get unique) call to the I/O PCB.

  • For IMS/VS and transaction-oriented IMS BMP programs, a program does a successful get unique to the I/O PCB.
A rollback occurs when one or more of the following events happen:
  • An EGL program calls the sysLib.rollback() function
  • A program ends because of an error condition
When a rollback occurs, all changes that were made to databases and recoverable files since the start of the LUW are backed out. Rollback does not affect DL/I databases in the VSE batch environment.

Using an alternate PSB at run time

The actual DL/I PSB name you use at run time might differ from the name you specified as the PSB name during program specification. However, for IMS/VS, IMS BMP, and z/OS batch, the PCB number, type, and order must match in the IMS PSB and the VisualAge® Generator PSB. Although the database structures must match, the database names do not have to match the name specified in your EGL PSB definition.

Using symbolic checkpoint and restart functions (z/OS Batch and IMS BMP Only)

When you run a batch program, you can use sysLib.commit() to periodically commit database updates. Alternatively, you can use EGLTDLI() to implement symbolic checkpoint and restart functions. Both sysLib.commit() and the symbolic checkpoint function commit database updates. However, the symbolic checkpoint function also enables you to save information, such as control totals or the key of the last database record that was processed when a commit point occurred. If the program does not complete successfully, it is backed out to the last commit point. If you have saved information using symbolic checkpoint, when you restart the program, you can restore the saved data using the DL/I restart (XRST) call. You can use this information to resume processing at the point in the database where processing stopped.

Related concepts:
DL/I database support

Related reference:
call
converse
DL/I considerations for CICS environments
EGLTDLI()
transfer

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.