Data sets that online utilities use
Every online utility requires an input data set with the utility control statement. Some utilities require additional data sets.
In the utility job, use the SYSIN DD statement to define an in-stream data set with the utility statement. Use other DD statements to define any other data sets that the utility needs. Alternatively, you can use the TEMPLATE utility to define those data sets.
See the description of each utility for a list of data sets that it uses.
General rules for utility data sets
Data sets for utilities have the following requirements and restrictions:
- For input data sets
- Db2® utilities use the logical record length (LRECL),
the record format (RECFM) and the block size (BLKSIZE) with which the data set was created.
Variable-spanned (VS) or variable-blocked-spanned (VBS) record formats are not allowed for utility input data sets. The only exceptions are for the LOAD and UNLOAD utilities. These utilities use VBS data sets when you specify the FORMAT SPANNED YES option. Also, LOAD accepts VBS data sets when you specify the FORMAT SQL/DS option.
- For output data sets
- Db2 utilities determine both the logical record
length (LRECL) and the record format (RECFM). Any specified values for LRECL or RECFM are ignored.
If
you supply block size (BLKSIZE), that size is used; otherwise, the system determines the optimal
block size for the storage device. Db2
supports the large block interface (LBI), which allows block sizes that are greater than 32 KB on
certain tape drives. UNLOAD SPANNED YES ignores LBI for output data sets. The TAPEBLKSZLIM parameter
of the DEVSUPxx member of SYS1.PARMLIB controls the block size limit for tapes. 
Partitioned data sets (PDS) are not allowed for output data sets.
- For output data sets for FlashCopy® image copies
- The output VSAM data sets are allocated during the processing of the DFSMSdss COPY command. The output data sets for FlashCopy image copies are always cataloged.
- For both input and output data sets
- Db2 utilities use the value that you
supply for the number of buffers (BUFNO), with a maximum of 99 buffers. The default number of
buffers is 20. The utilities set the number of channel programs equal to the number of buffers.
Utilities ignore the parameters that specify the buffer size (BUFSIZE) and the number of channel
programs (NCP).
Increasing the number of buffers (BUFNO) can result in an increase in real storage usage and page fixing below the 16-MB line.
If you omit any data control block (DCB) parameters, the utilities use default values.
Db2 utilities support the use of extended address volumes (EAV) for VSAM data sets and extended format (EF) sequential data sets.

Sort work data sets
Allocate sort work data sets dynamically for automatic adjustment to the amount of data being processed by the utility. To facilitate dynamic allocation of sort work, specify a valid disk device type for the SORTDEVT parameter. Tape devices are not supported by the sort program.

Data set concatenation
When you use Db2 utilities, you can concatenate input data sets. The data sets in a concatenation list can have different block sizes, logical record lengths, and record formats. If you want to concatenate variable and fixed-blocked data sets, the logical record length must be 8 bytes smaller than the block size.
You cannot concatenate output data sets.
Data set disposition
Because you might need to restart a utility, define your data sets as follows:
- Use DISP=(NEW,CATLG,CATLG) or DISP=(MOD,CATLG) for data sets that you want to retain.
- Use DISP=(MOD,DELETE,CATLG) for data sets that you want to discard after utility execution.
- Use DISP=(NEW,DELETE) for the SORTWKnn data sets for your sort program, or refer to the documentation for your sort program for alternatives.
- Do not use temporary data set names.
Preventing unauthorized access to data sets
To prevent unauthorized access to data sets (for example, image copies), you can protect the data sets with the Resource Access Control Facility (RACF®) licensed program. To use a utility with a data set that is protected by RACF, you must be authorized to access the data set.