The Loading Process [ HP SYSTEM DICTIONARY XL UTILITIES-Part 1 SDDBD ] MPE/iX 5.0 Documentation
HP SYSTEM DICTIONARY XL UTILITIES-Part 1 SDDBD
Chapter 4 The Loading Process
LOADING OF IMAGE DEFINITIONS
The process described below assumes that OPTION = PROMPT was specified.
When other values are specified (for example, OPTION = SKIP), operation
is identical to responding with an appropriate answer at the option
prompt for each conflict (for example, "S" for OPTION = SKIP). When
loading the database definitions, SDDBD does not load any of the
image-class related information, because the IMAGE intrinsics do not
provide the information.
IMAGE Database Name
SDDBD will load the database definitions as image-database entities in
the System Dictionary. For databases, a conflicting entity is defined as
an entity whose definition is incompatible to the existing definition in
the dictionary. Hence, SKIP, REPLACE, TERMINATE, and NEW options are
effective only for the databases that have an incompatible definition in
the dictionary.
On the other hand, if a compatible database is found in the dictionary,
the old definition is automatically used, and the following message is
issued:
Compatible definition for database ! used (SDWARN 2508)
When a database is found which is incompatible with an existing System
Dictionary definition, the result is determined by the value of the
OPTION parameter of the IMAGE command. If the value for this parameter
is PROMPT, however, then the following message and prompt are issued:
Incompatible definition exists for database ! (SDWARN 2509)
Skip, Replace, enter New name, or Terminate (S/R/N/T) ?
A response of "S" keeps the old entity and continues the loading process.
If an "R" is entered, the new entity replaces the old. Entering a "T"
terminates the loading process. If the user responds with "N", the
following prompt to rename the IMAGE database is issued:
New Image database name >
The name entered must be unique in the version and domain with which the
System Dictionary is opened. If the name already exists, the above
message is displayed and the option prompt reissued. The option prompt
is also reissued if the user enters a [[RETURN]]. The name will replace
the old entity name, and the old entity name will become the value for
the image-alias attribute.
IMAGE Data Items
SDDBD will load the data items defined in the IMAGE database as element
entity type in the System Dictionary. The attributes initialized for
each definition are:
IMAGE/V attribute System Dictionary attribute
item type element-type
sub-item length byte-length
sub-item count count
The byte-length value is derived from the sub-item length as follows:
Item type Sub-item length Byte-length
-----------------------------------------------------
D,I,J,K,R n 2*n
U,X,Z n n
P n n / 2
In addition, the sensitivity and display-length attributes are also set.
The sensitivity attribute is set to the value specified in the IMAGE
command. The display-length attribute, which is used for display
information on output, is derived from the Item Type and Sub-item Length
IMAGE information as follows:
Item Type Sub-item length Display-length
------------------------------------------------
I,J,K 1 4
I,J,K 2 9
I,J,K >= 4 18
D,R 2 6
D,R, >= 4 10
U,X,Z n n
Compatible and Incompatible Data Items. For data items, a conflicting
entity is defined as an entity which has an incompatible definition which
already exists in the dictionary. Hence, SKIP, REPLACE, TERMINATE, and
NEW options are effective only for the data items that have an
incompatible definition in the dictionary.
On the other hand, if a compatible data item is found in the dictionary,
the following message is issued, and the old definition is automatically
used:
Compatible definition for element ! used (SDWARN 2502)
For elements, a compatible definition is defined as an old definition
with the same name such that its values for those attributes specified in
the COMPATIBILITY-LEVEL option of the IMAGE command match those of the
new definition.
Each time a data item in the IMAGE database is found to be incompatible
with an existing System Dictionary element, the result is determined by
the value of the OPTION parameter of the IMAGE command. If the value for
this parameter is PROMPT, however, then the following message and prompt
are issued:
Incompatible definition exists for element ! (SDWARN 2503)
Skip, Replace, enter New name, or Terminate (S/R/N/T)? >
A response of "S" will skip the current element. If "R" is given, the
old entity is replaced by the new one. If "T" is entered, the loading
process terminates. If the user enters "N", the following prompt is
displayed:
New primary element name >
The new name must be a unique element name. The IMAGE/V name is entered
as an image-alias attribute for the new element. If a [[RETURN]] is
entered at the prompt, the option prompt is again displayed.
IMAGE Data Sets
After loading the definitions of the data items into System Dictionary,
SDDBD will load the definitions of the data sets in the IMAGE/V database.
The utility first creates an entity of type IMAGE-DATASET with the
IMAGE/V data set name. When creating IMAGE data set entities, the
following attributes are initialized:
Attribute Value obtained from
sensitivity Value of sensitivity parameter of the IMAGE
command
image-dataset-type IMAGE/V database root file
Compatible and Incompatible Data Sets. For IMAGE data sets, a compatible
definition is defined to be an old definition that contains the same
IMAGE data set type, and data item composition. In order to see if an
old definition has the same composition as the new definition, all
records related to the data set with the contains relationship class will
be examined. For each such record, SDDBD examines if the list of data
items related to the record is the same as the list of all data items
contained in the data set (new definition). If so, then the old
definition is said to have the same data item composition as the new. In
addition, for master sets, SDDBD sees if the old definition has the
image-dataset key element relationship with the search item. Only when
all these conditions are met, is the old definition compatible with the
new.
If a compatible data set definition is found in the system dictionary,
the following message is issued, and the old entity is automatically
used:
Compatible definition for data set ! used (SDWARN 2504)
If an incompatible definition is found then the following message and
prompt are issued by SDDBD:
Incompatible definition exists for data set ! (SDWARN 2505)
Skip, Replace, enter New name, or Terminate (S/R/N/T)? >
If "S" is specified, the old definition is used, and the new data set
definition is not added. However, SDDBD will still attempt to create a
record definition with the data set name, and all relationships involving
the data set. If "R" is entered, the old entity is replaced with the
new. If "T" is entered, the loading process terminates immediately. If
the user enters "N", the following prompt is issued:
New primary data set name >
The new name must be unique. The IMAGE/V data set name will be entered
as the attribute value for the image-alias attribute. If a [[RETURN]] is
entered, the option prompt is reissued.
After the successful loading of the new IMAGE data set definition or the
discovery of a compatible definition, SDDBD creates the image-database
contains image-dataset relationship. The following table shows how the
attributes are initialized:
Attribute Value assigned
sensitivity From user command
capacity That of IMAGE data set
image-alias That of IMAGE data set, if a new name was given
for the data set
blocking-factor That of the IMAGE data set
For each manual master data set, the image-dataset key element
relationship is created with the data set's search item.
Records
After loading an IMAGE data set definition, SDDBD creates a record
entity. Note that when processing the data set definition, if a
compatible definition was found, no record is created. In fact, SDDBD
assumes that the existence of a compatible data set definition implies
the existence of a compatible record definition. Also note that even if
a conflicting data set definition is skipped, the corresponding record
definition will be created.
For record definitions, a compatible definition is defined to be an old
definition that has the same byte-length and the same element
composition.
The record being created has the same entity name as the data set. As
with data items and data sets, when an incompatible record definition is
found in the dictionary, the following message and prompt are issued:
Incompatible definition exists for record ! (SDWARN 2507)
Skip, Replace, enter New name, or Terminate (S/R/N/T)? >
If you respond with "S" to the option, no record definition is created,
but all relationships involving the record are established. If you
respond with "R", the old definition is replaced with the new. If you
respond with "N", the following prompt is issued:
New primary record name >
The new name must be unique within the current domain and version. The
original record name (entity name of the data set) is assigned to the
image-alias attribute. The record definition has the following
attributes associated with it:
Attribute Value assigned
sensitivity From user command
byte-length That of the IMAGE data set
After loading the record definition, the IMAGE-DATASET contains RECORD
relationship is created. Furthermore, with each data item belonging
to the data set, the RECORD contains ELEMENT relationship is
created. When creating the RECORD contains ELEMENT relationship, the
back-reference-flag attribute is initialized with the value of the
BACK-REFERENCE parameter.
IMAGE Paths
For each access path in the database, SDDBD creates the image-dataset
element image-dataset image-database CHAINS relationship. The first
IMAGE-DATASET is the detail data set. The first element is the search
item. The second element is the sort item. If no sort item exists for
the path, the blank entity (/) is assigned to the second element. The
second IMAGE-DATASET is for the master data set, and the IMAGE-DATABASE
is the database. If the path is a primary path, then the primary-flag
attribute is set to true.
MPE/iX 5.0 Documentation