Reorganizing Hierarchies

It is possible to reorganize an entire hierarchy. Data sets, sets, and subsets can be reorganized at any time.

The best way to reorganize a complete hierarchy is to reorganize the embedded structure first and then to reorganize the disjoint structure. This minimizes the amount of I/O time required for the Reorganization program run (because the fix-up process for the master structure is combined with the generation of the master structure). However, if you want to reorganize an embedded structure with the CHECKAGGREGATE option in the BUILDREORG input, you should first reorganize the disjoint structure and then reorganize the embedded structure. However, if you want to reorganize an embedded structure with the CHECKAGGREGATE option in the BUILDREORG input, you should first reorganize the disjoint structure and then reorganize the embedded structure.

To reorganize the hierarchy, perform the following steps:

  1. Alter the DASDL statements to the following. The asterisks (*) indicate changed lines.

    *   UPDATE;
        D DATA SET
         (
          A ALPHA(10);
          B BOOLEAN;
    *     C NUMBER(S7,2);
          E DATA SET
           (
            X REAL;
            Y FIELD(8);
    *      )
    *     CHECKSUM = TRUE;
    *     S-E SET OF E KEY X
    *       CHECKSUM = TRUE;
         );
        S-D SET OF D KEY A;
  2. Compile the DASDL description.

  3. Generate and run the Reorganization program.

  4. Recompile all programs which invoke data set D.