The Loading Process [ HP SYSTEM DICTIONARY XL UTILITIES-Part 2 SDDBC ] MPE/iX 5.0 Documentation
HP SYSTEM DICTIONARY XL UTILITIES-Part 2 SDDBC
Chapter 4 The Loading Process
Schema Generation Process
This chapter describes how SDDBC creates the schema based on definitions
in the System Dictionary. The description is organized in a fashion that
follows the overall schema structure. If you are not familiar with
schema structure, refer to the section in the Turbo IMAGE/V Reference
Manual (32215-90050) entitled "Defining a Database."
Database
SDDBC searches the IMAGE-DATABASE entity for the database specified in
the IMAGE command. This entity is used as the database name in the
schema. The attribute value of image-database-type is used to determine
if the database is a TurboIMAGE database.
Passwords
To get the user classes and passwords for the database, SDDBC searches
the IMAGE-DATABASE contains IMAGE-CLASS relationships. The user class
numbers and passwords are obtained from the attributes class-number and
password of the image-class entity. SDDBC sorts the password information
by class-number and writes the user class numbers and passwords to the
password part of the schema file.
Items
To get all the items in the database, SDDBC first searches all the data
sets related to the specified database by finding the IMAGE-DATABASE
contains IMAGE-DATASET relationships. The record layout of the
IMAGE-DATASET is then found by using the IMAGE-DATASET contains RECORD
relationships. There can be more than one record layout per data set.
If there is more than one layout for the data set, SDDBC uses the primary
record layout which is indicated by the IMAGE-DATASET contains RECORD
attribute primary-record. If there is more than one record layout and
none of them are the primary record layout, then SDDBC will use the first
record layout as retrieved from the dictionary. If there is more than
one primary record layout, SDDBC will use the first primary record as
retrieved from the dictionary. The items are obtained by following the
RECORD contains ELEMENT relationships. The attribute element-type of the
RECORD contains ELEMENT relationship is used as the type designator of an
item definition. If the attribute back-reference is true, then the
element-type attribute is retrieved from the element entity itself.
The element entities are then retrieved, and attribute count is used as
sub-item count, and attribute byte-length is used to derive the sub-item
length as follows:
Item type Byte-length Sub-item length
D,I,J,K,R n n + 1 / 2
U,X,Z n n
P n 2 * n
The sub-item length of the data item is rounded to an integral number of
words in length regardless of the type designator and its unit of
measure. This is to conform with the standards set by IMAGE/V.
To get the read and write class lists for an item definition, SDDBC
searches the ELEMENT contains IMAGE-CLASS relationships. The class list
is appended next to the data item in the item part of an item definition.
SDDBC then writes all the data items in sorted order (of item names) to
the item part of the schema file.
Data Sets
SDDBC gets the data sets and all related data items within each data set
from System Dictionary as described previously under "Items" . Based
upon the ORDER option, the data sets are generated in the order of either
AUTOMATIC, MANUAL, and DETAIL, or in the order of retrieval. If data
sets are generated by set type order, within each type they are generated
in the order they were retrieved. The order of the items in the data set
is determined by the relationship-position attribute in the RECORD
contains ELEMENT relationship. The search item, master set name and sort
item name of a DETAIL data set is obtained from five-way chain
relationships image-dataset, element, element, image-dataset,
image-database. The attribute primary-flag in this chain relationship
indicates whether it is a primary path or not. Through this chain
relationship, the path count for the search item in MASTER sets is also
obtained. The search item of a MANUAL master set is identified by the
image-dataset key element relationship.
To get the read and write class lists for each data set, SDDBC searches
the IMAGE-DATASET contains IMAGE-CLASS relationships. The class list is
appended next to the data set name in the set part of the schema.
SDDBC supports TurboIMAGE creations by generating the device class if
defined in the dictionary for the data set header line. This information
is retrieved from the IMAGE-DATASET uses DEVICE-CLASS relationship.
The capacity of a data set is obtained from the attribute capacity of
IMAGE-DATABASE contains IMAGE-DATASET.
MPE/iX 5.0 Documentation