VSAM index trap

VSAM has an index trap that checks each index record before writing it. The index trap is on by default.

The index trap can be deactivated by the console command:
VARY SMS,MONDS(IGWVSAM.BASE.INDEX.TRAP),OFF
To restart it after disabling it:
VARY SMS,MONDS(IGWVSAM.BASE.INDEX.TRAP),ON
To query status:
DISPLAY SMS,MONDS(IGWVSAM.BASE.VSAM.DEBUG.FEATURES) 

The trap catches the more common index breakages, but not all breakages:

  1. High-used greater than high-allocated
  2. Invalid index pointer
  3. Duplicate index pointer
  4. Out-of-sequence index record
  5. Invalid section entry
  6. Invalid key length
  7. Horizontal pointer loop
  8. Duplicate key
  9. Incorrect segment count

The trap prevents a broken index, but the documentation generated might not be sufficient to determine the source of the problem. If the trap hits:

  1. A console message is issued:
    IDAI1001E ERROR FOUND IN INDEX
    DSN:  SAMPLE.DATASET.INDEX
    REASON:  HIGH-USED GREATER THAN HIGH-ALLOCATED
    A similar message, IDAI1002E, is issued if an error is found in a catalog data set index.
  2. A dump is generated.
  3. The current request fails with logical-error RPL feedback 'xx08006D'.
  4. No ABEND occurs.

If the data set is being shared properly, the systems programmer should:

  1. Open a PMR and submit the following items:
    1. The dump
    2. An EXAMINE ITEST NODTEST, EXAMINE DTEST NOITEST, and LISTCAT of the data set taken after the trap hits
    3. DSS Prints of the index component after the trap hits
  2. Rename and save the corrupted data set, in case IBM® Service needs additional documentation
Note: IBM Health Checker for z/OS® VSAM provides a check, VSAM_INDEX_TRAP, which ensures that the VSAM index trap is enabled and notifies users with an exception message if it is not enabled. When this check is active, it will be run once the IBM Health Checker for z/OS is started and once every 24 hours while IBM Health Checker for z/OS is active.

For more information on IBM Health Checker for z/OS, see IBM Health Checker for z/OS User's Guide.