



The RETURN statement transfers records from the final phase of a sorting or merging operation to an OUTPUT PROCEDURE.
The RETURN statement can be used only within the range of an OUTPUT PROCEDURE associated with a SORT or MERGE statement.
___ Format _____________________________________________________________
| |
| >>__RETURN__file-name-1__ ________ __ ____________________ __________> |
| |_RECORD_| |_INTO__identifier-1_| |
| |
| >__ ____ __END__imperative-statement-1_______________________________> |
| |_AT_| |
| |
| >__ __________________________________________ __ ____________ _____>< |
| |_NOT__ ____ __END__imperative-statement-2_| |_END-RETURN_| |
| |_AT_| |
| |
|________________________________________________________________________|
Within an OUTPUT PROCEDURE, at least one RETURN statement must be
specified.
When the RETURN statement is executed, the next record from file-name-1 is made available for processing by the OUTPUT PROCEDURE.
If more than one record description is associated with file-name-1, these records automatically share the same storage; that is, the area is implicitly redefined. After RETURN statement execution, only the contents of the current record are available; if any data items lie beyond the length of the current record, their contents are undefined.
The INTO phrase can be specified in a RETURN statement if one or both of the following are true:
Subtopics:
© Copyright IBM Corp. 1991, 1998
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.