Secondary index structure
This topic describes the format of a secondary index as it exists in the buffer pool or out on disk.
The buffer handler adds a four-byte pointer and a segment code to the front of the record when processing. Pointer Checker does not deal with the record in buffer handler format, and no further discussion of that format is contained here.
Secondary indexes consist of a VSAM KSDS. If the key is nonunique, a VSAM ESDS is required to contain the records with duplicate keys.
Secondary index records contain data derived from a segment type in the indexed database (source segment) and point to another segment type in the same database (target segment). Source and target segments can be the same; if they are not, the target must be in the hierarchical path above the source segment. It is possible to specify a user exit routine which can exclude secondary index records as they are being created. This type of secondary index is referred to as a sparse index. Therefore, it is important to remember if a user exit is specified, there will not necessarily be a secondary index record for every source segment. Only an understanding of the user exit will enable an understanding of what records should exist.
It is also possible to have shared secondary indexes where a single data set may contain more than one secondary index (up to 16), provided that keys are the same size, all records are of the same length, and a unique constant is specified to identify which secondary index each record belongs to.
This section contains the following topics: