File Status Code Tables [ Micro Focus COBOL System Reference, Volume 2 ] MPE/iX 5.0 Documentation
Micro Focus COBOL System Reference, Volume 2
File Status Code Tables
Unless otherwise specified, each file status code can be received for
operations on any file organizations in any access mode. The ANSI'74,
ANSI'85 and Extended File Status codes are given in the Error Messages
manual. The following sections contain the RM/COBOL file status codes
and the Microsoft v2 file status codes.
RM/COBOL File Status Codes
RM/COBOL file status codes are either ANSI'74 file status codes or can be
mapped onto extended file status codes, as shown below. The first table
of RM/COBOL file status codes is for DOS, Windows and OS/2, the second
for UNIX.
DOS, Windows and OS/2
Status Status See Description
Key 1 Key 2 Code
----------------------------------------------------------------------------------------------
9 0 9/006 Attempt to write to a file
opened for input.
9/008 Attempt to read from a file
opened for output.
9/018 Attempt to read part of a
record.
9/019 Rewrite error: open mode or
access mode wrong.
9/100 Invalid file operation.
9/101 Illegal operation on indexed
file.
9/139 Record length or key
inconsistent.
9/143 REWRITE/DELETE not after
successful READ.
9/147 Wrong open or access mode
for READ/START.
9/148 Wrong open or access mode
for WRITE.
9/149 Wrong open or access mode
for REWRITE/DELETE.
9/151 Random read on sequential
file.
9/152 REWRITE on file not opened
I-O.
9/158 REWRITE on line sequential
file.
9/182 Console in/out open in wrong
mode.
9/195 DELETE/REWRITE not preceded
by READ.
9 1 9/002 File not open when access
attempted.
9/067 Indexed file not open.
Table K-0. (cont.)
Status Status See Description
Key 1 Key 2 Code
9 1 9/142 File not open - cannot be
closed.
2 9/012 Attempt to open a file which
is already open.
9/066 Attempt to add duplicate key
to indexed file.
9/081 Key already exists in
indexed file.
9/141 File already open - cannot
be opened.
3 9/065 File locked.
9/138 File is closed with lock -
cannot open.
9/210 File is closed with lock.
4 9/002 Illegal file-name.
9/013 File not found.
9/030 File system is read only.
9/031 Not owner of this file.
9/035 Incorrect access permission.
9/037 File access denied.
9/075 Indexed file-name too long.
9/104 Null file-name used in file
operation.
9/183 Attempt to open line
sequential file for I-O.
9/188 File-name too large.
9/194 File size too large.
5 9/005 Illegal device
specification.
9/038 Disk not compatible.
9/039 File not compatible.
6 9/146 No current record defined
for sequential read.
9/017 Record error: probably zero
length.
8 9/041 Corrupt indexed file.
Table K-0. (cont.)
Status Status See Description
Key 1 Key 2 Code
9 8 9/043 File information missing for
indexed file.
9/047 Index structure overflow.
9/069 Illegal argument to ISAM
module.
9/071 Bad indexed file format.
9/072 End of indexed file.
9/073 No record found in indexed
file.
9/074 No current record in indexed
file.
9/078 Illegal key description in
indexed file.
9/196 Record number too large in a
relative or indexed file.
9 9/068 Record is locked.
UNIX
Status Status See Description
Key 1 Key 2 Code
----------------------------------------------------------------------------------------------
9 0 9/143 REWRITE/DELETE not after
successful READ.
9/147 Wrong open or access mode
for READ/START.
9/148 Wrong open or access mode
for WRITE.
0 9/149 Wrong open or access mode
for REWRITE/DELETE.
1 9/142 File not open - cannot be
closed.
2 9/141 File already open - cannot
be opened.
3 9/138 File is closed with lock -
cannot open.
9/210 File is closed with lock.
4 9/013 File not found.
Table K-0. (cont.)
Status Status See Description
Key 1 Key 2 Code
9 4 9/035 Incorrect access permission.
9/037 File access denied.
9/139 Record length or key
inconsistent.
9/182 Console in/out open in wrong
mode.
9/183 Attempt to open line
sequential file for I-O.
9/188 File-name too large.
6 9/146 No current record defined
for sequential read.
8 9/071 Bad indexed file format.
9/065 File locked.
9 9/068 Record is locked.
Microsoft COBOL v2 File Status Codes (DOS, Windows and OS/2)
Status Status Description
Key 1 Key 2
----------------------------------------------------------------------------------------
0 0 Successful completion.
2 Duplicate key and duplicates
are allowed.
1 0 End of file.
2 1 Sequence error in writing
sequential access file.
2 Duplicate key and duplicates
are not allowed.
3 Key not found.
4 Disk space full.
3 0 Permanent error or file not
found.
4 Disk space full.
9 1 File structure error.
4 File or record locked.
9 5 Indexed file system not
available.
MPE/iX 5.0 Documentation