IMS DB Program Communication Block (PCB)IMSDB Communication with IMS System IMSDB PCB Mask
Defines the application view of the database.
The PCB is the program’s view of database.
It defines the database to be accessed and the scope of the program’s access.
The PCB defines the “Segment Sensitivity”.
If a PCB does not contain one or more of the segment in the database, the program is “Not Sensitive” to these segments.
A program’s view of the database may be the same or different than the “physical view” of the database.
The PCB specifies the segments to the application program which can have access and the processing authorization for each segment.
The PCB can define for each database (or each view of the database) accessed by the application program.
Each PCB corresponding block should be coded in the application program’s linkage section.
The PCB corresponding block also called as I/O area of PCB.
The data I/O areas are used for communication between IMS and the application.
Normally PCBs are two types
- Actual database PCBs
- Data Communication PCBs (IO PCB)
PCBs contain SENSEG (sensitive segment) and SENFLD (sensitive field) statements.
These statements allow specifying which segments and fields the application program can access.
If segment defined as a sensitive, it will be accessible to the application.
If segment not defined as a sensitive, it will be ignored by the application program.
PCB states processing option available (i.e. ADD, UPDATE, DELETE or READ).
The processing options allowed in a PCB are:
|I||To add a segment|
|R||To change (replace) a segment|
|D||To delete a segment|
|G||To read a segment|
|A||All except load|
|L||To load a database|
|LS||To load (data must be in key sequence)|
There is an additional option of ‘O’ for ONLY used with the get option when the application program is going to ‘read only’.
The ‘O’ option allows application program to read a segment even if another program is updating it.
‘GO’ may be used with ‘N’ as in ‘GON’ requesting that IMS notify the application program if a pointer error is encountered.
‘GO’ may be used with ’T’ as in ‘GOT’ requesting that IMS retry the call (once) if a pointer error is encountered.
Multiple of the options can be defined as in GI, meaning that the program can get and/or insert segments.
The processing option can be coded at the database level applicable to all sensitive segments.
It can be defined at the segment level; to vary the options by segment.
Another feature specified in the PCB is the processing sequence (i.e. secondary indexes).
DL/I INFILE statement extensions can be used to specify the PCB.
The access interface to IMS-DL/I is divided as two distinct interfaces:
- The IMS-DL/I engine interface
- The DATA step interface.
The IMS-DL/I engine interface uses only two types of PCBs:
- The Database (DB) PCB
- The Input/output (I/O) PCB
The engine interface uses the first DB PCB that matches the database specified in the access descriptor.
For updating, the engine interface to IMS-DL/I uses the I/O PCB for check pointing.
The I/O PCB is also used if the kind of DL/I processing environment, or region type, is BMP.
An I/O PCB is created when CMPAT=YES in the PSBGEN statement.
Using application program view of the database call can selectively access only the segments that are required by the ACCESS interface.
It is used in online transactions to process messages To/From the terminal and in batch programs to take checkpoint.
Additional IO-PCB/TP PCB can be used to send messages to terminals other than the terminal which initiated the program.
The IMS-DL/I DATA step interface can use any PCB.
The DATA step interface offers limited support for TP PCBs and message queue processing.
IMSDB Communication with IMS System IMSDB PCB Mask