sort algorithm selection can be improved by the inclusion of actual and estimated input file sizes, sort work space requirements can also be calculated from these file sizes and then dynamically allocated. Recommendable is omitting SORTWK DDs from the JCL, thus allowing the sort software to dynamically allocate its SORTWK DDs. The sort?s installation default should be set to a minimum of three SORT WK datasets (DDs).
Which sort utility are you using (DFSORT, Syncsort, CA-Sort)? If you don't know, you can find out by taking a look at the //SYSOUT messages from a sort run. If you have ICExxxs messages, you're using DFSORT. If you have WERxxxs messages, you're using Syncsort. If you have CASxxxs messages, you're using CA-Sort.
sort algorithm selection can be improved by the inclusion of actual and estimated input file sizes
For DFSORT, this is generally not needed because DFSORT can automatically determine the filesize. There are a very few exceptions such as when an E15 exit supplies all of the records or when the input is unmanaged tape.