Secondary index or PSINDEX database (VSAM only)

The LRECL Format on Device and in Buffer Pool are described.

LRECL Format on Device and in Buffer Pool

One segment per LRECL. The following figure shows the LRECL Format on Device and in Buffer Pool.

Figure 1. LRECL format on device and in buffer pool
Graphic is a 6 column, 1 row table. Column 1 is labeled "PTR," is 4 bytes, and references note 1. Column 2 is labeled "DEL. FLAG" and is 1 byte. Column 3 is labeled "PTR," is 4 bytes, and references note 2. Column 4 is labeled "EPS," is 28 bytes, and references note 3. Column 5 is labeled "RKEY," is from 1 to 255 bytes, and references note 4. Column 6 is labeled "INDEX DATA (See segment data format)." Columns 1 to 3 are labeled as "PREFIX." Columns 4 to 6 are labeled as "DATA."
Notes:
1.
Nonunique keys: This points to ESDS LRECL with the same key value. Unique keys or PSINDEX: This field is omitted.
2.
Direct pointer to index target segment. Omit this field if symbolic pointing is used or if this is a HALDB PSINDEX.
3
The EPS is present only if this is a HALDB PSINDEX. The 4-byte pointer to the target segment is included in the EPS.
4
RKEY means root key. The RKEY field is present only if this is a HALDB PSINDEX. This is the key value for the root of the target segment and its length can be from 1 to 256 bytes.
LRECL as Returned by Buffer Handler
The following figure shows LRECL as returned by buffer handler.
Figure 2. LRECL as returned by buffer handler
Graphic is a 7 column, 1 row table. Column 1 is labeled "PTR," is 4 bytes, and references note 1. Column 2 is labeled "SEG. CODE," is 1 byte, and references note 2. Column 3 is labeled "DEL. FLAG" and is 1 byte. Column 4 is labeled "PTR," is 4 bytes, and references note 3. Column 5 is labeled "EPS," is 28 bytes, and references note 4. Column 6 is labeled "RKEY," is from 1 to 255 bytes, and references note 5. Column 7 is labeled "INDEX DATA."
Notes:
1.
Four-byte pointer contains zeros.
2.
Code value is 01.
3.
Direct pointer to index target segment. Omit this field if symbolic pointing is used or if this is a HALDB PSINDEX.
4
The EPS is present only if this is a HALDB PSINDEX. The 4-byte pointer to the target segment is included in the EPS.
5
The RKEY field is present only if this is a HALDB PSINDEX. This is the key value for the root of the target segment and its length can be from 1 to 256 bytes.
6
Sequential segment data format.
Block Format on Device and in Buffer Pool
The following figure shows the block format on device and in buffer pool.
Figure 3. VSAM block format on device and in buffer pool
Graphic is a 4 column, 1 row table. Columns 1 to 3 are labeled "LRECL." Column 4 is labeled "VSAM INFO.," and is 10 bytes.
Segment Data Format
The following figure shows the segment data format.
Figure 4. Segment data format
Graphic is a 6 column, 1 row table. Column 1 is labeled "CONSTANT (Optional)." Column 2 is labeled "SEARCH FIELD." Column 3 is labeled "SUBSEQUENCE FIELD (Optional)." Column 4 is labeled "DUPLICATE DATA (Optional)." Column 5 is labeled "CONCAT. KEY (Optional)." Column 6 is labeled "USER DATA (Optional)."