🛠️ P3/COBOL 25.1.0-SNAPSHOT is available for preview.
Annex
File Status Codes

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
SUCCESS00Success
SUCCESS_IGNORED01Success (operation ignored)
SUCCESS_NO_TRANSACTION01 (01)Success (no transaction active)
SUCCESS_DUPLICATE_KEY02Success (duplicate key value)
SUCCESS_SHORT_RECORD_READ04 (05)Success (short record read)
SUCCESS_LONG_RECORD_READ04 (06)Success (long record read)
SUCCESS_FILE_NOT_FOUND05Success (file not found)
SUCCESS_NOT_REEL_OR_UNIT07Success (not reel or unit device)
SUCCESS_NOT_FLUSHED08 (01)Success (last record not flushed)
SUCCESS_LOCK_BROKEN09 (01)Success (record lock seized)
AT_END10At end
AT_END_PENDING10 (01)At end (pending)
RRN_TOO_MANY_DIGITS14At end (relative record number too large)
INVALID_KEY20Invalid key
SEQUENCE_ERROR21Invalid key (sequence error)
DUPLICATE_KEY22Invalid key (duplicate value)
RECORD_NOT_FOUND23Invalid key (not found)
INSUFFICIENT_SPACE24Invalid key (insufficient space)
PERMANENT_ERROR30Permanent error
FILE_IS_DIRECTORY30 (01)Permanent error (file is a directory)
FILE_ALREADY_EXISTS30 (02)Permanent error (file already exists)
FILENAME_TOO_LONG30 (03)Permanent error (filename too long)
DEVICE_INCONSISTENCY31Permanent error (device inconsistency)
INSUFFICIENT_SPACE_SEQUENTIAL34Permanent error (boundary violation)
FILE_NOT_FOUND35Permanent error (file not found)
DEVICE_NOT_AVAILABLE35 (01)Permanent error (device not available)
OPEN_MODE_ERROR37Permanent error (open mode not supported)
OPEN_READ_ONLY37 (01)Permanent error (open mode not compatible with read-only)
CLOSED_WITH_LOCK38Permanent error (open of locked file)
CANNOT_OPEN_LOCKED38 (01)Permanent error (open of locked file)
FIXED_ATTRIBUTES_ERROR39Permanent error (fixed attributes mismatch)
CORRUPTED_INDEX_FILE39 (01)Permanent error (corrupted indexed file)
FILE_INFORMATION_MISSING39 (02)Permanent error (indexed file information missing)
INDEXED_STRUCTURE_OVERFLOW39 (03)Permanent error (indexed structure overflow)
UNSUPPORTED_FORMAT39 (04)Permanent error (unsupported file format)
CORRUPTED_REEL39 (05)Permanent error (malformed multiple real/unit)
LOGIC_ERROR40Logic error
TOO_MANY_FILES40 (01)Logic error (too many indexed files)
ALREADY_OPEN41Logic error (file already open)
INVALID_DELETE41 (01)Logic error (delete of open file)
FILE_OPEN41 (03)Logic error (file open)
NOT_OPEN42Logic error (file not open)
NO_PRECEDING_READ43Logic error (not preceded by read)
INVALID_UPDATE43 (01)Logic error (delete/update without read)
BOUNDARY_VIOLATION44Logic error (boundary violation)
LENGTH_MISMATCH44 (07)Logic error (invalid length change)
RECORD_IDENTIFICATION_ERROR45Logic error (record identification failure)
POSITION_LOST46Logic error (next record not established)
READ_OPEN_ERROR47Logic error (not opened for reading)
WRITE_OPEN_ERROR48Logic error (not opened for writing)
UPDATE_OPEN_ERROR49Logic error (not opened for updating)
RECORD_OPERATION_ERROR50Record operation error
RECORD_REWRITE_ERROR50 (01)IO error rewriting record
RECORD_LOCKED_ERROR51Record operation error (locked)
DEADLOCK_DETECTED52Record operation error (deadlock)
TOO_MANY_RUN_UNIT_LOCKS53Record operation error (too many locks held by run unit)
TOO_MANY_CONNECTOR_LOCKS54Record operation error (too many locks held by connector)
FILE_SHARING_ERROR60File sharing error
OPEN_SHARING_ERROR61File sharing error (incompatible open)
IMPLEMENTOR_DEFINED_ERROR90Implementor-defined error
INVALID_ACCESS_MODE90 (01)Invalid access mode
INVALID_ACCESS_MODE_FOR_OPEN90 (01)Illegal or impossible access mode for OPEN
INVALID_ACCESS_MODE_FOR_CLOSE90 (01)Illegal or impossible access mode for CLOSE
NOT_IMPLEMENTED90 (02)Implementor-defined error (not implemented)
UNRECOGNIZED_EXTFH_STATUS90 (03)Unrecognized EXTFH status
HARD_LOCKS_NOT_SUPPORTED90 (04)Non-optimistic locking is not supported by this file connector implementation
OPERATION_SEQUENCE_ERROR90 (05)Operation requested is not valid subsequent to previous operations
ARGUMENT_ERROR90 (08)Actual argument error
ARGUMENT_CARDINALITY90 (09)Incorrect number of actual arguments
ARGUMENT_VALUE_ERROR90 (18)Argument's value in invalid in this usage
FILE_EXISTS90 (07)File already exists; cannot be created
INVALID_FILE_HANDLE90 (13)Invalid file handle
UNKNOWN_ACCESS_MODE90 (15)Unknown access mode
UNABLE_TO_LOCK_FILE90 (16)Unable to lock file
LOCK_DENIED90 (17)File lock denied
INVALID_FILE_POSITION90 (19)Invalid file position
INVALID_FILE_LOCK90 (19)Invalid file lock
INCORRECT_MODE_OR_FILE_DESCRIPTOR90 (255)Incorrect mode or file descriptor
INSUFFICIENT_BUFFER_MEMORY90 (14)Insufficient buffer memory
FILE_NOT_OPEN90 (14)File not open when access attempted
SERIAL_MODE_ERROR90 (14)Serial mode error
ILLEGAL_FILE_NAME90 (14)Illegal file name
ILLEGAL_DEVICE_SPECIFICATION90 (14)Illegal device specification
WRITE_DISALLOWED90 (14)Attempt to write to a read-only file
NO_DISK_SPACE90 (14)Disk space exhausted
READ_DISALLOWED90 (14)Attempt to input from a file opened for output
DIRECTORY_FULL90 (14)No room in directory or does not exist
NO_FILE_NAME90 (14)File name not supplied
TOO_MANY_OPEN_FILES90 (14)Too many files open simultaneously
TOO_MANY_INDEXED_FILES90 (14)Too many indexed files open
TOO_MANY_DEVICE_FILES90 (14)Too many device files open
ZERO_LENGTH_RECORD90 (14)Record error: probably zero length
NOT_PROPERLY_INITIALIZED90 (14)Language initialization not set up correctly
UNEXPECTED_ERROR90 (255)Unexpected error occurred
DATABASE_ERROR91Implementor-defined error (underlying database error)
DATABASE_CONFIGURATION91 (01)Database error (configuration incompatible with attempted use)
DATABASE_INCONSISTENCY91 (02)Database error (inconsistent key structure)
DATABASE_INSUFFICIENT_STORAGE91 (03)Database error (insufficient storage for this operation)
DATABASE_INTERRUPTED91 (04)Database error (interrupted while accessing storage manager)
DATABASE_THREAD_DEAD91 (05)Database error (database dispatch thread dead)
DATABASE_THREAD_EXCEPTION91 (06)Database error (database dispatch thread exception)
DATABASE_ERROR_LOADING_VOLUME91 (07)Cannot load file data volume
DATABASE_ERROR_INITIALIZING_FILE91 (08)Cannot access FIT or initialize the ordinal accumulator
DATABASE_ERROR_UNLOCKING_FILE91 (09)Cannot unlock file
DATABASE_ERROR_COMMIT_RETRY_LIMIT91 (10)Retry limit reached attempting to commit atomic file operation; operation rolled back
DATABASE_ERROR_POSITIONING_FILE91 (11)Cannot position file
DATABASE_ERROR_COMMITTING_READ91 (12)Cannot commit read (lock) operation
DATABASE_ERROR_COMMITTING_DELETE91 (13)Cannot commit delete operation; record not deleted
DATABASE_ERROR_ACCESSING_KEY_TREE91 (14)Cannot access key tree
DATABASE_ERROR_COMMITTING_REWRITE91 (15)Cannot commit rewrite; record not modified
DATABASE_ERROR_TRUNCATING_FILE91 (16)Cannot truncate file; file not modified
DATABASE_ERROR_RELEASING_LOCKS91 (17)Cannot release previously applied locks; one or more locks left applied
DATABASE_ERROR_UPDATING_INDEX91 (18)Cannot update index tree; record(s) not modified
DATABASE_ERROR_WRITING_RECORD91 (19)Cannot complete write; record not written
DATABASE_ERROR_FUTURE_VERSION91 (20)Future file or record version found; must access with later version of storage manager
DATABASE_ERROR_ACCESSING_FILE_VERSION91 (21)Cannot access/update file version
DATABASE_ERROR_ACCESSING_SCHEMA91 (22)Cannot access the record schema
DATABASE_ERROR_MIGRATING_RECORD91 (23)Cannot retrieve/decode record value for migration
DATABASE_ERROR_NETWORK91 (24)A network error occurred communicating with a remote file server
DATABASE_ERROR_JOURNAL_ERROR91 (25)An error occurred attempting to write the requested journal
DATABASE_ERROR_RECORD_CORRUPTION91 (101)Encoded record value cannot be decoded
DATABASE_ERROR_BEGIN_TRANSACTION91 (102)Unable to open a MVCC transaction
DATABASE_ERROR_MIGRATING_FILE91 (103)Cannot complete file migration
SORT_FILE_ERROR92Implementor-defined error (SORT-specific input or output file error)
SORT_FILE_LENGTH_ERROR92 (01)Record length of USING/GIVING file not compatible with key described
FILE_SYSTEM_ERROR94File system error
UNABLE_TO_DELETE94 (01)Unable to delete file
UNABLE_TO_WRITE94 (02)Cannot write to file
UNABLE_TO_READ94 (03)Cannot read from file
UNABLE_TO_READ_AND_WRITE94 (04)Cannot be read and written
MISMATCHED_LENGTHS94 (05)Binary sequential file record header-trailer mismatch
BAD_HEADER94 (06)Binary sequential or relative file record header missing or corrupted
INVALID_DEVICE_PATH94 (07)Device configuration path specified does not refer to a suitable device on this system (path invalid or mime-type/charset invalid)
AMBIGUOUS_DEVICE_PATH94 (08)Device configuration path specified refers to more than one suitable device on this system
DEVICE_OPTION_ERROR94 (09)Invalid device configuration option or format
UNABLE_TO_PRINT94 (10)Unable to submit the requested print job
INVALID_DOCUMENT_FLAVOR94 (11)Printer does not support this mime-type and/or charset
PRINT_DIALOG_CLOSED94 (12)Printer selection dialog closed
RM_FILE_CORRUPTION94 (13)Invalid RM/COBOL indexed file structure at position 0
TRANSACTION_ERROR97Implementor-defined, unspecified, transaction error: 0
UNKNOWN_BRANCH_ERROR97 (01)The branch id of this transaction is not known to any file resource
OTHER_FILE_OPEN_ERROR98Unable to open file for unexpected reason
NOT_RM_FILE98 (01)Not an RM/COBOL indexed file
RECORD_LOCKED99Record locked
RECORD_CHANGED99 (01)Record contents changed after optimistic lock applied
LOCK_FAILURE99 (02)Unable to apply lock due to system failure