Average record length
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:
- For
U, use a scale of 1. - For
K, use a scale of 1024. - For
M, use a scale of 1048576.
// 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 enoughFrom 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 bytes 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
27998. Two blocks of block length 27998 can be written on a 3390 device: (1.6MB / 27998) / 2 = 30 = primary space in tracks
(160KB / 27998) / 2 = 3 = secondary space in tracks
Note that for extended format, you must allow for
an additional 32 bytes per block. Int that case, the maximum block size that you can use with two
blocks per track would be 27966.
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.