Previous Topic: Sample Report:  DATAINDEX with an ErrorNext Topic: Example Dump: INDOUBT Index Entries


Index to Data (INDEXDATA)

The INDEXDATA option processes each key definition selected for the table. For each key definition, all index values are processed.

The index uses locate commands, LOCKG/LOCNX for processing. For each index entry, the matching data row is retrieved using a REDLE command. REDLE commands offer no exclusive control or protection from other concurrent tasks performing maintenance to the same table. If other tasks are not blocked from maintenance, many false errors can occur and must be handled or verified in some other way outside the scope of this DBUTLTY function. A data row not found is considered in doubt and an error message is generated. The processing then continues to the next index entry.

An unexpected return code indicates a system or program failure and causes the DBUTLTY function to terminate with the failure.

If a doubtful index condition occurs, a flag is set and at the end of the function, a normal DBUTLTY error is set.

Once the key definitions, their index entries, and their matching data rows have been processed, a final report is printed with details of the function.

The function does not lock the data rows. When an attempt is made to retrieve the data row and a RC=04 or RC=12 occurs, this means that the data row is not present at the time but could have been present when the index entry was retrieved. Errors in this case are considered in doubt.

To be sure the index and data are stable and that errors are real, perform the ACCESS=NOMAINT function on the DBID. This prevents any deletions and protects the LOCKG/REDLE processing. If the table must remain open to other users, do not restrict access and simply run the VERINDEX function. If errors are detected, run the same key name a second time. Key values that are errors on both runs would likely be true errors.

A key can be defined in CA Datacom Datadictionary with the attribute INCLUDE-NIL-KEY that can be set to NO, where key values that are completely blanks or completely binary zeros are excluded from the index and are therefore not available for checking. This means that a key with INCLUDE-NIL-KEY that is all blanks or binary zeros is not in the index and therefore cannot be used for comparison against the data. This option is not available for the native sequence key nor the Master Key. This condition creates the possibility that counts of various keys might be different.

Sample Report

Following is a sample report page. For an example report header, see Sample Report Headers.