In the -DH lines tab, you can describe
the relationships between Segments in a hierarchical database (example:
DL/1).
Each line designates a Segment and its parent (except
for the line referring to the root Segment). The description consists
of records, which make up the physical file.
This description
is common to the following IMS / DL/1 - hierarchical Database Block
types:
- DP: Physical database description,
- DR: Physical database description (same as 'DP', but
only the Data Elements referenced as access keys in the Segment description
are generated in the FIELD statements),
- DL: Logical database description,
- PC: PCB,
- IP: Primary index,
- IS: Secondary index.
-DH lines definition
The -DH
lines definition section is displayed when you enter
or click a description line. In this section, you can enter information
about the description line.
- Definition
- The Block code field is active only for PS-type
Blocks. To select PSB Database Block, you must click Change.
In the dialog box, which opens up, you find a list where you can select
instances among the available PSB databases. The code of the selected
database is displayed as a link that switches you to the Database
Block editor.
- For a PSB database called on a -DH line, you must enter only the Key
indicator or option and Comment/relationship/key
length fields.
The following Segment options are active for all
Block types other than the PC or PS type.
- Segments
- Select the Segment code. SOCRATE/CLIO database: Select the code
of the Segment, which is used to generate the entity, the formal or
the SOCRATE/CLIO Segment. To enter or modify the contents of this
field, click Change. In the dialog box that
opens, you can select a Segment code in the list of the available
Segments. If the list is large, you can reduce it by entering a string
that is used as filter (the filtering is performed on the code or
on the label of the instance).
- Parent Segment
- Click Change to select the code of the
Segment upon which the given Segment is hierarchically dependent.
This field is not used forIP or IS-type
Database Blocks.
- Relation code
- This field is optional. It is used only if the type of Block
is "PSB" to name the different DBD and PCB called.
- Key indicator or Option
- Enter the key indicator used for a symbolic reference of the
key Data Element of a given Segment in a given Database Block. The
character indicated in this field must also be entered in the -CE
lines of the Segment, in the Sort key field
of the Data Element call line.
- In this field, you can enter:
- U to indicate a unique key,
- M to indicate a multiple key
- a digit between 1 and 9 to
indicate a DL/1 Secondary index,
- $ in a PCB or a physical or logical DBD,
if you want to generate a non-qualified SSA,
- any other values to indicate a search field.
Note: Key indicators are not permitted on Data Elements that
are used to redefine other Data Elements.
- Estimated number of links
- You enter here the average number of occurrences of a child Segment
linked to one occurrence of its parent Segment.
- Comment/Relationship/Key length
- This field can be used to document the defined parent-child link.
It is also used to indicate the concatenated key length.
- When generating PS-type Database Blocks
(a PSB), the length of the longest concatenated key is automatically
calculated for each:
- DBD called in a PSB,
- PCB called in a PSB,
- Index database called as an independent database in the PSB.
- You can override his length by entering the following characters
on the first line: CC=n (with n = 9 - 9999).
- On each Segment call line, you can enterPR=nnnn to
generate thePROCOPT=nnnn parameter in the SENSEG statement
when generating the PSB, which contains this DBD, PCB, or index database.
Note: The length is calculated only for a primary Segment. In
the case of a secondary index, the CC= parameter is
required.
-GG Lines
The -GG lines section
is displayed when you enter or click a description line. In this section,
you can enter information to complete the description line.
In the -GG lines, you can modify the information
contained in the Block Description lines before they are generated.
Depending on the type of description line, lines are automatically
displayed, in order to guide you when you enter the physical information
of the Block. These lines are identified by VIRT or GUID in
the last field of the table of the -GG lines. Collectively, these
lines are called virtual lines. The lines identified by VIRT are
generated. To modify these lines, you must override them and create
new lines between beginning and end insertion lines. When you select
a virtual line and click Override, the VIRT or GUID line
is changed into a FromVIRT or FromGUID line.
Then it can be modified. You can also edit the FromGUID and FromVIRT lines
by selecting them and pressing the F2 key. You can create lines anywhere
in the table. However, if you want them to be taken into account at
generation time, you must identify them with a G Type.
In the table, you find the following data-entry fields:
- Type
- When you click this field, you can select a line type among:
- Description
- This field must be used to enter the generation elements or comments
to be generated. Its content depends on the type of Block and type
of line selected.
- Physical DBD:
The virtual lines associated with a description
line of a physical DBD retrieve the Segment descriptions as defined
in the repository. They do not need to be rewritten. However, you
can complete, modify, or delete these lines (declaration of an index).
A
FIELD description can be modified at
this level. To do so, insert one or more lines between the beginning
and the end of the insertion area, indicated on virtual lines. On
the first line, enter the Data Element code corresponding to the
FIELD
to be modified. It must be left-aligned between
< and
> signs.
You must enter six characters between the delimiters or complete with
blanks. Enter the new description of
FIELD on
the following lines.
Example: G <DELCO >
G FIELD NAME=(NUM,SEQ,U),BYTES=7
- Logical DBD:
The virtual lines associated with a description
line of a logical DBD retrieve, for each Segment of the DBD, the name
of the Segment and the name of the parent Segment. You must complete
each line by identifying the source of the Segment.
SOURCE = ((name of Segment,,name of DBD))
- Index
The virtual lines associated with the index Database Block
description line retrieve the Segment description from the repository.
Since the necessary information for the description of a given index
(LCHILD...) is unavailable, you must complete the virtual lines.
- PCB
No virtual lines are associated with a PCB Database Block.
You can modify a PCB description through the virtual lines associated
with the description lines of a PSB that uses this PCB.
- PSB
The virtual lines associated with PSB description lines
retrieve the Segment descriptions, which make up the called PCB from
the repository. They do not need to be rewritten. A
SENSEG description
can be modified at this level. To do so, insert one or more lines
between the beginning and the end of the insertion area, indicated
on virtual lines. On the first line, enter the Segment code corresponding
to the
SENSEG to be modified. It must
be left-aligned between
< and
> signs.
You must enter four characters between the delimiters or complete
with blanks. Enter the new description of
SENSEG on
the following lines.
Example: G <CD10>
G SENSEG NAME=CLCDE,PARENT=COCRD,PROCOPT=G