Joined: 03 Nov 2005 Posts: 46 Location: Shanghai, China
SET S-NOT-END-OF-FILE TO TRUE
ADD +1 TO A-FILES-PROCESSED
NOT AT END
Question:The sample code above should handle a process of reading an input file and using an amount from the file to increment totals. The calculation section is NOT shown. What error in the sample code will prevent this process from working correctly?
A priming read should be done before the PERFORM.
S-END-OF-FILE is never set to true.
S-NOT-END-OF-FILE should not be set before the first read.
A mathematical statement cannot be used with an AT END clause.
The PERFORM?UNTIL should be based on a counter not end-of-file switch.