If the number of tapes is 0 and the disk size is greater than 0, SORT operates in disk-only mode. In this mode, all sort work files are maintained on disk. Disk-only mode is generally the fastest mode.
Disk-Only Stringing Phase
Strings are written serially to the sort work file, titled DISKF, as they are formed during the stringing process. For each string, a disk control word is retained for use during the merge phase. A disk file, titled DISKC, is allocated for these control word records.
If disk space is exhausted during the stringing phase, the sort operation is terminated.
Disk-Only Merging Phase
The disk merging phase begins after the stringing phase is completed and merges strings into longer strings on disk. As each newly merged string is formed, a new control word is built. When the number of strings remaining to be merged is less than or equal to the number of strings that can be merged at one time, SORT writes the records to the output file or procedure.
During the merging phase, wraparound on the work file might occur. Wraparound occurs when merged records are written at the beginning of the work file. Wraparound is possible because the strings occupying the space at the beginning of the work file have already been handled by the merge operation. This wraparound action means that sorting can be done into the same work file.