IMS DB Tutorial Learn Quickly

PSB Statements:

The PSB statements include the following:

  • PCB – Defines the database to be accessed by the application program. The statement also defines the type of operations allowed by the application program. Each database requires a separate PCB statement. PSB generation allows for up to 255 database PCBs (less the number of alternate PCBs defined).
  • SENSEG – Defines the segment types to which the application program will be sensitive. A separate SENSEG statement is required for each segment type. If a segment is defined as sensitive, all the segments in the path from the root to that segment must also be defined as sensitive. Specific segments in the path can be exempted from sensitivity by coding PROCOPT=K in the SENSEG statement.
  • SENFLD – Defines the fields in a segment type to which the application program is sensitive. Can be used only in association with field-level sensitivity. The SENFLD statement must follow the SENSEG statement to which it is related.

PROCOPT- Defines the type of access to a database or segment. PROCOPTs can be used on the PCB or SENSEG statements.
Primary PROCOPT codes:

G — read only
R — replace, includes G
I — insert
D — delete, includes G
A — get and update, includes G, R, I, D
K — used on SENSEG statement; program will have key-only sensitivity to this segment
L — load database

Secondary PROCOPT codes:

E — exclusive use of hierarchy or segments
O — get only, does not lock data when in use
P — must be used if program will issue path call using the D command code
S — sequential (LS is required to load HISAM and HIDAM databases; GS gets in ascending sequence)

The PCB Mask:

  • The program that accesses an IMS DB through a PSB needs to define an access area to each of the PCBs in the PSB used.
  • The area is not updateable from within the program but instead provides a means for information about the current location of the database pointer and the status of the last call to be accessed by the program.
  • These PSB definitions go in the Linkage Section. For each PCB listed in the PSB, there will be one PCB mask defined and the order that these appear in the Linkage Section needs to match exactly with the list of PCBs in the PSB.

The format of each PCB mask will be as follows:

Database name – 8 bytes
Segment level number – 2 bytes
Status code – 2 bytes
Processing options – 4 bytes
Reserved – 4 bytes
Segment name – 8 bytes
Length of key feedback area – 4 bytes
Number of sensitive segments – 4 bytes
Key feedback area – variable

LINKAGE SECTION.

01 PCB1.
05 PCB1-DBDNAME PIC X(8).
05 PCB1-SEG-LEVEL PIC X(2).
05 PCB1-STATUS PIC X(2).
05 PCB1-PROCOPT PIC X(4).
05 FILLER PIC S9(5) COMP.
05 PCB1-SEG-NAME PIC X(8).
05 PCB1-KEYFB-LEN PIC S9(5) COMP.
05 PCB1-NUM-SENSEGS PIC S9(5) COMP.
05 PCB1-KEYFB PIC X(30).

Bufferpool Allocation – The DFSVSAMP dataset:

  • The DFSVSAMP dataset is used to allocate bufferpools for VSAM processing. IMS may build multiple VSAM pools. Each pool may have multiple subpools.
  • A VSAM pool is defined by a POOLID= statement. Subpools in the pool are defined by the VSRBF= statements which follow the POOLID= statement. The POOLID= statement is optional if only one pool is built. When creating multiple pools, a POOLID= statement for each pool must be included.
  • A subpool has a buffer size of 512, 1024, 2048, or a multiple of 4096 up to 32768. A subpool may have up to 32,767 buffers. Subpools may be used for data components only, index components only, or both data and index components.
  • The third positional parameter on the VSRBF= statement determines which type of components may use the subpool. An “I” indicates that only index components may use the subpool.
  • A “D” indicates that either data or index components may use the subpool. If the parameter is not specified, it defaults to “D”. If there are any subpools defined with the “I” parameter, no subpool in the pool will be used for both index and data components.

The following are some sample pool specifications:

  1. POOLID=VSM1
  2. VSRBF=4096,3000 ==> Since I is not specified for the third positional parameter in any
  3. VSRBF=12288,2000 ==> VSRBF= statements, all of these subpools may be used for both
  4. VSRBF=32768,12 ==> index and data components.
  5. POOLID=VSM1 ==> Since the second VSRBF statement builds an index subpool, the first
  6. VSRBF=4096,3000,D ==> and third subpools may only be used for data components.
  7. VSRBF=12288,2000,I ==> The second subpool may only be used for index components.
  8. VSRBF=32768,12,D
  9. POOLID=VSM1
  10. VSRBF=4096,3000 ==> The first and third subpools may only be used for data components.
  11. VSRBF=12288,2000,I ==> The second subpool may only be used for index components.
  12. VSRBF=32768,12
  13. INSYNC

utility designed to aid in the manipulation of IMS databases. It is a menu-driven interactive system and is designed to run under ISPF/PDF using panels and function keys similar to those used in ISPF.

InSync Parameters screen:
IMS System ==> Enter valid subsystem
Checkpoint frequency ===> 20

Use dynamic PSBs ===> YES
DBRC ===> N
IRLM ===> N
IRLMNAME ===>
AGN ===>
NBA ===> 20
OBA ===> 10

Refresh variable values from Install ===> N

IMS RESLIB

Dsname 1 ===>
Dsname 2 ===>
Dsname 3 ===>
IMS DALIB
Dsname ===>
IMS DFSVSAMP
Dsname ===>
IMS Dynamic ACB Library
Dsname ===>
IMS RECON DATASETS
Dsname 1 ===>
Dsname 2 ===>
Dsname 3 ===>
IMS Override datasets
DBDLIB ===>
PSBLIB ===>

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.