TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)
Chapter 10 477
Internal Structures and Techniques
Dynamic Data Set Expansion
• Both maximum capacity and initial capacity are specified
• Initial capacity is neither zero nor equal to the maximum capacity
You can select data sets which need dynamic expansion based on anticipated growth.
For new databases, the expansion parameters for data sets can be specified using the
CAPACITY statement of DBSCHEMA as follows:
{ CAPACITY:
C: }
maximum capacity
[(
blocking factor
)] [
,initial capacity
[
,increment
]];
To specify the expansion parameters for data sets of existing databases, use DBChange
Plus, or other third-party tools which support this feature.
In order to use this feature from the user point of view, the only required step is to identify
and enable the data set(s) for dynamic expansion as described above.
When a data set enabled for dynamic expansion is first created, disk space for only the
initial capacity is allocated and initialized. Later when the data set is expanded during
DBPUT, or implied DBPUT for automatic master, additional disk space based on the
increment is allocated and initialized. It can grow up to the maximum capacity specified
for the set. Following the expansion, TurboIMAGE/XL updates various fields related to the
expansion such as current capacity including the expansion and free space counter in the
user label.
The instant when the expansion is triggered and how record addresses are assigned to the
new entry vary in detail data sets from master data sets.
Detail Data Sets
For a detail data set, expansion takes place during DBPUT when the free space counter for
the set is zero. Following the expansion, TurboIMAGE/XL updates the expansion related
fields in the user label such as the end-of-file pointer (high-water mark) and the free space
counter. The expanded data set is perceived as one larger data set and the new record
addresses are assigned using the pointer to delete chain head and the end-of-file pointer
(high-water mark) as done prior to the dynamic expansion feature. The new entry is
assigned the first record address in the expanded area.
Master Data Sets
For a master data set, expansion is triggered when the set is almost full. That is, when the
set has approximated its maximum capacity which will not allow DBPUT to be successful.
For an example, a DBPUT to a detail set with multiple paths to the same automatic master
will require multiple record additions to the automatic master.
Once the expansion is done, the master data set can be perceived as having two areas,
original area and expanded area, managed differently. The original area can have primary
entries and secondary entries, while the expanded area can only have the secondary
entries. Note that the primary capacity (also called hashing capacity or initial capacity),
which is used to calculate the primary address does not change. In essence, the dynamic
expansion results in allocating additional space for secondary entries which implicitly
makes room for additional primary entries in the original area. The primary address of a