-DH Lines in a Database Block

In the -DH Lines tab, you describe the relationships between Segments in a hierarchical database, such as DL/1. You specify this information directly in the table or in the call line definition section that opens when you create a line or select a line in the table.

Each line designates a Segment and its parent (except for the line that refers to the root Segment). The description consists of records and these records constitute the physical file.

This description is common to the following IMS and DL/1 hierarchical Database Block types:
  • DP: Physical database description
  • DR: Physical database description (same as DP, but only the Data Elements that are referenced as access keys in the Segment description are generated in the FIELD statements)
  • DL: Logical database description
  • PC: PCB
  • PS : PSB
  • IP: Primary index
  • IS: Secondary index

The Comments column is displayed in the table only. It does not correspond to a field of the call line definition section. It contains an asterisk on the call lines that have been assigned -G lines. These secondary-level -G lines were entered with the -G Lines button in the call line definition section. If you hover your cursor on the asterisk, the -G lines of the call line are displayed in a tooltip. If you click the button that is associated with the asterisk, the -G lines are displayed in their tabular editor, where you can modify them. You can also display and modify the -G lines from the Edit comments choice in the contextual menu of the call line.

-DH Line Definition section

The following explanations refer to the fields as they are displayed in the call line definition section.
Block code
This field is active only for PS-type Blocks. To select a PSB Database Block, click Change. The dialog box that opens lists the available PSB Database Blocks. Select one of them in the list and click OK. It is then displayed in the Block code column.

You can also specify the Database Block directly from the Block code column.

Two methods are possible:
  • Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
  • Click the button that appears when you set your cursor in the column. In the selection wizard that opens, select an instance.

The selected Database Block is displayed as a link that automatically switches 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.

Segment
Select the Segment by clicking Change. In the dialog box that opens, select a Segment in the list of the available Segments and click OK. The Segment is then displayed in the Child column.

You can also specify the Segment directly from the Child column.

Two methods are possible:
  • Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
  • Click the button that appears when you set your cursor in the column. In the selection wizard that opens, select an instance.
Parent Segment
Click Change to select the Segment that the Segment that is selected in the previous field is hierarchically dependent on. This field is not used for IP or IS-type Database Blocks.

To enter or modify the contents of this field, click Change. In the dialog box that opens, select a Segment in the list and click OK. It is then displayed in the Parent column.

You can also specify the Segment directly from the Parent column.

Two methods are possible:
  • Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
  • Click the button that appears when you set your cursor in the column. In the selection wizard that opens, select an instance.
Relation code
This field is optional. It is used only if the type of Block is PSB to name the called Database Blocks and PCB.
Key indicator or Option
Enter the key indicator that is used as the symbolic reference of the key Data Element of a Segment in a Database Block. The character that is 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 the following values:
  • 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 to generate a non-qualified SSA
  • Any other values to indicate a search field
Note: Key indicators are not allowed on Data Elements that are used to redefine other Data Elements.
Estimated number of links
Enter the average number of occurrences of a child Segment that is linked to one occurrence of its parent Segment.
Comment/Relationship/Key length
You can use this field to document the defined parent-child link. You can also use it to indicate the concatenated key length.
When a PS-type Database Block (a PSB) is generated, the length of the longest concatenated key is automatically calculated for each of the following elements:
  • A DBD that is called in a PSB
  • A PCB that is called in a PSB
  • An index database that is called as an independent database in the PSB
You can override its length by entering the following characters on the first line: CC=n (with n = 9 - 9999).
On each Segment call line, you can enter PR=nnnn to generate the PROCOPT=nnnn parameter in the SENSEG macro-instruction upon the generation of the PSB that contains this DBD, PCB, or index database.
Note: The length is calculated only for a primary Segment. For a secondary index, the CC= parameter is required.
-G Lines
This button can be used to access the -G Lines wizard and create -GG lines that are associated with the description line. On these lines, you can enter or modify information to complete the description line before the generation.

Feedback