The following sections describe PSB scheduling and the use of an alternate PSB at run time.
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 by using a transfer to program statement. For IMS BMP and z/OS batch, the run unit also includes all programs that you transfer to by using a transfer to transaction statement. For IMS/VS, the run unit for a program that you transfer to by using a transfer to transaction statement differs from that of the transferring program.
For IMS/VS, specify the PSB 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, specify the name of the PSB in the JCL that runs the batch job. The PSB is scheduled at the beginning of the IMS BMP or z/OS batch job.
A logical unit of work (LUW) ends whenever a commit point or a rollback occurs.
For z/OS batch and IMS BMP, a run unit consists of all EGL programs and non-EGL programs that transfer control among themselves by 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 by using a transfer to program statement or call statement. For non-EGL programs, this includes transfers that use the CALL statement.
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 use get next to read 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.
The actual DL/I PSB name that you use at run time might differ from the name that you specified as the PSB name in your PSBRecord. For IMS/VS, the actual run time PSB is controlled by your IMS system definition and must match the name of the program. For IMS BMP and z/OS batch, you specify the actual run time PSB in the JCL that runs the program.
When your program sets the callInterface type to CBLTDLI, the number, type, and order of the PCBs within the PSBRecord must match the information in the runtime PSB. The database structures must also match, although the PCB record names do not need to match the names in the runtime PSB. For more information, see EGL support for runtime PSBs and PCBs.
When you run a batch program, you can use sysLib.commit to periodically commit database updates. Alternatively, you can use dliLib.AIBTDLI, dliLib.EGLTDLI, or vgLib.VGTDLI to implement symbolic checkpoint and restart functions.
Both sysLib.commit and the symbolic checkpoint function commit database updates. However, you can also use the symbolic checkpoint function 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 by using symbolic checkpoint, you can restore the saved data using the DL/I restart (XRST) call when you restart the program. Use this information to resume processing at the point in the database where processing stopped.
For more information about symbolic checkpoint and restart, see the manual for IMS application programmers.