Hello, I'm getting the following error on the 'OUTPUT' procedure of the internal sort,
'RETURN statement 2267 out of order'.
Cause . . . . . : The RETURN statement was not expected by SORT/MERGE. Either a SORT/MERGE was not active or the statement was issued out of sequence. Message issued at statement 2267 of COBOL program 'IAHF910' in program object 'IAHF910' in library 'IAHFOBJ'.
Recovery . . . : Remove the RETURN statement or place it in proper order.
I verified using STRDBG that the INPUT procedure is running and SORT records are being released.
SORT SORT-FILE ASCENDING KEY SREC-KEY INPUT PROCEDURE P1000-DECLARE-TXN-SALE OUTPUT PROCEDURE P2000-READ-SORT.
The code appears to fine in the 'OUTPUT' procedure, and the return is in the correct place,
P2000-READ-SORT. RETURN SORT-FILE AT END PERFORM P2100-UPDATE-SAVE-RECORD THRU P2199-EXIT GO TO P2199-EXIT.
This code apparently ran fine on a Mainframe. I'm on a project to convert all applications to the i. Any help or suggestions would be appreciated.
AS/400 iSeries version 6.1
September 10, 2009 8:44 PM
September 17, 2009 7:47 PM