Chapter 2. Defining HALDB databases
2.2 DBDGEN differences for HALDB
The database definition statements for HALDB databases are slightly different from non-HALDB databases. The four main things that are different in HALDB definitions are:
ACCESS operands PHDAM, PHIDAM, and PSINDEX are used.
DDNAME and data set information are not part of DBDGEN for HALDB. The database definition is purely for defining the hierarchical structure and relationships of the data. DATASET statements are not allowed for HALDB.
The primary index of a PHIDAM database is automatically included in the generation of the PHIDAM database. DBDGEN cannot be performed for the primary index.
Since DATASET statements are not allowed in HALDB database definitions, another method is used for defining multiple data set groups. They are defined with the DSGROUP parameter on SEGM statements. This parameter is not used with non-HALDB databases.
DBDGEN does not define individual partitions. This is done using the HALDB Partition Definition utility or DBRC batch commands. See Chapter 4, “Partition Definition utility” on page 45, and Chapter 5, “Batch definition of HALDB” on page 61.
Definitions specified in the DBDGEN source will generally apply to all partitions. The possible exception is the RMNAME parameter on the DBD statement. RMNAME must be specified in the DBD for PHDAM databases, but it may be overridden. Overrides may specify different values for different partitions.
The PSNAME parameter on the DBD statement specifies the name of a partition selection exit routine. It may be overridden by the PDU or DBRC commands. The
override may specify a different name or may specify that key range partitioning is to be used. Similarly, if the PSNAME parameter is not specified in the DBD, it may be specified by the PDU or DBRC commands.
Table 2-1 shows the parameters that are changed or added to DBDGEN statements.
Table 2-1 DBDGEN changes
Note: Partition selection is done prior to invoking the randomizing module. Randomizing modules only select locations within partitions.
Statement Keyword Description of change
DBD NAME No change.
ACCESS Add operands PHDAM, PHIDAM, and PSINDEX. INDEX operand is not used for primary index of PHIDAM. Other operands are unchanged.
RMNAME (mod,anch,rbn,bytes) - Default values for partitions. RBN is high RBN per partition.
PSNAME (new)
Optional parameter. The partition selection exit module name is the operand.
A user provided partition selection routine is not used with key range partitioning. PSNAME may be overridden by PDU or DBRC commands.
AREA/ DATASET
Not allowed for HALDB.
SEGM PARENT VIRTUAL/PHYSICAL: Either may be specified, but only physical used. That is, either specification results in the logical parent’s concatenated key being physically stored in the logical child segment.
POINTER HIER and HIERBWD are not allowed. TWIN, TWINBWD, or NOTWIN must be specified PHDAM and PHIDAM databases. For root segments in PHIDAM databases, only NOTWIN or TWINBWD are allowed.
All dependent segments have a physical parent pointer. If the segment is a logical child, PAIRED and LPARNT are assumed. LTWIN and LTWINBWD are not allowed.
SOURCE Not allowed for PHDAM or PHIDAM. Only physical pairing is supported for bidirectional logical relationships.
DSGROUP (new)
This keyword is used to specify multiple data set groups for partitioned databases. The format is DSGROUP=c, where c is the letters A through J. Up to 10 data set groups can be specified. The DSGROUP value corresponds to the values used in the DDNAME and data set naming conventions for HALDB.
The default for every segment is A (first data set in each partition). If specified on the root segment, it must be DSGROUP=A.
Gaps in the A–J sequence are not allowed. If DSGROUP=C is specified on a SEGM statement, there must also be at least one SEGM statement with DSGROUP=B and one with A.
We provide examples of the needed DBD changes later in this publication. Example 9-8 on page 138 shows the DBD source for a HIDAM database, and Example 9-9 on page 139 shows the DBD source after the database has converted to a PHIDAM.
LCHILD LCHILD statements are not used for the primary index of a PHIDAM database. These indexes are automatically generated by PHIDAM definitions.
POINTER PTR=INDX is required for LCHILD statement following the target segment in indexed PHDAM or PHIDAM DBD.
PTR=SNGL is required for the LCHILD statement in PSINDEX DBD. It is the default value for this LCHILD statement
PTR=NONE is required for the LCHILD statement following a logical parent segment. It is the default for this LCHILD statement.
PAIR Unchanged from non-HALDB. HALDB does not support virtual pairing, so paired segment is physically paired.
INDEX Not needed for a primary index of PHIDAM, otherwise unchanged.
RKSIZE (new)
For PSINDEX only, specifies the length of the root segment key of the target database.
RULES Not used: It does not apply to physical pairing.
FIELD Unchanged.
Note: /CK means the same as with non-HALDB. /SX creates an 8-byte ILK instead of 4-byte RBA.
XDFLD CONST For shared secondary indexes. Not allowed for HALDB.