![]() |
The MODULUS option is used only with Accesses to random data sets. The MODULUS values provide the scramble-modulus used to compute the table number for the start of a search and control the number of basic tables allocated when the random data set is initialized. (Refer to “Random Data Sets” in Structure Formats for additional details.) |
The MODULUS value is considered a data set attribute. When the SECTIONS option is specified for the Access for a random data set, the assigned MODULUS value is for the logical data set, not the individual sections. The Enterprise Database Server divides the assigned value by the number of sections indicated for the Access to derive a MODULUS value for each section. In some cases, the resulting MODULUS value might not be optimal.
Therefore, when using both the MODULUS and SECTIONS options for the Access to a random data set, consider both the effect of dividing the MODULUS value by the number of sections and the resulting distribution of data.
The default MODULUS value is calculated using the BLOCKSIZE in records, AREASIZE in records, and user AREAS of the spanned data set as follows:
MODULUS = (AREAS * AREASIZE) DIV (2 * BLOCKSIZE)
For a large RANDOM data set, this default MODULUS value might be too large if the BLOCKSIZE, AREASIZE, or AREAS of the data set are specified. This is especially true when the data set is sectioned by the Access. If the default MODULUS value is too large, a more appropriate MODULUS value should be specified. Otherwise, it takes a lot of time and disk space to initialize the data set.