Defining HALDB database DBD statements

Because the DBD for your new HALDB is based on the DBD of your current non-HALDB database, you must make several changes to your existing DBD to convert your database to HALDB.

To modify the DBD, you need to modify the following statements:

  • The DBD statement of the database being converted
  • The DBD statement of a HIDAM primary index
  • The DATASET statement
  • The SEGM statement
  • The LCHILD statement
  • The FIELD statement
  • The XDFLD statement

Changing the DBD statement

You might need to make the following changes to the DBD statement for HALDB:

  • Specify PHDAM, PHIDAM, or PSINDEX for the ACCESS parameter, depending on the type of HALDB database to which you are converting.
  • If you are going to use a partition selection exit routine, specify the module name of the exit routine by using the PSNAME parameter in the DBD statement for the HALDB database. If you are not going to use the exit routine, do not specify the PSNAME parameter.

    You can also introduce or change a partition selection exit routine during the partition definition process. Any specification that you make for a partition selection exit routine during the partition definition process overrides any specification you have made in the DBD statement.

  • If you are converting to a PHDAM database, specify the RMNAME parameter. For HALDB, the RMNAME parameter defines a default randomizer value for all partitions in the HALDB database. You can specify different randomizer values for individual partitions when you define each partition.
Tip: When you convert your database to a HALDB database, keep the same database name, if possible. If you change the name, you will need to change all of the PSBs that reference the database. All of the conversion processes that are described in this information use the same database name before and after the conversion process.

Omitting the DBD statements for HIDAM indexes

If your database is a HIDAM database, delete the DBD statements for the primary index. PHIDAM primary indexes do not require a DBD. When a HIDAM database is migrated to PHIDAM, the DBD for the HIDAM index is discarded. IMS obtains the information that is required to generate the PHIDAM primary index from the PHIDAM DBD.

Deleting the DATASET statement

HALDB databases do not use the DATASET statement. If you are creating the DBD for the HALDB database by modifying the DBD of the existing database, delete the DATASET statement. You can specify the elements that were previously defined in the DATASET statement by using the following methods:

  • Create ddnames when you define partitions.
  • Define data set groups by using the DSGROUP parameter on SEGM statements.
  • Specify free space and OSAM block sizes when you define partitions.
  • Omit the SCAN parameter for HALDB databases. HALDB searches only the current cylinder for available storage space during segment insertion operations.

Changing the SEGM statement

You might need to make the following changes to the SEGM statement for HALDB:

  • Change the pointer specifications of the PTR parameter.

    HALDB does not use hierarchical pointers. You must change any specifications of the HIER, H, HIERBWD, or HB keywords with the PTR parameter to TWIN, T, TWINBWD, or TB.

    PHIDAM does not support the use of twin forward only (TWIN or T) pointers for root segments. If you have HIDAM roots that use twin forward only pointers, change the keyword for the PTR parameter on the SEGM statement to NOTWIN, NT, TWINBWD, or TB.

    HALDB does not use symbolic pointers. The changes that are required for logical relationships are explained in Defining DBD statements for logically related HALDB databases.

  • If you want to use multiple data set groups, specify the DSGROUP parameter in the SEGM statement.

    To define multiple data set groups, you must specify the DSGROUP parameter on the SEGM statement for any segment that is not in the first data set group. The valid values for DSGROUP are the letters A through J. A is the first data set group, B is the second, and J is the tenth.

  • If you are using a /SX field as a subsequence field, you must increase the value of the BYTES parameter for a secondary index segment by 4 bytes. For more information, see Defining DBD statements for the PSINDEX.

Changing the LCHILD statement

The LCHILD statement does not define the primary index for PHIDAM databases. When converting a HIDAM DBD to PHIDAM, delete the LCHILD statement.

When converting a secondary index DBD to a HALDB PSINDEX DBD, you might need to make the following changes:
  • If PTR=SYMB is specified in a secondary index, you must either change it to PTR=SNGL or omit the PTR= keyword. PTR=SNGL is the default and is the only valid specification for PSINDEX LCHILD statements.
  • If PTR=SYMB is specified for a HDAM or HIDAM indexed database, you must change it to PTR=INDX.
  • If your database has a secondary index, you must specify the size of the key of the root segment in the target database by using the RKSIZE parameter on the LCHILD statement in the secondary index DBD.

When you use symbolic pointing to convert a logical relationship, you must omit the PTR=SYMB specification on the LCHILD statement for the logical relationship.

Changing the FIELD statement

The changes for LCHILD statements that are used to define logical relationships that use virtual pairing are explained in Defining DBD statements for logically related HALDB databases.

In the secondary index DBD, the value of the BYTES parameter of the FIELD statement for the sequence field of a secondary index segment must be increased by 4 bytes if a /SX field is used as a subsequence field. The /SX field is defined in the indexed database DBD. For more information, see Converting HDAM or HIDAM databases with secondary indexes to HALDB.

Changing the XDFLD statement

HALDB does not support shared secondary indexes. If the CONST parameter is specified in an XDFLD statement of an indexed database, you must delete it. The CONST parameter specifies the character that is associated with a shared secondary index. Each HALDB secondary index must be stored in its own secondary index database. Separate PSINDEX databases must be defined for each shared secondary index that is being converted to HALDB.