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:
- High-used greater than high-allocated
- Invalid
index pointer
- Duplicate index pointer
- Out-of-sequence
index record
- Invalid section entry
- Invalid key length
- Horizontal pointer loop
- Duplicate key
- 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:
- 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.
- A dump is generated.
- The current request fails with logical-error
RPL feedback 'xx08006D'.
- No ABEND occurs.
If the data set is being shared
properly, the systems programmer
should:
- Open a PMR and submit the following items:
- The dump
- An EXAMINE ITEST NODTEST, EXAMINE DTEST NOITEST,
and LISTCAT of
the data set taken after the trap hits
- DSS Prints of the index
component after the trap hits
- 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.