COBOL/400 Language Help


RETURN Statement

Description
The RETURN statement transfers records from the final phase of a sort or merge operation to an OUTPUT PROCEDURE.

Use the RETURN statement only within the range of an output procedure associated with a SORT or MERGE statement. Within the OUTPUT PROCEDURE, you must specify at least one RETURN statement.

Execution of the RETURN statement makes the next record from file-name-1 available for processing by the OUTPUT PROCEDURE.

->->---RETURN file-name-1--*--------*--*-------------------*-->
                         *-RECORD-*  *-INTO identifier-1-*
 
->----*----*---END imperative-statement-1-------------------->
     *-AT-*
 
->----*------------------------------------*-*------------*--><-
     *-NOT*--*-END imperative-statement-2-* *-END-RETURN-*
          *AT*
 


[ Top of Page | Previous Page | Next Page | Table of Contents ]