PERFORM 8100-READ-A3-FILE
THRU 8100-EXIT.
PERFORM 8300-READ-INPUT-FILE
THRU 8300-EXIT.
8100-READ-A3-FILE.
IF A3-OK
INITIALIZE BAA3-KEY
MOVE 05 TO BAA3-KEY-APL
MOVE ML-INST TO BAA3-KEY-INST
MOVE ML-ACNT-REM TO BAA3-KEY-ACCT
MOVE LOW-VALUES TO BAA3-KEY-LOW-VAL
START IN-A3VSAM
KEY >= BAA3-KEY
END-START
ELSE
SET A3-EOF TO TRUE.
SET A3-ACNT-SAME TO TRUE
PERFORM 4000-A3-EXTRACT
THRU 4000-EXIT
UNTIL A3-ACNT-CHNG OR A3-EOF.
8100-EXIT.
EXIT.
4000-A3-EXTRACT
READ IN-A3VSAM NEXT RECORD
AT END
EVALUATE TRUE
WHEN A3-OK
IF BAA3-KEY-INST = WS-MLN1-INST
AND BAA3-KEY-ACCT = WS-MLN1-ACCT
SET A3-FLAG-SET TO TRUE
ADD +1 TO WS-A3-READ-CNT
PERFORM 2100-GET-FLDNAME
THRU 2100-EXIT
PERFORM 2200-CONVERT-DATE
THRU 2200-EXIT
PERFORM 2300-GET-OLD-NEW-VALUE
THRU 2300-EXIT
PERFORM 2400-GET-TELLER-VALUE
THRU 2400-EXIT
PERFORM 9000-WRITE-OUTREC
THRU 9000-EXIT
ELSE
SET A3-ACNT-CHNG TO TRUE
END-IF
WHEN OTHER
SET A3-EOF TO TRUE
END-EVALUATE.
4000-EXIT.
EXIT.
This is the code for reading and extracting data A3 file. This file has multiple occurences of account numbers but the code is not reading all occurences and gives file status 92. After that if I try to read data from the file it gives status code 46. I am not able to figure out what is the problem.
Thanks in advance.