The SORT statement invokes the sort intrinsic, which provides a means for designated data to be sorted and placed in a file or returned to a procedure.
<sort statement>
── SORT ── ( ──<output option>── , ──<input option>── , ───────────────► ►─<number of tapes>── , ──<compare procedure>── , ──<record length>────► ►─┬───────────────────────┬─ ) ─┬──────────────────────────┬───────────┤ └─<size specifications>─┘ └─<restart specifications>─┘
The data to be sorted is indicated by the input option. The output option indicates where the sorted data is to be placed. The order in which the data is sorted is determined by the compare procedure.

