The below COBOL errors frequently being asked in many interviews, and occurring in day to day development of COBOL programs.
COBOL File Status Codes:
00- Successful
02-Duplicate alternate key
22-Duplicate Key
23-Record not found
24-Space not found to insert a record for KSDS or RRDS
34-Space not found for ESDS
46- Sequential READ, READ NEXT or READ PRIOR statement was attempted on a file open in the input or I-O mode and no valid next record had been established because the preceding START statement was unsuccessful.
47-Read file not opened as INPUT or I/O
48-Write file not opened as OUTPUT/EXTEND/IO
39-Mismatch of logical record length
92-Logical errors
Examples for logical errors:
- File locked
- File already open
- I-O to closed file
- READ after end of file
- CLOSE on unopened file
96-DD Not found
118-Verify performed successfully
Read more at IBM Material
One thought
Comments are closed.