When the amount of space required is expressed in average record
length, you must specify the number of records within the data set
and their average length. Use the AVGREC keyword to modify the scale
of your request. When AVGREC is specified, the first subparameter
of SPACE becomes the average record length. The system applies the
scale value to the primary and secondary quantities specified for
the SPACE keyword. Possible values for the AVGREC keyword follow:
U—Use a scale of 1
K—Use a scale of 1024
M—Use a scale of 1048576
When the
AVGREC keyword is specified, the values specified for primary and
secondary quantities in the SPACE keyword are multiplied by the scale
and those new values will be used in the space allocation. For example,
the following request results in the primary and secondary quantities
being multiplied by 1024:
// DD SPACE=(80,(20,2)),AVGREC=K, ...
80 = average record length in bytes
80 * 20 * 1024 = 1.6 MB = primary space
80 * 2 * 1024 = 160 KB = secondary space, to be allocated if the
primary space is not enough
From this information, the operating system estimates and allocates
the number of tracks required using one of the following block lengths,
in the order indicated:
- 4096, if the data set is a PDSE.
- The BLKSIZE parameter on the DD statement or the BLKSIZE subparameter
of the DCB parameter on the DD.
- The system determined block size, if available.
- A default value of 4096.
For an extended-format data set, the operating system uses a value
32 larger than the preceding block size. The primary and secondary
space are divided by the block length to determine the number of blocks
requested. The operating system determines how many blocks of the
block length can be written on one track of the device. The primary
and secondary space in blocks is then divided by the number of blocks
per track to obtain a track value, as shown in the following examples.
These examples assume a block length of 23200. Two blocks of block
length 23200 can be written on a 3380 device:
(1.6MB / 23200) / 2 = 36 = primary space in tracks
(160KB / 23200) / 2 = 4 = secondary space in tracks
In the preceding calculations, the system does not consider if
it is a compressed format data set. This means the calculation is
done with the user-perceived uncompressed block size and not the actual
block size that the system calculates.