POPULATION Option

The POPULATION (or MAXRECORDS) option specifies the expected size of a data set. The maximum population value of a structure, excluding an embedded data set and a direct data set, is 549,755,813,887 records. If the population is specified and it is greater than 268,435,455 records, the SECTIONS option is required. The embedded data set has a maximum population value of 268,435,455 records. A direct data set has a maximum population value of 99,999,999,999 records. The AREAS or AREASIZE option might be required if the value of the specified population is too large.

For disjoint data sets, the population indicates the number of records which the data set is expected to contain.

For embedded data sets, the population indicates the average number of records in each master. The POPULATION option does not limit the number of records for each owner; some owners can contain substantially more records than the specified population, while others contain no records.

For partitioned data sets, the POPULATION option specifies the size of each partition.

When a population is specified but areas or area size is not, the system computes a default value for the AREAS and AREASIZE options based on the specified population. When population and areas are specified, the system uses these values to compute an area size. Similarly, the system computes the areas if population and area size are stipulated. When areas and area size are specified but population is not, the system computes the population based on the values of areas and area size. If both the AREAS and AREASIZE options are specified with the POPULATION option, the POPULATION specification is recorded, but not used.

If the computed population value exceeds the maximum, the system displays a warning message and places the maximum value in the description file. However, the listing prints the POPULATION value, which is based on the value of AREAS multiplied by AREASIZE multiplied by the number of sections.

If you are using variable-format data sets, and you do not specify the number of areas, the DASDL compiler computes the number of areas by multiplying the largest record length times the population. It is still possible to receive a limit error when adding long records (those records with the largest variable‑format part) even though the declared population has not been exceeded.

The default population value for disjoint data sets is 10,000 and for embedded data sets is 10 for each master.

When you use the XE features and you section disjoint compact, random, or standard data sets, the DASDL POPULATION option value indicates the expected number of records in the combined sectioned files.

For a sectioned direct data set, you cannot specify the POPULATION option since it is unclear how the population is to be distributed among the various sections.

For a sectioned direct data set, the following information applies:

  • The file size per section is by default derived from the size of the largest section in the Access based on the difference between consecutive section bounds. This default file size per section can be overridden by specifying the full file size per section using AREAS, AREASIZE, and BLOCKSIZE if AREASIZE is given in blocks.

  • The embedded structures (data sets, sets, and subsets) of a sectioned direct data set must have their file sizes fully specified using AREAS, AREASIZE, and BLOCKSIZE if AREASIZE is given in blocks.

  • The index sets and subsets of a sectioned direct data set must have their file sizes fully specified using AREAS, AREASIZE, and BLOCKSIZE if AREASIZE is given in blocks.

For a sectioned direct data set, the population for a section is implicitly defined by the largest section based on the section boundaries as specified in the data set access. For example, if the section boundaries are 1000, 4000, and 5000, then the population per section is 3000.

When a data set is sectioned, the same physical file attributes, such as BLOCKSIZE, AREASIZE, and AREAS, are used for all sections. Default values are determined based on the section with the largest population, but can be explicitly overridden using data set physical options. The DASDL POPULATION option value is used to calculate the initial file size of the structure only.

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

The actual capacity of the structure can go well beyond the specified POPULATION value if sections are added to the structure or if the POPULATIONINCR feature is used. If the AREAS and AREASIZE are not specified, then these values are computed based on 1/nth of the POPULATION value, where n is the number of data set sections.

If POPULATION is not specified, but AREAS, AREASIZE, and BLOCKSIZE are specified, then DASDL applies the specifications to each section so that the resulting population of the data set is based on the following formula:

AREAS * AREASIZE * BLOCKSIZE * number of sections = POPULATION

If a mixture of options are specified, calculations are based on the options specified.

  • If AREAS, AREASIZE, BLOCKSIZE (when AREASIZE is given in blocks), and POPULATION are specified, POPULATION is treated as a comment.

  • If POPULATION is specified with either AREAS or AREASIZE, the option not specified is calculated based on the specified options.

  • If POPULATION and AREAS are specified for a sectioned data set, the AREASIZE value calculated is large enough to contain the entire population within each section.

  • If POPULATION and AREASIZE are specified for a sectioned data set, the number of AREAS calculated for each section allows for POPULATION per records (number of sections).

The POPULATIONWARN and POPULATIONINCR attributes, if set, apply to individual data set sections, as follows:

  • If a section file reaches the POPULATIONWARN threshold, a warning is issued for that section file.

  • If a section file reaches the POPULATION threshold, that file is increased in size by the POPULATIONINCR value.

These actions occur even if the distribution of data has been uneven and other sections have sufficient room to accommodate additional records.

If you do not specify a POPULATION value, adding sections is another way to increase the capacity of a data set structure. Both the POPULATIONINCR value and the option to add sections are ways to manage dynamic data set growth.

The POPULATIONWARN attribute, in addition to applying to each section, also applies to the entire data set and issues a different warning when the population of the data set reaches the designated threshold.