SORTWK data sets
SORTWK data sets are the work files that BMCSORT uses.
When you specify DIRECT YES, BMCSORT uses the SORTWK data sets in the unload phase for processing.
For any job in which UNLOAD PLUS performs a sort, you must allocate SORTWK files in one of the following ways:
- (recommended) Have BMCSORT dynamically allocate SORTWK data sets.
- Explicitly specify SORTWK DD statements in your JCL. Use this option when you want to control the allocation of your SORTWK data sets.
Dynamically allocating SORTWK data sets
BMCSORT dynamically allocates SORTWK data sets under either of the following circumstances:
- You specifically request dynamic allocation through command or installation options as described in the following table.
- BMCSORT determines that it needs more sort work space than you have allocated in your JCL, and dynamic allocation is enabled through command or installation options.
Several factors affect this dynamic allocation. The following table describes the results of combining these factors:
SORTNUM or SORTDEVT | Third parameter of BMCSORT DYNALOC | Results |
|---|---|---|
SORTDEVT specified or SORTNUM n specified (where n is greater than 0) | ON or OFF If the value is OFF, specifying a value greater than 0 for SORTNUM or specifying SORTDEVT changes this value to ON. | If you specify a SORTNUM value that is greater than 32, BMCSORT allocates the number of data sets that it determines it needs, up to the specified number of data sets per task. Otherwise, BMCSORT allocates the number of data sets that it determines it needs up to 32 per task. |
SORTDEVT not specified and SORTNUM 0 | ON | BMCSORT allocates the number of data sets that it determines it needs, up to 32 per task. |
OFF | BMCSORT does not allocate any sort work data sets and attempts to perform sort processing in memory. |
To ensure that BMCSORT has enough information to allocate SORTWK space accurately and efficiently, specify the ENUMROWS command option and a value greater than 0 for the SORTNUM command option.
Allocating SORTWK data sets in your JCL
If you cannot dynamically allocate SORTWK data sets, you must specify SORTWK DD statements in your JCL. The number of SORTWK files should be evenly divisible by the number of tasks, with a minimum of two files per task. Available resources might limit the number of concurrent tasks to four; therefore, if you allocate twelve SORTWK files, UNLOAD PLUS can run up to four tasks without wasting sort space.
Calculating partitioned sort work space
If the table space is partitioned, you can use the formulas in this section to calculate the minimum amount of sort work space that UNLOAD PLUS requires. This strategy allows enough sort work space to perform the sort. If the resulting data set size is not optimal, the elapsed time for the unload increases, but the utility can complete processing, despite the space constraint.
To determine the data set size when you specify the partitions to unload (by using the PART option), calculate the following value, and divide it by the number of SORTWK data sets that you are allocating. Use values from your largest single partition.
To determine the data set size when you are not specifying any partitions, calculate the following value and divide it by the number of SORTWK data sets that you are allocating. Use values from your largest single partition. MAXP is the maximum number of partitions that you want to unload concurrently with a single task.
Calculating nonpartitioned sort work space
To determine the data set size for a nonpartitioned table space, use the following formula to calculate the value, and divide it by the number of SORTWK data sets that you are allocating.
Restrictions
You cannot allocate a SORTWK data set as any of the following data set types:
- A VIO data set
- A tape data set
- A multi-volume data set
A data set in an SMS storage group that specifies EXTENDED FORMAT YES
BMCSORT does not support SORTWK data sets that extend beyond 65535 tracks on a single volume.
Consideration
When unloading from multiple table spaces, UNLOAD PLUS attempts to use multiple tasks to unload partitioned table spaces first. After unloading the partitioned table spaces, UNLOAD PLUS uses multiple tasks to unload all remaining table spaces, assigning one table space per task. You must ensure that you allocate enough sort work space to the sort work data sets so that there is sufficient space to sort the largest participating table space. If you are using UNLOAD PLUS to unload from multiple table spaces, we recommend that you allocate enough sort work space to each set of sort work data sets so that there is sufficient space to sort the largest participating table space.
Related topics