Understanding how IMS uses space in database data sets

Understanding how IMS uses space in full-function database data sets helps you manage your databases more efficiently.

A full-function database consists of one or more data sets. As IMS data increases in the data set, the free space in the data set decreases. When all the free space is used up, IMS applications cannot insert new segments or replace existing segments. To prevent this situation, you must take appropriate actions to mitigate the potential problems before they become significant issues. If you observe any space use exceptions, you must analyze the exceptions and establish action plans to resolve and prevent these exceptional states from occurring in the future.

This topic explains how the space in full-function database data sets is used by IMS. By understanding how IMS uses the space, you can address space use exceptions faster and maintain your data sets more efficiently.

Out-of-space problems can be caused by one of the following three conditions:

Primary space is used up
Primary allocation space is used up.
The data set is full
Data set size has reached the maximum limit that is defined by IMS.
Extent resources are used up
Data set cannot be expanded.

A primary-space-used-up condition occurs for the data sets that have only primary space allocated. Data-set-full and extent-resources-used-up conditions occur for the data sets that can allocate secondary space. When secondary space allocation is specified, data sets are expanded until a data-set-full or an extent-resources-used-up condition occurs.

The most appropriate method for resolving an out-of-space condition depends on the cause. Therefore, when you receive a space use exception, you must first identify the cause of the exception.

How IMS uses space in data sets

The following figure shows how IMS uses space in a full-function database data set.

Figure 1. Space map of a full-function database data set
This figure shows how IMS uses space in full-function database data sets. Detail of the figure is described in this topic.

Locate allocated space and used space in the figure. The term allocated space refers to the space that is allocated by the file management system, and the term used space refers to the space that is used by IMS.

When IMS uses a data set for the first time, IMS formats the control intervals (CIs) or blocks that are inside the allocated space so that the data set can be used by IMS. The space that is formatted by IMS is the used space.

Immediately after the space is formatted, CIs or blocks contain no data, which means that CIs or blocks consist of only free space. When IMS applications run insert or replace operations, IMS stores the segment data in the free space. In these topics, this free space is referred to as IMS free space. However, the space in the allocated space (managed by the file management system) that is not used by IMS is generally known as free space. In these topics, to distinguish the terms, this free space is referred to as unformatted space.

Primary-space-used-up condition

When a database data set has only primary allocated space, and when the primary space is used up, IMS cannot add segments to the data set.

When the amount of IMS free space becomes too small to store new segment data in the remaining IMS free space, IMS formats additional CIs or blocks to expand the used space. When new CIs or blocks are formatted, IMS free space is increased and new segment data can be added. IMS repeats this, as necessary, until the size of the used space reaches the size of the allocated space. When the size of the used space reaches the primary allocated space and if the remaining IMS free space is not enough to store new segment data, IMS cannot insert or replace new segment data. This state is referred to as the primary-space-used-up condition.

Even if the primary allocated space is larger than the maximum size that is limited by IMS (4 GB or 8 GB), the used space cannot be larger than the size that is limited by IMS. When the amount of IMS free space is insufficient, IMS cannot insert or replace segment data.

The Policy Evaluation Services of Autonomics Director monitors these space resources, and when a primary-space-used-up condition is predicted, it sends a notification to the DBA.

Data-set-full condition

IMS limits the size of a database data set to either 4 GB or 8 GB. When the size of a data set reaches the maximum limit, that state is referred to as the data-set-full condition. To avoid data sets becoming full, DBAs must constantly identify the remaining free space in the data sets.

When the amount of IMS free space becomes too small to store new segment data in the remaining IMS free space, IMS formats additional CIs or blocks to expand the used space. When new CIs or blocks are formatted, IMS free space is increased, and new segment data can be added. IMS repeats this, as necessary, until the size of the used space reaches the size of the allocated space. Eventually, when the allocated space is used up, the file management system allocates an additional extent to make the allocated space larger. IMS continues to format additional CIs or blocks to expand the used space.

When the size of the used space reaches the maximum limit, and the remaining IMS free space is not enough to store new segment data, IMS cannot insert or replace new segment data, and a data-set-full condition occurs.

The Policy Evaluation Services of Autonomics Director monitors these space resources, and when a data-set-full condition is predicted, it sends a notification to the DBA.

Extent-resources-used-up condition

As mentioned in the explanation for the data-set-full condition, the file management system allocates a new extent to expand the data set. However, the file system cannot allocate a new extent if any one of the following conditions are met:

Insufficient available space on DASD volume
A data set can be allocated across multiple DASD volumes. The number of DASD volumes is specified when a data set is created. If the available space in the current volume is not enough, the file management system uses the next DASD volume to allocate the data set extent. However, when all DASD volumes are used up, and if the last DASD volume does not have enough space for an extent, the file management system cannot expand the data set.
Volume extent limit reached
The number of data set extents on one DASD volume is limited by the file management system. When the data set uses up the last DASD volume, and if the volume extent limit is reached, the file management system cannot expand the data set.
Data set extent limit reached
The number of data set extents for a data set is limited by the file management system. When the data set reaches the data set extents limit, the file management system cannot expand the data set.

The following figure shows how DASD volumes are used and each condition that causes an extent-resources-used-up condition.

Figure 2. How an extent-resources-used-up condition occurs
This figure shows how DASD volumes are used and the conditions that cause extent-resources-used-up conditions. Detail of the figure is described in this topic.

When the file management system cannot expand the data set, IMS cannot insert or replace a segment. To prevent this condition, you must monitor these space resources.

The Policy Evaluation Services of Autonomics Director monitors these space resources, and when an extent-resources-used-up condition is predicted, it sends a notification to the DBA.

By using Autonomics Director, you can detect potential exceptional states based on a predefined policy. When you receive exceptions from Autonomics Director, analyze the exceptions and establish an action plan before they become significant issues.