Step 2 - Build Child Archive Root Objects for Primary Archive Root Objects

The next step in an archiving procedure creates Child archive root objects for data related to Primary archive root objects with an initial status (archive root objects are added as initial in Step 1: Create Primary Archive Root Objects). Note that this background process processes archive root objects related to the specified Archive or Purge DB process. You specify the DB process as a parameter on the batch control.

For each Primary archive root object, the program creates Child archive root objects for data related to Child DB process instructions linked to the Archive or Purge DB process. As with the Primary archive root objects built in the previous step, Child archive root objects reference the primary key value of the Primary table of the maintenance object specified on the Child DB process instruction.

Apply Table Rules

It would be unusual to include a table rule on a Child DB process instruction. If they are specified on any of the Child DB process instructions, they prevent archive root objects from being created for the data related to Child DB process instructions unless the data meets the conditions specified on a table rule's override instruction (WHERE clause). This is unusual because you would most likely create dangling foreign key references by specifying table rules at this level. It may be better to try and prevent the applicable Primary archive root objects from being created in the first place.

Fastpath: Refer to Table Rules Also Exclude Records for more information on setting up table rules.

Execute Criteria Algorithms

At this time, the program executes criteria algorithms related to the Child DB process instructions. As in the previous step, these criteria algorithms prevent archive root objects from being created. The difference is that if a criteria algorithm specified on a Child DB process instruction returns false (do not archive/purge), the program deletes all of the root objects related to the Primary archive root object. This is a fundamental difference between criteria algorithms and table rules specified at this level. Since the archive root objects are deleted, they will not be subject to further processing in subsequent steps. Again, criteria algorithms are generally specified on Primary DB process instructions.

Fastpath: Refer to Criteria Algorithms Exclude Records for more information on setting up criteria algorithms.

Create Archive Root Instructions For Archive Root Objects

For each Child archive root object, the program stores an archive root instruction that links the archive root object and its DB process instruction. The root instruction references the archive root object that caused it to be stored and that archive root object's Primary root object. Once the program processes all of the child archive root objects, the archive root instructions provide a cross-reference of Primary and Child archive root objects that are processed together by subsequent steps.