z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Altering the Free Space Specification When Loading a Data Set

z/OS DFSMS Using Data Sets
SC23-6855-00

The following example uses the ALTER command to change the FREESPACE specification when loading a data set.

Assume that a large key-sequenced data set is to contain records with keys from 1 through 300␠000. It is expected to have no inserts in key range 1 through 100␠000, some inserts in key range 100␠001 through 200␠000, and heavy inserts in key range 200␠001 through 300␠000.

An ideal data structure at loading time would be:
Key Range Free Space
1 through 100␠000 None
100␠001 through 200␠000 5% control area
200␠001 through 300␠000 5% control interval and 20% control area

You can build this data structure as follows:

  1. DEFINE CLUSTER and do one of the following:
    • Omit the FREESPACE parameter
    • Specify FREESPACE (0 0)
    • Specify DATACLAS and use the FREESPACE attribute assigned through the automatic class selection routines established by your storage administrator.
  2. Load records 1 through 100␠000 with REPRO or any user program using a sequential insertion technique.
  3. CLOSE the data set.
  4. Change the FREESPACE value of the cluster with the access method services command ALTER clustername FREESPACE (0 5). Explicit specification of FREESPACE overrides the data class attribute assigned by your storage administrator.
  5. Load records 100␠001 through 200␠000 with REPRO or any user program using a sequential insertion technique.
  6. CLOSE the data set.
  7. Change the FREESPACE value of the cluster with the access method services command ALTER clustername FREESPACE (5 20).
  8. Load records 200␠001 through 300␠000 with REPRO or any user program using a sequential insertion technique.
This procedure has the following advantages:
  • It prevents wasting space. For example, if FREESPACE (0 10) were defined for the whole data set, the free space in the first key range would all be wasted.
  • It minimizes control interval and control area splits. If FREESPACE (0 0) were defined for the whole data set, there would be a very large number of control interval and control area splits for the first inserts.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014