Inefficient input and output procedures can make the sort process appear to be very slow.
During a SORT operation, the more file I/O operations that can be processed in memory, the more efficient the SORT will be. Therefore, there are a number of environment variables that allow you to set the amount of memory allocated to a SORT operation: SORTSPACE, SORTTEMPSPACE, SORTTYPE, SORTCOMPRESS, and SORTSCHEME. Topics on the these variables give certain guidelines on the levels that may produce the best performance, but experimenting with these settings yourself is advisable.