79594703

Date: 2025-04-27 05:44:45
Score: 1.5
Natty:
Report link

You are still executing the following instructions after an at end condition occurs therefore the record you are getting is the part of the last record in the file which remains in the files buffer.

better code would be:

read file at end move 'y' to at end-sw. (end-sw was defined in working storage as 'n'.)

if end-sw not equal 'y' perform the processing you want. (in another paragraph)

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Daniel G Lang