Method of optimization

IMS Sequential Randomizer Generator creates a temporary SR load module and simulates the invoking of SR by IMS based on the input database keys to check if the optimization conditions are satisfied. If not, IMS Sequential Randomizer Generator adjusts the equation table by dividing the equations that do not satisfy the optimization conditions.

This process is repeated until the optimization conditions are satisfied. This optimization will generate an SR with fewer synonyms and better I/O efficiency, but the size of the equation table may be greater than that specified in the control statement, and the total number of RAPs may increase. The relationship between optimization conditions and the equation division is summarized in Table 1 and Table 2.

HDAM and PHDAM
Table 1. Relationship between optimization conditions and equation division (HDAM and PHDAM)
Maximum number of synonyms is specified Maximum number of synonyms is not specified
CI capacity ratio Is Specified or not specified Equations are divided when the maximum number of synonyms is not satisfied. Equations are not divided.
DEDB
Table 2. Relationship between optimization conditions and equation division (DEDB)
Maximum number of synonyms is specified Maximum number of synonyms is not specified
CI capacity ratio is specified Equations are divided when either of the two conditions is not satisfied. Equations are divided when the CI capacity ratio is not satisfied.
CI capacity ratio is not specified Equations are divided when the maximum number of synonyms is not satisfied. Equations are not divided.
Note: When default values are specified for these conditions, they are treated as if the options were not specified.

Example

Suppose the specified optimization condition for the maximum number of synonyms is 2 when the RAP total is 100 and the key total is 100, and the equations are created as follows:
This figure shows an example of how equations are created.

Equation a1 is not divided because the number of keys assigned to each RAP does not exceed the maximum number of synonyms. In equation a2, the number of synonyms for the RAP number 7 is 3, which exceeds the maximum number of synonyms; therefore, a new equation is created for the first three keys assigned to the RAP number 7.

Limiting the equation table size

When the OPTMZ parameter is specified in the SRG control statement, IMS Sequential Randomizer Generator optimizes the equation table by increasing the size of the table. By specifying the TLIMIT parameter or the TNUMLIM parameter of the SRG control statement (on the AREADEF statement for DEDB, or on the ANALYZE statement for HDAM and PHDAM), you can specify a maximum table size.

When TLIMIT is specified, IMS Sequential Randomizer Generator stops the optimization of an equation table when its size becomes equal to or greater than the specified value, and the equation table is generated. In this case, the conditions specified in the OPTMZ parameter may not be satisfied.

When TNUMLIM is specified, IMS Sequential Randomizer Generator stops the optimization of an equation table when the number of equation table entries becomes equal to or greater than the specified value, and generates the equation table. In this case, the conditions that are specified in the OPTMZ parameter might not be satisfied.

Limiting the optimization elapsed time

By specifying the OPTMTIME parameter on the AREADEF control statement (for DEDBs) or on the ANALYZE control statement (for HDAM and PHDAM databases), you can set a time limit for the equation table optimization processing.

If you specify the OPTMTIME parameter, IMS Sequential Randomizer Generator stops the optimization of the equation table when the elapsed time reaches the time limit and generates the equation table. In this case, the conditions that are specified in the OPTMZ parameter might not be satisfied.