SECTIONS Option

The SECTIONS option requires that the EXTENDED attribute be set to TRUE. The SECTIONS option is currently valid for standard disjoint data sets (fixed‑format and variable‑format) and disjoint compact data sets only. Disjoint direct and disjoint random data sets can also be sectioned. However, for these structure types, the SECTIONS option is specified in the data set Access.

Notes:
  • Increasing or decreasing the SECTIONS value for a data set is a file format change and requires a DASDL update, a control file update, and a file format reorganization.

  • Changing a data set from a nonsectioned data set to a sectioned data set, or resetting the value of SECTIONS also requires recompilation of application programs that access the data set.

To turn off sectioning, remove the SECTIONS option specification.

When set, the SECTIONS option physically divides the data set in the number of sections (files) you specify for the option. The SECTIONS value range (2 through 510) allows hundreds of times more records in a data set than previous versions of the Enterprise Database Server.

A sectioned data set can be spanned only by index sequential sets and subsets. Newly created data set records are stored in the sections using a round-robin method to spread out the write operations to different files. The first record is stored in the first section, the second record the second section, and so on. After a new record has been stored in the last section, the next new record goes in the first section, and so on. If the space of a deleted record exists in a particular section, that record slot is used first when adding records. Because of the manner in which new records are added to sectioned data sets, sections should not be used if it is desirable to maintain the records in a specific order.

Tip: If the value of SECTIONS is greater than 1, make the data set pack family a multi‑indexed pack family. Having multiple data set sections helps reduce block lock contention during record updates and deletions.

Data set attributes such as AREA, AREASIZE, and BLOCKSIZE apply to each data set section. However, POPULATION applies to the entire data set. All data set sections reside on the pack family specified in DASDL.

The file name format for data set sections is

<database name>/<data set name>/DATA/<n>

The variable <n> is a 1-digit to 3‑digit unsigned integer representing the section number. Section numbers start at zero (0). For example, in a 3‑section data set, the file names would be

(TESTUC)TESTDB/DATASET1/DATA/0
(TESTUC)TESTDB/DATASET1/DATA/1
(TESTUC)TESTDB/DATASET1/DATA/2

The system handles changes in the values of the SECTIONS option as follows:

  • For a decrease in the number of sections, the Reorganization program redistributes records in the remaining sections and removes extraneous sections.

  • For an increase in the number of sections, the Reorganization program creates additional section files and redistributes existing records to all sections.

The time needed for reorganization using the OFFLINE option can increase significantly as the number of sections and areas increases.

When the redistribution of records becomes skewed, you can perform a garbage collection reorganization to redistribute records evenly among the sections.

When you specify SECTIONS for a data set, the key size of sets or subsets that span the data set is increased by one word to hold the absolute address (AA) of records in the sections.

Be sure to take into account the value for the data set SECTIONS option when you calculate set and subset TABLESIZE specifications.

Increasing the number of sections for a data set might require a higher value for the ALLOWEDCORE parameter to avoid an increase in forced overlays, which could impact performance.