@Magoo is quite correct, you have not ended the Read so the following lines
are only executed at the end-of-file
MOVE FS-MOVING-QUOTES-RECORD TO
WS-MOVING-QUOTES-RECORD.
another option is the end-read
8000-READ-MOVING-QUOTES-FILE.
READ MOVING-QUOTES-FILE
AT END MOVE 'T' TO WS-EOF
end-Read
MOVE FS-MOVING-QUOTES-RECORD TO
WS-MOVING-QUOTES-RECORD
.
personally I would move the "Move FS-MOVING" to 2000- or 8010-
2000-READ-N-PRINT-MQ.
MOVE FS-MOVING-QUOTES-RECORD TO
WS-MOVING-QUOTES-RECORD
PERFORM 8010-CHECK-LINES
....
8000-READ-MOVING-QUOTES-FILE.
READ MOVING-QUOTES-FILE
AT END MOVE 'T' TO WS-EOF
end-Read
.
One final point, when you number procedures they should put them in numeric sequence
Some more issues in 2000- the perform 8000- should be at the end of the procedure
Currently:
2000-READ-N-PRINT-MQ.
* PERFORM 8010-CHECK-LINES
PERFORM 8000-READ-MOVING-QUOTES-FILE
IF (MQR-RATING >= 3.5)
MOVE WS-MOVING-QUOTES-RECORD TO
PRT-MOVING-QUOTES-FILE
PERFORM 2001-PRINT-COMP
PERFORM 2010-FIND-HI-LO-AVG
END-IF
Should be:
2000-READ-N-PRINT-MQ.
* PERFORM 8010-CHECK-LINES
IF (MQR-RATING >= 3.5)
MOVE WS-MOVING-QUOTES-RECORD TO
PRT-MOVING-QUOTES-FILE
PERFORM 2001-PRINT-COMP
PERFORM 2010-FIND-HI-LO-AVG
END-IF
PERFORM 8000-READ-MOVING-QUOTES-FILE
also in 2012- why are you doing a write, surely this should be done at the end (section 3000-).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…