PERFORM UNTIL WS-IN-STAT = 10 //HERE WS-IN-STAT IS STATUS OF FILE1
READ FILE1
IF PROJ = 'MX' OR PROJ = 'BOA'
*WRITE record INTO 1ST FILE
END-IF
IF PROJ = 'CITI' OR PROJ = 'USAA'
*WRITE record INTO 2ND FILE
END-IF
DISPLAY 'ENTERED'
IF PROJ = 'BENCH'
*WRITE record INTO 3RD FILE
END-IF
END-PERFORM.
READ FILE1
IF PROJ = 'MX' OR PROJ = 'BOA'
*WRITE record INTO 1ST FILE
END-IF
IF PROJ = 'CITI' OR PROJ = 'USAA'
*WRITE record INTO 2ND FILE
END-IF
DISPLAY 'ENTERED'
IF PROJ = 'BENCH'
*WRITE record INTO 3RD FILE
END-IF
END-PERFORM.
whenever i implement this logic last record is getting copied twice..
Can some help me to resolve it.
Thank you.