COBOL: How to differentiate between end of file and junk value when both have return code 10?
问题 I am working on Fujitsu COBOL and there is a situation where I have to read the file and if there is a junk value then I want to abend the job. When there is a junk value the return code is 10 but the catch is that when there is EOF (end of file) even then the return code is 10. Please help me out on how can I differentiate between these two events based on the return code? 回答1: On very early PCs (MS-DOS 1.0), a Ctrl+Z (X"1A") was used as end-of-file for text files. Your compiler is likely