Secondary Index Resolution function
To handle secondary index records in the most efficient manner, use the Index Build function.
It performs all the processing necessary to rebuild secondary indexes after a database reorganization. The Index Build function does not require you to unload and reload the database to create secondary indexes.
Because the Index Build function creates secondary indexes, the IMS HISAM Unload/Reload utilities are not needed.
The Index Build function can process secondary index records from the following sources:
- DFSURWF1 file written by the load or reload
- DFSURIDX file split from the DFSURWF1 file by the Work File Splitter
- Sorted DFSURIDX data set. The Prefix Resolution/Update function sorts the records when you specify SORTIDX(Y). Use this data set as input to the Index Build function with the DFSURIDX DD statement to indicate that the records do not need to be sorted.
- Unsorted DFSURIDX data set. The Prefix Resolution/Update function does not sort the records when you specify SORTIDX(N). Use this data set as input to the Index Build function with the DFSURWF1 DD statement to indicate that the records need to be sorted.
The Secondary Index Resolution function (program name PRPURG40) provides compatibility with the IMS Prefix Resolution utility; it is not intended to replace the Index Build function. You can use the Index Build function rather than the Prefix Resolution/Update function to process the secondary index work records in the DFSURWF1 data set.
The Secondary Index Resolution function (PRPURG40) processes only IMS format (DFSURWF1) secondary index (type 40) records. Output is an IMS format (DFSURIDX) data set containing sorted records. These records must be processed by the HISAM Unload and Reload utilities or the Index Build function to create a secondary index.
The following figure shows the system flow of the Secondary Index Resolution function.

The Secondary Index Resolution function (PRPURG40) works as follows:
- The only acceptable input is IMS format work file records. Specify the input in the DFSURWF1 data set; however, if you have specified SORTIN(Y), specify the input work file records in the SORTIN data set.
You can use the Work File Splitter to split the secondary index work records before you pass them to PRPURG40. - PRPURG40 requires a control data set (DFSURCDS) that references all source databases for all secondary indexes to be processed. The indexes themselves do not need to be referenced.
- PRPURG40 invokes your site’s sort program.
This section contains the following topic:
Related topic