The following example sorts the records of file FILEIN according to compare procedure COMPARE and writes the sorted data to file FILEOUT. Three tapes are used in the sort and the record length is 10.
SORT(FILEOUT,FILEIN,3,COMPARE,10)
The following example sorts the records provided by procedure INPROC according to compare procedure COMPARER, and writes sorted data out according to procedure OUTPROC. The number of tapes is given by NUMOFTAPES, and the record size is given by DSKSZ. A restart specification is given by PARAM.
SORT(OUTPROC,INPROC,NUMOFTAPES,COMPARER,DSKSZ) [RESTART = PARAM]

