z/OS DFSORT Application Programming Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


File size and dynamic allocation

z/OS DFSORT Application Programming Guide
SC23-6878-00

DFSORT bases the amount of work space it dynamically allocates on the number of bytes to be sorted—the input file size. Generally, DFSORT can automatically make an accurate determination of the file size by determining the number of input records. However, DFSORT cannot always determine the input file size accurately in the following cases:
  • An E15 user exit routine supplies all input records (an input data set is not present). DFSORT cannot automatically determine the number of records to be inserted.
  • An input data set is present, along with an E15 user exit routine. DFSORT can automatically determine the number of records in the input data set, but cannot automatically determine the number of records to be inserted or deleted.
  • A spool (DD *) or pipe data set is used as input.
  • The input consists of small data sets on tape that are not managed by DFSMSrmm or a tape management system that uses ICETPEX. When the tape data sets are not managed, DFSORT cannot know how much of the tapes are used, so it determines the file size assuming full volumes at the maximum regular density for the drives.
  • The Improved Data Recording Capability (IDRC) feature is used for the input device and the tape data sets are not managed by DFSMSrmm or a tape management system that uses ICETPEX.
  • Input data sets are members of partitioned data sets. DFSORT cannot determine the size of a member in a partitioned data set. Therefore, when input data sets are partitioned, DFSORT uses the size of the entire data set as the input file size. This is usually an over-estimation, which leads to over-allocation of work space.
In these circumstances, if the number of records is not supplied by the FILSZ or SIZE option, you will receive message ICE118I. If dynamic allocation of work data sets is used, DFSORT allocates the primary space according to the DYNSPC value in effect. This can result in underallocation or overallocation, possibly leading to wasted space or an out-of-space condition, respectively. DFSORT will also allocate additional work data sets with zero space that can be used to recover from an out of space condition. The percentage of additional work data sets will be the greater of 50% or the DYNAPCT value in effect. To avoid unknown file size situations, you should specify FILSZ=En with a reasonably accurate estimate of the number of records to be sorted. If you cannot specify FILSZ=En, you should use DYNSPC=n to adjust the primary space for dynamically allocated work data sets and DYNAPCT=x to increase the number of additional work data sets, as appropriate.
Note: FILSZ=E0 is ignored.

For variable-length records, DFSORT uses one-half of the maximum record length (LRECL) in conjunction with the number of records to determine the input file size, unless you specify AVGRLEN=n. If your actual average record length is significantly different from one-half of the maximum record length, specifying AVGRLEN=n can prevent DFSORT from overallocating or underallocating dynamic work space.

See OPTION control statement for more information about the AVGRLEN, DYNSPC, FILSZ, and SIZE options.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014