Determining segment size

Segment size here is physical segment size, and it includes both the prefix and data portion of the segment.

You define the size of the data portion. It can include unused space for future use. The size of the data portion of the segment is the number you specified in the BYTES= operand in the SEGM statement in the DBD or, if you are using DDL, the MAXBYTES parameter in the table options on the CREATE or ALTER TABLE statement.

The prefix portion of the segment depends on the segment type and on the options you are using. The following table helps you determine, by segment type, the size of the prefix. Using the chart, add up the number of bytes required for necessary prefix information and for extra fields and pointers generated in the prefix for the options you have chosen. Segments can have more than one 4-byte pointer in their prefix. You need to factor all extra pointers of this type into your calculations.

Table 1. Required fields and pointers in a segment's prefix
Type of segment Fields and pointers used in the segment's prefix Size of the field or pointer (in bytes)
All types Segment code (not present in a SHSAM, SHISAM, GSAM, or secondary index pointer segment) 1
Delete byte (not present in a SHSAM, SHISAM, or GSAM segment) 1
HDAM, PHDAM, HIDAM, and PHIDAM PCF pointer 4
PCL pointer 4
PP pointer 4
PTF pointer 4
PTB pointer 4
HDAM and HIDAM only HF pointer 4
HB pointer 4
DEDB PCF pointer 4
PCL pointer 4
Subset pointer 4
Logical parent (for HDAM and HIDAM) LCF pointer 4
LCL pointer 4
Logical child counter 4
Logical parent (for PHDAM and PHIDAM) Logical child counter (only present for unidirectional logical parents) 4
Logical child LTF pointer 4
LTB pointer 4
LP pointer 4
Logical child (PHDAM and PHIDAM) EPS 28
Secondary index Symbolic or direct-address pointer to the target segment 4
PSINDEX EPS plus the target segment root key 28 + length of the target-segment root key
All segments in PHDAM and PHIDAM ILK 8