EGL support for runtime PSBs and PCBs

To interact with IMS™ message queues, DL/I databases, and GSAM files, you customize EGL program elements as needed to generate a COBOL program that can access your organization's program specification blocks (PSBs) and program communication blocks (PCBs). Those blocks are hereafter called the runtime PSBs and runtime PCBs.

First, define the DLISegment record parts that you will reference in database PCB records (if any). Your primary, IMS-specific tasks are then as follows:
  1. Define a PSB record part. That part includes the set of PCB records that will be used when accessing IMS resources.
  2. In the program, make the PSB and PCB information available:
    • Declare a record that is based on the PSB record part
    • In the set-value block for the program, set the property @DLI, property field psb, to the name of the PSB record
Each PCB record is based on one of the following, predefined PCB record parts:
IO_ PCBRecord
Used to interact with an I/O PCB, which allows for input from a program or terminal and (if the input came from a terminal) allows for output to the same terminal. The I/O PCB also provides access to other IMS capabilities; for example, checkpoint and restart of a batch program.
ALT_PCBRecord
Used to reference a teleprocessing PCB other than the I/O PCB. This type of record allows your code to write output to a message queue that is associated either with another transaction or with a device other than the terminal associated with the I/O PCB. The runtime PCB may be either of the following kinds:
  • An alternate PCB, in which case the output occurs only if a commit occurs; or
  • An express alternate PCB, in which case the output occurs regardless of whether a commit or rollback occurs.
DB_PCBRecord
Used to reference a database PCB, which represents a DL/I database accessible from your program. The runtime database PCB specifies the data that can be accessed and the type of access that is valid.
GSAM_PCBRecord
Used to reference a GSAM PCB, which is used when a z/OS® batch or IMS BMP program accesses a serial file that acts as a root-only DL/I database.
The next list provides details on the runtime PSB in each of the target systems.
CICS®
The value of the PSB record property defaultPSBName is (by default) the name of the runtime PSB. EGL places that name in the psbName field of the system variable DLILib.psbData, but you can assign a different value to that library field. When your program attempts an I/O operation against a DL/I database, the value in psbName determines what PSB is used.

The system variable DLILib.psbDatahas a second field, psbRef. The initial value of the field is zero, which indicates that no PSB is scheduled. When CICS schedules the PSB, EGL runtime assigns to that field the address used to access the PSB. You can use the variable to "pass the PSB" (really, to pass a name and the related address) during a transfer or call.

Note: You must avoid writing logic that assigns any value to DLILib.psbData,psbRef.

An I/O PCB is valid in the runtime PSB (to allow for checkpoints in DL/I access, for example); alternate PCBs are tolerated; and DB PCBs are valid.

IMS BMP
The PSB parm in the runtime JCL identifies the runtime PSB used throughout the job step. Although you can customize the JCL at deployment time, EGL generates the default PSB parm value in the runtime JCL by assigning the value of the PSB record property defaultPSBName.
For an IMS BMP, the first runtime PCBs are as follows:
  1. The I/O PCB (created if your IMS system programmer sets CMPAT to YES when developing the PSBGEN job)
  2. An alternate PCB
  3. An express alternate PCB

DB and GSAM PCBs are also valid.

IMS/VS
The rules of IMS system definition ensure that the name of the main program is the name of the runtime PSB, which is available throughout the transaction.
The first runtime PCBs are as follows--
  1. The I/O PCB (created if your IMS system programmer sets CMPAT to YES when developing the PSBGEN job)
  2. An alternate PCB
  3. An express alternate PCB

DB PCBs are also valid.

If the value of build descriptor option workDBType is DLI (as is the default), set your last DB PCB for the EGL work database, which is identified by the name ELAWORK.

z/OS batch
The PSB parm in the runtime JCL identifies the runtime PSB used throughout the job step. Although you can customize the JCL at deployment time, EGL generates the default PSB parm value by assigning the value of the PSB record property defaultPSBName.

An I/O PCB is valid in the runtime PSB (to allow for checkpoints in DL/I access, for example); alternate PCBs are tolerated; and DB PCBs are valid.

EGL adjusts for the initial two or three I/O and teleprocessing PCBs if they are declared in the PSB record but are not present in the runtime PSB. This adjustment allows you to generate the same program across different environments. In relation to CICS, for example, EGL runtime ignores the initial I/O and alternate PCB records if they are present in the code but do not match the runtime PSB used in CICS.

Requirements for the PSB record part

You specify a call interface (AIBTDLI or CBLTDLI) by setting the program property @DLI , property field callInterface, and your choice affects the requirements for the PSB record part that you define:

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