DB2 & IMS

Preparing for IMS 24x7 Availability

5 Pages

The PSB

The PSB describes a program’s use of logical terminals and databases through the use of one or more Program Communication Blocks (PCBs), which describe the logical terminals (LTERM) and IMS databases the program can access. PSBs are defined in macros assembled using a PSBGEN process.

Of the different types of PCBs, a TYPE=TP, known as an I-O PCB, is usually used to receive and send information to a terminal. For BMPBATCH programs, it will be used for issuing checkpoints. An I-O PCB will always be provided to a BMP program, regardless of what’s specified in the PSB, so it isn’t necessary to modify the PSB except as documentation or as part of a company standard. If the PSB has an I-O PCB already defined, or COMPAT=YES is specified on the PSBGEN macro, IMS already sends an I-O PCB as the first storage area to the batch program, so no program changes are required. The COMPAT= parameter is used only by batch jobs; BMP jobs ignore it. Figure 2a shows an example of a PSB for a typical DLIBATCH program without an I-O PCB. Figures 2b and 2c show sample PSBs with I-O PCBs.

We had a secondary issue involving the PROCOPT parameter of a database PCB. PROCOPT= defines the processing options associated with the PCB. Because the batch trail included steps to delete, define and reformat the database, a PROCOPT=L (for INITIAL LOAD) was specified. PROCOPT=L isn’t permitted for a BMP, so the processing was changed to delete just the segments in the database, not delete and define a new database, and the PARM was changed to PROCOPT=A (meaning GET, INSERT, REPLACE DELETE). You should review the PCBs for other similar incompatible macro parameters.

 

The Programs

The MBR= parameter of the BMP proc PARM identifies the executable load module. The PSB= parameter identifies the PSB used by the load module. Since IMS will always send an I-O PCB to the program, the storage area for that block must be accounted for as the first data area in the program’s LINKAGE SECTION and with an ENTRY statement in the beginning of the PROCEDURE DIVISION. Although including the data area names on the PROCEDURE DIVISION is documented, use of the ENTRY statement is a more common coding technique (see Figure 3).

 

Checkpoints are used to commit updates and free segment locks for access by other programs. Since DLIBATCH jobs had exclusive control of the databases, they may not have had checkpoints coded. BMPs will be sharing resources with online IMS transactions and, possibly, other BMPs, so periodic checkpoints are required to avoid database locking and unnecessary resource retention. If checkpoints already exist, the frequency may need to be adjusted to release resources more often for a BMP. Guidelines for setting checkpoints can be found in the IMS Application Programming: Design Guide.

The APPLCTN Macro

5 Pages