# COBOL file status codes

Source: https://wndsoftware.com/mainframe-errors/cobol-file-status

### COBOL file status codes

Look up COBOL file status codes and the I/O conditions they describe.

Search a code or message

### All 26 codes



- [`File status 02`Success, duplicate alternate key](https://wndsoftware.com/mainframe-errors/file-status-02)
- [`File status 04`Record length doesn't match the FD](https://wndsoftware.com/mainframe-errors/file-status-04)
- [`File status 05`OPTIONAL file not present at OPEN](https://wndsoftware.com/mainframe-errors/file-status-05)
- [`File status 10`End of file](https://wndsoftware.com/mainframe-errors/file-status-10)
- [`File status 21`Key sequence error](https://wndsoftware.com/mainframe-errors/file-status-21)
- [`File status 22`Duplicate key](https://wndsoftware.com/mainframe-errors/file-status-22)
- [`File status 23`Record not found](https://wndsoftware.com/mainframe-errors/file-status-23)
- [`File status 24`Boundary violation on an indexed or relative file](https://wndsoftware.com/mainframe-errors/file-status-24)
- [`File status 30`Permanent error, no further information](https://wndsoftware.com/mainframe-errors/file-status-30)
- [`File status 34`Boundary violation on a sequential file](https://wndsoftware.com/mainframe-errors/file-status-34)
- [`File status 35`Required file not available at OPEN](https://wndsoftware.com/mainframe-errors/file-status-35)
- [`File status 37`OPEN mode not supported by the file](https://wndsoftware.com/mainframe-errors/file-status-37)
- [`File status 38`OPEN of a file closed WITH LOCK](https://wndsoftware.com/mainframe-errors/file-status-38)
- [`File status 39`File attributes conflict with the program](https://wndsoftware.com/mainframe-errors/file-status-39)
- [`File status 41`OPEN of a file that is already open](https://wndsoftware.com/mainframe-errors/file-status-41)
- [`File status 42`CLOSE of a file that isn't open](https://wndsoftware.com/mainframe-errors/file-status-42)
- [`File status 43`REWRITE or DELETE without a prior READ](https://wndsoftware.com/mainframe-errors/file-status-43)
- [`File status 44`Record length not allowed on WRITE or REWRITE](https://wndsoftware.com/mainframe-errors/file-status-44)
- [`File status 46`READ with no valid next record](https://wndsoftware.com/mainframe-errors/file-status-46)
- [`File status 47`READ on a file not open for input](https://wndsoftware.com/mainframe-errors/file-status-47)
- [`File status 48`WRITE on a file not open for output](https://wndsoftware.com/mainframe-errors/file-status-48)
- [`File status 49`REWRITE or DELETE on a file not open I-O](https://wndsoftware.com/mainframe-errors/file-status-49)
- [`File status 90`Unclassified error, no further information](https://wndsoftware.com/mainframe-errors/file-status-90)
- [`File status 93`Resource not available](https://wndsoftware.com/mainframe-errors/file-status-93)
- [`File status 96`No DD statement for the file](https://wndsoftware.com/mainframe-errors/file-status-96)
- [`File status 97`OPEN successful, file integrity verified](https://wndsoftware.com/mainframe-errors/file-status-97)


### Working with COBOL errors

A file status belongs to a specific I/O operation. Preserve the status, OPEN mode, file assignment and catalog or data-set information. End of file, duplicate keys and attribute mismatches require different application responses.

[Browse all 494 error codes](https://wndsoftware.com/mainframe-errors/) · [WND Terminal’s offline code hints](https://wndsoftware.com/docs/code-hints)


### Use WND Terminal with your host system

WND Software develops WND Terminal Emulator for mainframe, IBM i and UNIX access. For connection and keyboard features, see the [3270 terminal emulator](https://wndsoftware.com/3270-terminal-emulator) or [5250 emulator for IBM i](https://wndsoftware.com/ibm-i). [Explain this screen](https://wndsoftware.com/explain-this-screen) provides screen-specific assistance using the model endpoint and context permitted by IT; the reference article explains the code independently.
