Using HISAM unload and reload utilities for secondary indexing operations
In addition to unloading and reloading a database, you can also use the HISAM unload and reload utilities to build secondary indexes and work with secondary indexes that are a part of a shared secondary index.
Specifically, you can use the HISAM unload and reload utilities
to:
- Build a secondary index database
- Merge a secondary index into a shared secondary index database
- Replace a secondary index in a shared secondary index database
- Extract a secondary index from a shared secondary index database
Each of these operations is done separately. That is, none of them can be done in conjunction with running the HISAM unload and reload utilities to unload or reload a regular database.
The following figure shows the input to and output from the HISAM
unload and reload utilities when performing the first three operations.
The DFSURIDX work data set used as input to the HISAM unload utility
was created by the Prefix Resolution utility. It contains the information
needed to create or update a shared secondary index database. The
HISAM unload utility formats the secondary index information for use
by the HISAM reload utility. Note that the input control statement
to the HISAM unload utility has an X in position 1 when the utility
is used for secondary indexing operations rather than for unloading
a regular database. Position 3 contains one of the following characters:
- M: means the operation is either to build a new secondary index database or merge a secondary index into a shared secondary index database
- R: means the operation is to replace a secondary index into a shared secondary index database
The HISAM reload utility uses the output from the HISAM unload utility to create the new secondary index or merge or replace the secondary index in a shared secondary index database.

The following figure shows the input to and output from the HISAM
unload utility when an index is being extracted from a set of shared
indexes. Note that the input can be one of the following:
- The DFSURIDX work data set created by the Prefix Resolution utility
- The shared secondary index database
Again, position 1 in the input control statement contains an X. Position 3 contains an E, which means the operation is to extract a secondary index.
