IMS Index Builder return codes and error handling

IMS™ Index Builder generates return codes to indicate the success or failure of a routine. You can use these return codes to influence the execution of succeeding instructions or programs.

IMS Index Builder issues the following return codes.

Table 1. Return codes issued by IMS Index Builder
Return code Meaning
0 IMS Index Builder completed normally, and all indexes were built successfully.
4 IMS Index Builder built all indexes that were requested and found nothing to rebuild.
8 IMS Index Builder built some indexes successfully, but one or more indexes could not be built.
12 IMS Index Builder could not build any indexes.
16 IMS Index Builder could not build any indexes. Either an input, JCL, system, or feature error was encountered.
20 The prime database is not available for scan. No indexes were built.

In general, a return code higher than 4 indicates that IMS Index Builder encountered an error for at least one index that is being built.

Two types of errors can be encountered. The first type prevents all indexes from being built. The second type prevents a particular index from being built.

Errors that prevent building all indexes

Errors that prevent all indexes from being built include:

  • Input errors, for example, an invalid control statement in the input file IIUIN
  • DBD errors, for example, if an index is not defined in the physical database DBD
  • JCL errors, for example, if a required DD name is missing
  • System errors, for example, an I/O error when reading input control statements
  • IBSCAN errors, for example, if the scan returned a bad status code when scanning the physical database
  • Any index-related error that was detected when the index databases are being opened

Errors that prevent building one or more indexes

When IMS Index Builder encounters an index-related error after successfully opening all indexes for output, it stops processing that index.

Some indexes might already be successfully loaded when the error occurs. Check the output in IIUPRINT to determine which, if any, indexes were built.

The following errors are index-related errors:

  • Reading an invalid index-related record from file DFSURWF1 or DFSURIDX
  • Failing to load an index record
  • Receiving a nonzero return code from the sort task that is associated with an index database

External product error messages

IMS Index Builder calls IMS Tools Knowledge Base and High Performance Unload. These applications place their error messages on the SYSOUT data set. The WTOs for these applications are captured on the IIUCAPT data set.