The RETURN INTO statement is equivalent to the statements:
RETURN file-name-1 MOVE record-name TO identifier-1
The moving of the current record from the record area to the area specified by identifier-1 takes place according to the rules for the MOVE statement without the CORRESPONDING phrase. Any subscripting, indexing, or reference modification associated with identifier-1 is evaluated after the record has been returned and immediately before it is moved to identifier-1. (Click here for information about reference modification.)
You can specify the INTO phrase in a RETURN statement if one or both of the following are true:
The record areas associated with file-name-1 and identifier-1 must not be the same storage area.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.