File Status Codes
The basic model for file status codes used by P3/COBOL is that defined by the ISO 1989:2014 COBOL Standard. If the RM locking protocol option is specified, the corresponding RM status values are returned for record lock related status.
The Code (extended) column shows the ISO 2014 two-digit file status formed from the major and minor status digits.
When a third detail code is required to distinguish a specific FileStatus value, it is shown in parentheses.
Status (FileStatus Java enum) | Code (extended) | Description |
|---|---|---|
| SUCCESS | 00 | Success |
| SUCCESS_IGNORED | 01 | Success (operation ignored) |
| SUCCESS_NO_TRANSACTION | 01 (01) | Success (no transaction active) |
| SUCCESS_DUPLICATE_KEY | 02 | Success (duplicate key value) |
| SUCCESS_SHORT_RECORD_READ | 04 (05) | Success (short record read) |
| SUCCESS_LONG_RECORD_READ | 04 (06) | Success (long record read) |
| SUCCESS_FILE_NOT_FOUND | 05 | Success (file not found) |
| SUCCESS_NOT_REEL_OR_UNIT | 07 | Success (not reel or unit device) |
| SUCCESS_NOT_FLUSHED | 08 (01) | Success (last record not flushed) |
| SUCCESS_LOCK_BROKEN | 09 (01) | Success (record lock seized) |
| AT_END | 10 | At end |
| AT_END_PENDING | 10 (01) | At end (pending) |
| RRN_TOO_MANY_DIGITS | 14 | At end (relative record number too large) |
| INVALID_KEY | 20 | Invalid key |
| SEQUENCE_ERROR | 21 | Invalid key (sequence error) |
| DUPLICATE_KEY | 22 | Invalid key (duplicate value) |
| RECORD_NOT_FOUND | 23 | Invalid key (not found) |
| INSUFFICIENT_SPACE | 24 | Invalid key (insufficient space) |
| PERMANENT_ERROR | 30 | Permanent error |
| FILE_IS_DIRECTORY | 30 (01) | Permanent error (file is a directory) |
| FILE_ALREADY_EXISTS | 30 (02) | Permanent error (file already exists) |
| FILENAME_TOO_LONG | 30 (03) | Permanent error (filename too long) |
| DEVICE_INCONSISTENCY | 31 | Permanent error (device inconsistency) |
| INSUFFICIENT_SPACE_SEQUENTIAL | 34 | Permanent error (boundary violation) |
| FILE_NOT_FOUND | 35 | Permanent error (file not found) |
| DEVICE_NOT_AVAILABLE | 35 (01) | Permanent error (device not available) |
| OPEN_MODE_ERROR | 37 | Permanent error (open mode not supported) |
| OPEN_READ_ONLY | 37 (01) | Permanent error (open mode not compatible with read-only) |
| CLOSED_WITH_LOCK | 38 | Permanent error (open of locked file) |
| CANNOT_OPEN_LOCKED | 38 (01) | Permanent error (open of locked file) |
| FIXED_ATTRIBUTES_ERROR | 39 | Permanent error (fixed attributes mismatch) |
| CORRUPTED_INDEX_FILE | 39 (01) | Permanent error (corrupted indexed file) |
| FILE_INFORMATION_MISSING | 39 (02) | Permanent error (indexed file information missing) |
| INDEXED_STRUCTURE_OVERFLOW | 39 (03) | Permanent error (indexed structure overflow) |
| UNSUPPORTED_FORMAT | 39 (04) | Permanent error (unsupported file format) |
| CORRUPTED_REEL | 39 (05) | Permanent error (malformed multiple real/unit) |
| LOGIC_ERROR | 40 | Logic error |
| TOO_MANY_FILES | 40 (01) | Logic error (too many indexed files) |
| ALREADY_OPEN | 41 | Logic error (file already open) |
| INVALID_DELETE | 41 (01) | Logic error (delete of open file) |
| FILE_OPEN | 41 (03) | Logic error (file open) |
| NOT_OPEN | 42 | Logic error (file not open) |
| NO_PRECEDING_READ | 43 | Logic error (not preceded by read) |
| INVALID_UPDATE | 43 (01) | Logic error (delete/update without read) |
| BOUNDARY_VIOLATION | 44 | Logic error (boundary violation) |
| LENGTH_MISMATCH | 44 (07) | Logic error (invalid length change) |
| RECORD_IDENTIFICATION_ERROR | 45 | Logic error (record identification failure) |
| POSITION_LOST | 46 | Logic error (next record not established) |
| READ_OPEN_ERROR | 47 | Logic error (not opened for reading) |
| WRITE_OPEN_ERROR | 48 | Logic error (not opened for writing) |
| UPDATE_OPEN_ERROR | 49 | Logic error (not opened for updating) |
| RECORD_OPERATION_ERROR | 50 | Record operation error |
| RECORD_REWRITE_ERROR | 50 (01) | IO error rewriting record |
| RECORD_LOCKED_ERROR | 51 | Record operation error (locked) |
| DEADLOCK_DETECTED | 52 | Record operation error (deadlock) |
| TOO_MANY_RUN_UNIT_LOCKS | 53 | Record operation error (too many locks held by run unit) |
| TOO_MANY_CONNECTOR_LOCKS | 54 | Record operation error (too many locks held by connector) |
| FILE_SHARING_ERROR | 60 | File sharing error |
| OPEN_SHARING_ERROR | 61 | File sharing error (incompatible open) |
| IMPLEMENTOR_DEFINED_ERROR | 90 | Implementor-defined error |
| INVALID_ACCESS_MODE | 90 (01) | Invalid access mode |
| INVALID_ACCESS_MODE_FOR_OPEN | 90 (01) | Illegal or impossible access mode for OPEN |
| INVALID_ACCESS_MODE_FOR_CLOSE | 90 (01) | Illegal or impossible access mode for CLOSE |
| NOT_IMPLEMENTED | 90 (02) | Implementor-defined error (not implemented) |
| UNRECOGNIZED_EXTFH_STATUS | 90 (03) | Unrecognized EXTFH status |
| HARD_LOCKS_NOT_SUPPORTED | 90 (04) | Non-optimistic locking is not supported by this file connector implementation |
| OPERATION_SEQUENCE_ERROR | 90 (05) | Operation requested is not valid subsequent to previous operations |
| ARGUMENT_ERROR | 90 (08) | Actual argument error |
| ARGUMENT_CARDINALITY | 90 (09) | Incorrect number of actual arguments |
| ARGUMENT_VALUE_ERROR | 90 (18) | Argument's value in invalid in this usage |
| FILE_EXISTS | 90 (07) | File already exists; cannot be created |
| INVALID_FILE_HANDLE | 90 (13) | Invalid file handle |
| UNKNOWN_ACCESS_MODE | 90 (15) | Unknown access mode |
| UNABLE_TO_LOCK_FILE | 90 (16) | Unable to lock file |
| LOCK_DENIED | 90 (17) | File lock denied |
| INVALID_FILE_POSITION | 90 (19) | Invalid file position |
| INVALID_FILE_LOCK | 90 (19) | Invalid file lock |
| INCORRECT_MODE_OR_FILE_DESCRIPTOR | 90 (255) | Incorrect mode or file descriptor |
| INSUFFICIENT_BUFFER_MEMORY | 90 (14) | Insufficient buffer memory |
| FILE_NOT_OPEN | 90 (14) | File not open when access attempted |
| SERIAL_MODE_ERROR | 90 (14) | Serial mode error |
| ILLEGAL_FILE_NAME | 90 (14) | Illegal file name |
| ILLEGAL_DEVICE_SPECIFICATION | 90 (14) | Illegal device specification |
| WRITE_DISALLOWED | 90 (14) | Attempt to write to a read-only file |
| NO_DISK_SPACE | 90 (14) | Disk space exhausted |
| READ_DISALLOWED | 90 (14) | Attempt to input from a file opened for output |
| DIRECTORY_FULL | 90 (14) | No room in directory or does not exist |
| NO_FILE_NAME | 90 (14) | File name not supplied |
| TOO_MANY_OPEN_FILES | 90 (14) | Too many files open simultaneously |
| TOO_MANY_INDEXED_FILES | 90 (14) | Too many indexed files open |
| TOO_MANY_DEVICE_FILES | 90 (14) | Too many device files open |
| ZERO_LENGTH_RECORD | 90 (14) | Record error: probably zero length |
| NOT_PROPERLY_INITIALIZED | 90 (14) | Language initialization not set up correctly |
| UNEXPECTED_ERROR | 90 (255) | Unexpected error occurred |
| DATABASE_ERROR | 91 | Implementor-defined error (underlying database error) |
| DATABASE_CONFIGURATION | 91 (01) | Database error (configuration incompatible with attempted use) |
| DATABASE_INCONSISTENCY | 91 (02) | Database error (inconsistent key structure) |
| DATABASE_INSUFFICIENT_STORAGE | 91 (03) | Database error (insufficient storage for this operation) |
| DATABASE_INTERRUPTED | 91 (04) | Database error (interrupted while accessing storage manager) |
| DATABASE_THREAD_DEAD | 91 (05) | Database error (database dispatch thread dead) |
| DATABASE_THREAD_EXCEPTION | 91 (06) | Database error (database dispatch thread exception) |
| DATABASE_ERROR_LOADING_VOLUME | 91 (07) | Cannot load file data volume |
| DATABASE_ERROR_INITIALIZING_FILE | 91 (08) | Cannot access FIT or initialize the ordinal accumulator |
| DATABASE_ERROR_UNLOCKING_FILE | 91 (09) | Cannot unlock file |
| DATABASE_ERROR_COMMIT_RETRY_LIMIT | 91 (10) | Retry limit reached attempting to commit atomic file operation; operation rolled back |
| DATABASE_ERROR_POSITIONING_FILE | 91 (11) | Cannot position file |
| DATABASE_ERROR_COMMITTING_READ | 91 (12) | Cannot commit read (lock) operation |
| DATABASE_ERROR_COMMITTING_DELETE | 91 (13) | Cannot commit delete operation; record not deleted |
| DATABASE_ERROR_ACCESSING_KEY_TREE | 91 (14) | Cannot access key tree |
| DATABASE_ERROR_COMMITTING_REWRITE | 91 (15) | Cannot commit rewrite; record not modified |
| DATABASE_ERROR_TRUNCATING_FILE | 91 (16) | Cannot truncate file; file not modified |
| DATABASE_ERROR_RELEASING_LOCKS | 91 (17) | Cannot release previously applied locks; one or more locks left applied |
| DATABASE_ERROR_UPDATING_INDEX | 91 (18) | Cannot update index tree; record(s) not modified |
| DATABASE_ERROR_WRITING_RECORD | 91 (19) | Cannot complete write; record not written |
| DATABASE_ERROR_FUTURE_VERSION | 91 (20) | Future file or record version found; must access with later version of storage manager |
| DATABASE_ERROR_ACCESSING_FILE_VERSION | 91 (21) | Cannot access/update file version |
| DATABASE_ERROR_ACCESSING_SCHEMA | 91 (22) | Cannot access the record schema |
| DATABASE_ERROR_MIGRATING_RECORD | 91 (23) | Cannot retrieve/decode record value for migration |
| DATABASE_ERROR_NETWORK | 91 (24) | A network error occurred communicating with a remote file server |
| DATABASE_ERROR_JOURNAL_ERROR | 91 (25) | An error occurred attempting to write the requested journal |
| DATABASE_ERROR_RECORD_CORRUPTION | 91 (101) | Encoded record value cannot be decoded |
| DATABASE_ERROR_BEGIN_TRANSACTION | 91 (102) | Unable to open a MVCC transaction |
| DATABASE_ERROR_MIGRATING_FILE | 91 (103) | Cannot complete file migration |
| SORT_FILE_ERROR | 92 | Implementor-defined error (SORT-specific input or output file error) |
| SORT_FILE_LENGTH_ERROR | 92 (01) | Record length of USING/GIVING file not compatible with key described |
| FILE_SYSTEM_ERROR | 94 | File system error |
| UNABLE_TO_DELETE | 94 (01) | Unable to delete file |
| UNABLE_TO_WRITE | 94 (02) | Cannot write to file |
| UNABLE_TO_READ | 94 (03) | Cannot read from file |
| UNABLE_TO_READ_AND_WRITE | 94 (04) | Cannot be read and written |
| MISMATCHED_LENGTHS | 94 (05) | Binary sequential file record header-trailer mismatch |
| BAD_HEADER | 94 (06) | Binary sequential or relative file record header missing or corrupted |
| INVALID_DEVICE_PATH | 94 (07) | Device configuration path specified does not refer to a suitable device on this system (path invalid or mime-type/charset invalid) |
| AMBIGUOUS_DEVICE_PATH | 94 (08) | Device configuration path specified refers to more than one suitable device on this system |
| DEVICE_OPTION_ERROR | 94 (09) | Invalid device configuration option or format |
| UNABLE_TO_PRINT | 94 (10) | Unable to submit the requested print job |
| INVALID_DOCUMENT_FLAVOR | 94 (11) | Printer does not support this mime-type and/or charset |
| PRINT_DIALOG_CLOSED | 94 (12) | Printer selection dialog closed |
| RM_FILE_CORRUPTION | 94 (13) | Invalid RM/COBOL indexed file structure at position 0 |
| TRANSACTION_ERROR | 97 | Implementor-defined, unspecified, transaction error: 0 |
| UNKNOWN_BRANCH_ERROR | 97 (01) | The branch id of this transaction is not known to any file resource |
| OTHER_FILE_OPEN_ERROR | 98 | Unable to open file for unexpected reason |
| NOT_RM_FILE | 98 (01) | Not an RM/COBOL indexed file |
| RECORD_LOCKED | 99 | Record locked |
| RECORD_CHANGED | 99 (01) | Record contents changed after optimistic lock applied |
| LOCK_FAILURE | 99 (02) | Unable to apply lock due to system failure |