The absence of CR/LF on
each and every record is, of course, what's clobbering the software's expectations, and therefore, unfortunately, the software.
If possible, try to trace the problem up-stream to its root cause: there
must be an explanation somewhere as to why those records are "different." The main reason why I say this is that, well, a digital computer executing (bug free(!)) software really doesn't
know the word, "different." (There is no
if..then..else..but_every_so_often statement that I know of, or want to.)
You could, of course, "fix" the file, although I wouldn't spend too much time in
COBOL doing what presumably could be done with a script in another language. But, y'know, in order to "fix it," you'd have to have a
bright-line rule, such as all computer-software requires. And this file, "inexplicably" ... well, it really just comes down to "inexplicably."
You've got an inconsistent input-file.
That means that somewhere out there you've got an inconsistent (i.e. "buggy") program that's producing it. Unfortunately, that's inexcusable. Your program, presumably, is working correctly, and is sounding an alarm that just can't wisely be ignored by the business.