Your program's view of the data
IMS uses two kinds of control blocks to enable application programs to be independent of your method of storing data in the database, the database description (DBD), and the database program communication block (DB PCB).
Database Description (DBD)
A database description (DBD) is physical structure of the database. The DBD also defines the appearance and contents, or fields, that make up each of the segment types in the database.
For example, the DBD for
the medical database hierarchy shown in Medical hierarchy example
describes the physical
structure of the hierarchy and each of the six segment types in the hierarchy: PATIENT, ILLNESS,
TREATMNT, BILLING, PAYMENT, and HOUSHOLD.
Related Reading: For more information on generating DBDs, see IMS Version 15.3 Database Utilities.
Database Program Communication Block (DB PCB)
A database program communication block (DB PCB) is a control block that defines an application program's view of the database. An application program often needs to process only some of the segments in a database. A PCB defines which of the segments in the database the program is allowed to access—which segments the program is sensitive to.
The data structures that are available to the program contain only segments that the program is sensitive to. The PCB also defines how the application program is allowed to process the segments in the data structure: whether the program can only read the segments, or whether it can also update them.
To obtain the highest level of data availability, your PCBs should request the fewest number of sensitive segments and the least capability needed to complete the task.
All the DB PCBs for a single application program are contained in a program specification block (PSB). A program might use only one DB PCB (if it processes only one data structure) or it might use several DB PCBs, one for each data structure.
Related Reading: For more information on generating PSBs, see IMS Version 15.3 Database Utilities.
The following figure illustrates the concept of defining a view for an application program. An accounting program that calculates and prints bills for the clinic's patients would need only the PATIENT, BILLING, and PAYMENT segments. You could define the data structure shown in the following figure in a DB PCB for this program.

A program that updates the database with information on patients' illnesses and treatments, in contrast, would need to process the PATIENT, ILLNESS, and TREATMNT segments. You could define the data structure shown in the following figure in a DB PCB for this program.

Sometimes a program needs to process all of the segments in the database. When this is true, the program's view of the database as defined in the DB PCB is the same as the database hierarchy that is defined in the DBD.
An application program processes only the segments in a database that it requires; therefore, if you change the format of a segment that is not processed, you do not change the program. A program is affected only by the segments that it accesses. In addition to being sensitive to only certain segments in a database, a program can also be sensitive to only certain fields within a segment. If you change a segment or field that the program is not sensitive to, it does not affect the program. You define segment and field-level sensitivity during PSBGEN.
Definition: Field-level sensitivity is when a program is sensitive to only certain fields within a segment.
Related Reading: For more information, see IMS Version 15.3 Database Administration.