ITD Mode

If the number of tapes specified is greater than 0 and the disk size is greater than 0, SORT operates in ITD mode. The ITD or disk/tape mode of sorting uses disk work files with tape backup.

ITD sorting can improve on tape-only sorting by 50 percent or more. The reason for this degree of improvement is that fewer strings are created on tape, which causes tape merging to be completed much sooner. The amount of improvement depends on the inherent sequence of the data and the amount of disk space provided. In most cases, 100,000 words or less of disk space is sufficient to obtain the increased speed from an ITD sort.

SORT begins stringing records on disk; however, if disk space is exhausted during stringing operations, a special merge operation is performed to tape, and the sort operation is not terminated. This creates strings on tape in the normal tape distribution, but the number of strings written on tape is less than that resulting from a tape-only sort operation. Stringing then resumes normally on disk until disk space is exhausted again. When the stringing phase is complete, a regular tape merge is performed.

During an ITD sort operation, file equations are not used for the internal tape files used during the stringing phase. If SORT requires a scratch tape, either a scratch tape can be mounted or the sorting program can be terminated.

If disk space is exhausted during the merging phase of an ITD sort, the strings are merged to tape, and the remaining merging operations are completed on tape.

One advantage of the ITD sort mode is its ability to circumvent a limited disk resource to sort large files. Another advantage is that it reduces tape merge time because of the use of disk space to consolidate many short strings into a few longer strings.