The Parent/Child Hierarchy
In DL/I, the basic structure is the parent/child hierarchy. A parent segment can own one or more child segments. (Segments are similar to records in conventional file-oriented, versus database-oriented, processing.) A child segment, however, can have only one parent segment. Using the basic parent/child structure, you can extend the hierarchy to deeper levels (that is, a child segment can also be a parent and have child segments of its own).
Database Description (DBD)
The top-level definition of the segments and their relationships is known as the Database description (DBD). A DBD defines all of the segments, the fields for each segment, and all of the possible segment relationships for a given database.
Program Specification Block (PSB)
The second-level definition is known as the program specification block (PSB). The PSB defines the run-time database interface for an application.
Program Communication Blocks
Each PSB contains one or more program communication blocks (PCBs). Each PCB defines a subset of the segments and possible relationships found in a specific DBD. Different PCBs within the same PSB can reference different DBDs or multiple views of the same DBD, thereby allowing an application to access several physical databases.
Each PCB also maintains status information so that the application can check on the results of its function calls against a particular database.
Taken collectively, the PCBs within a given PSB define an application's view of the available data.
Defining DL/I Databases
The database administrator defines DBDs and PSBs (including PCBs) using special source statements. The DBA then compiles the prepared source files using the DBDGEN and PSBGEN utilities. Finally, the compiled DBDs and PSBs are input to another utility that merges and expands them to produce an object-form control table for each PCB and DBD that it references.
Executing DL/I Applications
When DL/I is invoked, it loads the application's DBD and PCB control tables and passes control back to the application. The application is then ready to start issuing DL/I function calls for database operations.

Figure 5. Basic DL/I components
|
Copyright © 2013 CA.
All rights reserved.
|
|