SORTWK data sets in LOADPLUS
For any job in which LOADPLUS performs a sort, you must allocate SORTWK files in one of the following ways:
- (recommended unless you are running a DSNUTILB load) Have BMCSORT dynamically allocate SORTWK data sets. For more information, see Dynamically allocating SORTWK data sets.
Have LOADPLUS dynamically allocate SORTWK data sets (by specifying the DDTYPE option). For more information, see Dynamically allocating SORTWK data sets.
This method is required for a DSNUTILB load.
- Explicitly specify SORTWK DD statements in your JCL. Use this option when you want to control the allocation of your SORTWK data sets. For more information, see SORTWK-data-sets-in-LOADPLUS and Allocating SORTWK data sets in your JCL.
Dynamically allocating SORTWK data sets
Dynamic allocation takes place when one of the following actions occurs:
- You specifically request dynamic allocation through command or installation options.
- BMCSORT determines that it needs more sort work space than other allocation methods provide (allocated in your JCL, dynamically allocated by LOADPLUS, or both).
Several factors affect this dynamic allocation as described in the following sections.
LOADPLUS allocation (ACTIVE YES)
If LOADPLUS dynamic allocation is active for sort work data sets, LOADPLUS allocates at least 12 and up to 99 sort work data sets, depending on the total space required. LOADPLUS dynamic allocation is active when both of the following conditions exist:
- You specify ACTIVE YES for DDTYPE SORTWORK.
- Either you specify values for ENUMROWS, or ENUMROWS is automated.
Note the following considerations:
- File size estimation must be automated (AUTOENUMROWS=YES or ENUMROWS AUTO), or you must specify a value for ENUMROWS. Otherwise, LOADPLUS dynamic allocation is not active and, if BMCSORT allocation is active, BMCSORT performs dynamic allocation of sort work data sets.
- If you specify IFALLOC USE, LOADPLUS allocates sort work data sets, if needed, in addition to the ones specified in your JCL.
- When LOADPLUS dynamic allocation is active for sort work data sets, any values that you specify for SORTNUM, SORTDEVT, and the BMCSORT DYNALOC installation option are not used for allocation unless BMCSORT determines that it needs more sort work data sets than LOADPLUS allocated. In this case, BMCSORT uses these options, but only for allocation of the additional data sets.
- For tables with variable length rows, LOADPLUS allocates sort work (SORTWK) data sets based on the average row length. If this calculation results in a large difference from the actual average, use the SIZEPCT option to adjust the file allocations.
BMCSORT allocation
If BMCSORT allocation is active (see the following table), BMCSORT dynamically allocates your sort work files in the following cases:
- If LOADPLUS dynamic allocation is not enabled for sort work files (ACTIVE NO) and you have not specified SORTWK DD statements in your JCL
- In special cases when LOADPLUS dynamic allocation is enabled (see Allocating SORTWK data sets in your JCL)
- In special cases when you have allocated sort work data sets in your JCL (see Allocating SORTWK data sets in your JCL)
The following table describes how BMCSORT allocates sort work files based on values for the SORTDEVT and SORTNUM command options and the BMCSORT DYNALOC installation option:
SORTDEVT and SORTNUM | 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 sort task. Otherwise, BMCSORT allocates the number of data sets that it determines it needs, up to 32 per sort task. |
SORTDEVT not specified and SORTNUM 0 | ON | BMCSORT allocates the number of data sets that it determines it needs, up to 32 per sort task. |
OFF | BMCSORT does not allocate any sort work data sets and attempts to perform sort processing in memory. |
Allocating SORTWK data sets in your JCL
Unless you specify ACTIVE YES IFALLOC FREE for LOADPLUS dynamic allocation of sort work data sets, LOADPLUS uses any SORTWK DD statements that you specify in your JCL.
To allocate SORTWK data sets in your JCL, determine the space needed for these data sets by specifying ANALYZE PAUSE or ANALYZE ONLY. These options tell LOADPLUS to provide an estimate of the space that is needed for your work data sets. For more information, see ANALYZE option for estimating data set allocation in LOADPLUS.
When determining the number of concurrent tasks to run, LOADPLUS checks the amount of sort work space that is allocated. In this calculation, LOADPLUS uses only the primary allocation. The secondary allocation is not guaranteed.
Additional considerations
Note the following information when allocating SORTWK data sets in your JCL:
- 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.
- When you specify SORTWK DD statements in your JCL, BMCSORT dynamically allocates additional sort work data sets when both of the following conditions exist:
- BMCSORT determines that it needs more sort work space than you have allocated.
- BMCSORT dynamic allocation is enabled (in other words, either the third parameter of DYNALOC is ON, SORTDEVT is specified, or SORTNUM is specified with a value greater than 0).