Creation of an HD database from a DEDB unload file

A PSB with a PROCOPT of 'L' or 'LS' is used to load a new HDAM or HIDAM database from unload records. A PSB with a PROCOPT of 'L' or 'LS' requires that the root records be added in the proper order. IMS may return a status code of 'LB' or 'LC' if it encounters root records in an improper order.

If the utility is being used to load a new HDAM or HIDAM database from a DEDB unload file, the records must be sorted in the sequence in which they are to be loaded.

This order may not be the same sequence in which the records were unloaded.

The following are considerations:

  • If the target database is HDAM, make sure that the randomizer used by the DBD for the target is equivalent to the randomizer used by the unloaded database.
  • If the target database is HIDAM, the unload file must be sorted into ascending root sequence.

    If FPB DEDB Unload/Reload Utilities were used to create the unload file, a file containing sort control statements was created as a part of the unload process. These sort control statements can be modified to sort the unload in ascending root sequence.

    To achieve this order, do the following:

    1. Modify the sort control statements in the following manner:
      1. Add 9 to 'position parameter' (first parameter in the FIELDS= statement). This position equates to the beginning of the concatenated key field in the unload record.
      2. Subtract 9 from the 'length parameter' (second parameter in the FIELDS= statement)

        For example, if the DEDB Unload/Reload utility generated the following sort control statements:

        SORT FIELDS=(5,079,CH,A),SIZE=00000830

        RECORD TYPE=V,LENGTH=(0482,,,0092)

        they should be changed to the following:

        SORT FIELDS=(14,070,CH,A),SIZE=00000830

        RECORD TYPE=V,LENGTH=(0482,,,0092)

    2. Precede the step that invokes FABCUR9 with a sort step

      The SORTIN statement should reference the unload file.

      The SORTOUT statement should reference a data set to be used as the target of the sort.

      The SYSIN input should reference the modified sort control statements.

    3. In the job step that runs FABCUR9, specify the SORTOUT data set on the UNLDREC DD statement.
  • If the target database is being updated (for example, REPL-type processing), the sequence of the root records in the file is not important; however, the dependent segments of these roots must be in correct sequence and hierarchical order.