COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-229
SORT
input-specifier-2
specifies one or more files (a maximum of 31) that contain the records to be
sorted.
infile
is a file description name. During execution of the SORT statement, infile
must either be closed or be open in another process or by another file
description entry, but not in conflict with a following open for protected input.
output-specifier-1
specifies a procedure that processes the sorted records, one at a time. Each
record is returned by a RETURN statement. The procedure output-specifier-
1 cannot terminate before it finishes returning all the sorted records.
outproc-1
outproc-2
are sections or paragraphs of the Procedure Division.
output-specifier-2
specifies one or more files (a maximum of 31) where the sorted records are to be
written.
USING infile
VST381.vsd
PROCEDURE
IS
outproc-1OUTPUT
THROUGH outproc-2
THRU
VST218.vsd
GIVING outfile
VST382.vsd