The Loading Process [ HP SYSTEM DICTIONARY XL UTILITIES-Part 3 SDVPD ] MPE/iX 5.0 Documentation
HP SYSTEM DICTIONARY XL UTILITIES-Part 3 SDVPD
Chapter 4 The Loading Process
The Loading Process
Loading VPLUS/V Definitions
The process described below assumes that OPTION = PROMPT was specified.
Operation when other values are specified is obvious from the
explanations below because, in a sense, the PROMPT option includes all
other options. For example, OPTION = SKIP is identical to specifying "S"
at the option prompt for each conflict.
VPLUS/V Forms File
At first, SDVPD creates an entity of type FORMSFILE, using the name of
the VPLUS/V forms file. Each formsfile is used in creating the
subsequent FORMSFILE contains FORM relationship. If the entity already
exists, the following message and prompt are issued:
Forms file ! already defined in dictionary (SDWARN 3001)
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. "T" terminates
the loading process immediately. If the user responds with an "N", the
following prompt to rename the forms file is issued:
New forms file name >
The name entered must be unique in the version and domain with which
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]] at the new name prompt.
The name will replace the old entity name, and the old entity name will
become the value for the vplus-alias attribute.
Forms
SDVPD will load the definitions of the forms in the forms file selected
by the user. The utility will create an entity of type FORM. In
addition, for each form, relationships of the type FORMSFILE contains
FORM will be created. The fields which compose the form will then be
related to the form.
If the form name is already in System Dictionary, then the following
message and prompt are issued:
Form ! already exists (SDWARN 3002)
Skip, Replace, enter New name, or Terminate (S/R/N/T)? >
If the user responds with an "S", the existing form in System Dictionary
is used. If the user responds with an "R", SDVPD replaces the old form
entity with the new one. A response of "T" terminates the loading
process. If the user responds with an "N", SDVPD prompts for a new form
name:
New form name >
The new name must be unique. The original VPLUS/V form name will be used
as the attribute value for the vplus-alias attribute. Note that the same
vplus-alias attribute value is also included in the FORMSFILE contains
FORM relationship.
Fields
SDVPD will load the fields defined in a form as element entity types in
System Dictionary. The System Dictionary attributes which are
initialized are sensitivity, element-type, byte-length, display-length,
and decimal. Sensitivity is initialized to the value specified in the
VPLUS command. Element type is determined from the table below:
VPLUS/V Data Type System Dictionary/XL Element Data Type
-----------------------------------------------------------------------------
DIG (1 <= s <= 9) I+
DIG (9 < s) P+
IMPn (1 <= s <= 10) I
IMPn (10 < s) P
NUMn (1 <= s <= 10) I
NUMn (10 < s) P
NUM R
CHAR X
DATE X
where s is the size of the VPLUS field and n the decimal places.
On the other hand, byte-length, display-length, and decimal are
determined from the field data type and the field length as follows:
VPLUS Data Type Field-size Display-length Byte-length Decimal
CHAR s s s 0
NUM 1 1 4 0
NUM 2 <= s <=6 s - 1 4 0
NUM 7 <= s s - 1 8 0
NUMn 1 1 2 n
NUMn 2 <= s <= 5 s - 1 2 n
NUMn 6 <= s <= 10 s - 1 4 n
NUMn 11 <= s s - 1 (s + 1) / 2 n
DIG 1 <= s <= 4 s 2 0
DIG 5 <= s <=9 s 4 0
DIG 10 <= s s (s / 2) + 1 0
IMPn 1 1 2 n
IMPn 2 <= s <= 5 s - 1 2 n
IMPn 6 <= s <=10 s - 1 4 n
IMPn 11 <= s s - 1 (s + 1) / 2 n
Each field is related to its form through the FORM contains ELEMENT
relationship. The attributes field-enhancement, field-type,
display-length, element-type, field-number, decimal, and byte-offset are
initialized for the relationship.
Compatible and Incompatible Elements. For elements, a compatible
definition is defined as an old definition of the same name such that its
values for those attributes specified in the COMPATIBILITY-LEVEL option
of the VPLUS command match those of the new definition. Furthermore, if
the CHECK-ELEM-TYPE parameter of the VPLUS command is ON, the
element-type attribute values must also match, regardless of the value of
the COMPATIBILITY-LEVEL parameter. If these conditions are not met, the
old definition is said to be incompatible with the new.
SDVPD considers an incompatible element as a conflicting entity. Hence,
the SKIP, REPLACE, TERMINATE, and NEW options are effective when
incompatible elements are found.
While loading element definitions, if a compatible element is found,
SDVPD issues the following message:
Compatible definition for element ! used (SDWARN 3003)
and uses this definition to create any relationship involving the
element.
On the other hand, if an incompatible definition is found, SDVPD issues:
Incompatible definition exists for element ! (SDWARN 3004)
Skip, Replace, enter New name, or Terminate (S/R/N/T)? >
If the user responds with "S", the new element is not added and the old
element is used in creating the subsequent FORM contains ELEMENT
relationship. If "T" is specified, then the loading process terminates
immediately. If the user specifies "N", the following prompt is
displayed:
New primary element name >
The new element name must be unique. The new name becomes the entity
name for the element, while the original field name is entered as a
vplus-alias attribute for both the element entity definition and the FORM
contains ELEMENT relationship.
MPE/iX 5.0 Documentation