4.7.20
RETURN
4-54
The RETURN statement obtains sorted records from the final phase of a
sort operation.
It
is equivalent to a READ statement applied to a sorted file.
RETURN file-name RECORD [INTO identifier]
; AT END imperative-statement.
A RETURN statement is used only within the range of an output procedure
associated with a SORT statement for the specified file name. File-name is
a sort file with a Sort File Description entry in the Data Division.
The INTO option is used only when the input file contains just one type of
record. The identifier is the name of a working storage area or output
record area. When INTO is specified, the data is available in both the
input record area and the data area associated with identifier.
When a file consists of more than one type of record, records share the
storage area automatically. This is equivalent to implicit redefinition of
the area, and only the information that is present in the current record is
accessible.
Execution of RETURN causes the next record, in the order specified by the
keys listed in the SORT statement, to be made available for processing in
the record area associated with the sort file. Moving is performed according
to the rules specified for the MOVE statement without the CORRESPONDING
option. After execution of the imperative statement
in
the AT END phrase,
no more RETURN statements can be executed within the current output
procedure.
60229400
Need help?
Do you have a question about the 3300 and is the answer not in the manual?