IMS Setup for Applications


Before you can run an application program under IMS, you must define and generate the control blocks that are described in the following sections.

IMS Control Blocks

Before executing an application program under IMS, you must describe that program and its use of logical terminals and logical data structures through a program specification block (PSB) generation, using the PSB Generation utility. The PSB contains one PCB for each DL/I database (logical or physical) the application program will access. The PCBs specify which segments the program will use and the kind of access (retrieve, update, insert, delete) for which the program is authorized. The PSBs are maintained in one or more IMS system libraries called a PSBLIB library.

All IMS databases require a database descriptor block (DBD) created to have access to any IMS databases. The details of these control blocks are described in "Generating IMS Control Blocks" on page 233. The DBD is assembled into a system library called a DBDLIB.

The IMS system needs to combine and expand the PSB and DBD control blocks into an internal format called application control blocks (ACBs). The Application Control Blocks Maintenance utility is used to create the ACBs.

For a DB batch environment, the ACB blocks are either built dynamically at step initialization time (as specified in the DLIBATCH procedure) or the ACB blocks are built by running the Application Control Blocks Maintenance utility (as specified in the DBBBATCH procedure). In an online environment, the ACB blocks need to be created before an application can be scheduled and run. The Application Control Blocks Maintenance utility is run offline and the resulting control blocks are placed in an ACB library (IMS.ACBLIB).

The IMS system needs to access these control blocks (DBDs and PSBs) in order to define the application's use of the various IMS resources required. The environment in which the application program is executed determines how IMS accesses those control blocks. See Figure 14-9 on page 234 for an overview of the processing.

Figure 14-9. IMS Control Block Generation and Usage


The Transaction Processing (TP) PCB

Besides the default TP PCB (also known as the I/O PCB), which does not require a PCB statement in a PSB generation, additional TP PCBs (sometimes called alternate PCBs) can be coded. These TP PCBs are used to insert output messages to:

  • LTERMs other than the LTERM that originated the input message. A typical use of an alternate PCB is to send output to a 3270 printer terminal.

  • A non-conversational transaction.

  • Another USERID.

Figure 14-7 is an example of a TP PCB.

Figure 14-7. Sample TP PCB
 01 TPPCB.       02 LTERM        PICTURE X(8).     Logical Terminal Name       02 FILLER       PICTURE XX.       Reserved       02 STATUS-CODE  PICTURE XX.       Status Code 

The destination of the output LTERM can be set in two ways:

  • During a PSB generation by specifying the LTERM or TRANNAME in an alternate PCB.

  • Dynamically by the MPP during execution, by using a change call against a modifiable alternate PCB.

The method used depends on the PCB statement.

The PCB Statement

This is the only statement required to generate an alternate PCB (multiple occurrences are allowed). Its format is:

 PCB TYPE=TP, LTERM=name, MODIFY=YES 

Table 14-4 describes the possible keywords.

Table 14-4. TP PCB Keywords

Keyword

Description

TYPE=TP

Required for all alternate PCBs.

LTERM=name

Specifies that this PCB is pointing at a known LTERM defined in the IMS system. The name is optional.

MODIFY=YES

If MODIFY is specified, the LTERM name can be changed by a change call within the application program.

Note: If MODIFY=YES is specified, the MPP must specify a valid alternate output LTERM with a change call before inserting any message using this PCB.


The Database PCB

The DB PCB for a BMP program or MPP can be simple or complex. The DB PCB has two more processing intent options than the TP PCB. These additional processing intent options can be specified with the PROCOPT= keyword of the PCB or the SENSEG statement or both.

Figure 14-8 is an example of a simple DB PCB:

Figure 14-8. Example of a Simple DB PCB
 PCB TYPE=DB,                                           X DBDNAME=EXCEPTA,                                       X PROCOPT=A,                                             X KEYLEN=24                                              X SENSEG NAME=QB01,                                      X PARENT=0 

In Figure 14-8:

TYPE=DB

Required for all DB PCBs.

DBDNAME=name

The database that this PCB is pointing to.

PROCOPT=

Application processing intent options.

You can use five options of the PROCOPT parameter (in the DATABASE macro) to indicate to IMS whether your program can read segments in the hierarchy, or whether it can also update segments. From most restrictive to least restrictive, these options are:

G

Your program can read segments.

R

Your program can read and replace segments.

I

Your program can insert segments.

D

Your program can read and delete segments.

A

Your program needs all the processing options. It is equivalent to specifying G, R, I, and D.


Related Reading: There are more processing options than are listed here. For more information about all the processing options, see IMS Version 9: Application Programming: Design Guide.

KEYLENGTH=

The length of the concatenated keys for this database.

SENSEG

The SENSEG statement is used in a DB PCB statement to define a hierarchically related set of data segments.

Related Reading: For more information about generating these control blocks, see IMS Version 9: Utilities Reference: System.

Generating IMS Control Blocks

In addition to database PCBs, a PSB for MPPs or BMP programs contains one or more TP PCBs.

The order of the PCBs in the PSB must be:

  1. Data communication PCBs

  2. Database PCBs

  3. GSAM PCBs (not allowed for MPPs)

One TP PCB (an I/O PCB) is always automatically included by IMS at the beginning of each PSB of an MPP or BMP program. This default TP PSB is used to insert output messages back to the originating LTERM or USERID and can also be used for system service calls such as CHKP.

Generating PSBs

The PSBGEN statement is basically the same as a DB PCB statement. The only real differences are that the IOEROPN= parameter must be omitted and the COMPAT=YES parameter is ignored.

Generating ACBs

Before PSBs and DBDs can be used by the control region, they must be expanded to an internal control block format. This expansion is done by the Application Control Blocks Maintenance (ACBGEN) utility. The expanded control blocks are maintained in the IMS.ACBLIB library. This is a standard z/OS partitioned data set.

An ACBGEN procedure is placed in IMS.PROCLIB during IMS system definition.

Note:

Multiple BUILD statements can be coded for both DBDs and PSBs and, if IMS.ACBLIB is already populated, the order does not matter. If IMS.ACBLIB is not populated, specify the DBDs first. Better yet, specify only PSBs (not DBDs) and let the ACBGEN utility find and use the correct DBDs. If you want to completely populate IMS.ACBLIB from a PSBLIB and a DBDLIB, use just the single statement BUILD PSB=ALL. The ACBGEN utility knows what to do with the DBDs.




Introduction to IMS. Your Complete Guide to IBM's Information Management System
An Introduction to IMS: Your Complete Guide to IBMs Information Management System
ISBN: 0131856715
EAN: 2147483647
Year: 2003
Pages: 226

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net