IMS DB Program Communication Block (PCB) MaskIMSDB PCB IMSDB IO Area
PCB used to defines the application view of the database.
The PCB (Program Control Block) is the program’s view of database.
PCB Mask is the parameter used in the DL/I call.
The order of the PCB mask is second place in DL/I call.
PCB mask is always declared in the linkage section.
The PCB mask structure would be like below.
|29-32||Key Feedback Length|
|33-36||No. of Sensitive Segments|
|37-XX||Key Feedback Area|
PCB mask structure would be like below in cobol.
01 PCB-MASK. 05 DB-NAME PIC X(08). 05 SEGM-LEVEL PIC X(02). 05 STATUS-CODE PIC X(02). 05 PROCESS-OPTS PIC X(04). 05 RESERVED-DLI PIC S9(05). 05 SEGM-NAME PIC X(08). 05 KEYFB-LENGTH PIC S9(05). 05 NO-OF-SENS-SEGM PIC S9(05). 05 KEY-FB-AREA PIC X(n).
Lets discuss about each individual item in detail..
PCB name is the group variable for the PCB mask.
PCB name is used to refer the PCB mask in the program.
PCB-MASK refers the PCB name in the above structure.
Database name is the first field in PCB Mask.
Database name field is of 8 character length.
Database name provide the database which needs to be processed in the application program.
DB-NAME represents the database name in the above structure.
Segment level is the second field in PCB Mask layout.
Segment level field of type character and 2 bytes long.
Segment level contains segment hierarchy level indicator.
Segment level contains the level information of the segment that is going to be processed in application program.
When segment retrieved successfully, the level number stored in the segment level.
Segment level always contains maximum of 15; because the max number of levels allowed is 15 only.
SEGM-LEVEL refers the segment level in the above structure.
Status code is the third field in PCB Mask layout.
Status code field of type character and 2 bytes long.
Status code contains DL/I status code for the particular operation performed.
If the DL/I operation is successful, the Status code would be spaces.
If the DL/I operation is not successful, then the status code would be non spaces and pre-defined characters.
STATUS-CODE represents the status code in the above layout.
PROC options are the fourth field in PCB Mask layout.
PROC options field is the type character and 4 bytes length.
PROC options describes about the processing option that is going to be performed on the database.
PROC options are predefined options.
PROCESS-OPTS represents the PROC options in the above layout.
Reserved DL/I is the fifth field in the PCB Mask layout.
Reserved DL/I field is type of binary and 4 bytes length.
Reserved DL/I is a reserved area for IMS.
IMS uses it for internal linkage purpose of the application program.
RESERVED-DLI represents the reserved DLI in the above layout.
Segment name is sixth field in the PCB mask layout.
Segment name field of type character and 8 bytes length.
Segment name is known as segment name feedback area.
Segment name will be stored in this field after each DL/I.
SEGM-NAME represents the segment name in the above layout.
Key feedback length:
Key feedback length is seventh field in PCB mask layout.
Key feedback length of type binary data and 4 bytes length.
Key feedback length is used to report the length of the concatenated key of the lowest level segment processed during the previous call.
Key feedback length is used with key feedback area.
KEYFB-LENGTH represents the key feedback length in the above layout.
No. of Sensitive Segments:
No. of sensitive segments is the eight field in PCB mask layout.
No. of sensitive segments of type binary data and 4 bytes length.
No. of sensitive segments represents the count of sensitive segments in logical data structure.
No. of sensitive segments defines to which level the program is sensitive.
NO-OF-SENS-SEGM represents the no. of sensitive segments in the above layout.
Key Feedback Area:
Key feedback area is the last field in the PCB mask layout.
Key feedback area is varies the length from one PCB to another.
Key feedback area used to contain the longest possible concatenated key that can be used from application program for the database view.
Key feedback area will be filled by IMS after successful operation.
The corresponding length of Key feedback area will be filled in key feedback area length.
KEY-FB-AREA represents the key feedback area in the above layout.
IMSDB PCB IMSDB IO Area