[an error occurred while processing this directive]
HP OpenVMS Systems Documentation |
HP COBOL
|
Previous | Contents | Index |
This appendix summarizes the values that can appear in FILE STATUS data items. The entry for each statement describes specific causes for each condition.
You may receive different file status values depending upon whether you use the standard compiler option with the v3 or 85 setting. Table C-1 lists all file status values in numeric order for the default 85 setting. Table C-2 lists the corresponding file status values for the v3 and 85 settings.
For more information about the standard compiler option, on a Tru64 UNIX system, refer to the COBOL man page. On an OpenVMS system, invoke the online help for COBOL.
File Status |
Input/Output Statements |
File Organization |
Access Mode |
Meaning |
---|---|---|---|---|
00 | All | All | All | Successful |
02 |
REWRITE
WRITE |
Ind | All | Created duplicate alternate key |
02 | READ | Ind | All | Detected alternate duplicate key |
04 | READ | All | All | Record not size of user's buffer |
05 | OPEN | All | All | Optional file not present |
07 |
CLOSE
OPEN |
All | All | Invalid file organization or device |
10 | READ | All | Seq | No next logical record or option file not present (at end) |
14 | READ | Rel | All | Relative record number too large |
21 | REWRITE | Ind | Seq | Primary key changed after READ |
21 | WRITE | Ind | Seq | Attempted nonascending key value (invalid key) |
22 | REWRITE | Ind | All | Duplicate alternate key (invalid key) |
22 | WRITE | Ind, Rel | Ran | Duplicate key (invalid key) |
23 |
DELETE
READ REWRITE START |
Ind, Rel | Ran | Record not in file; optional file not present (invalid key) |
24 | WRITE | Ind, Rel | All | Boundary violation or relative record number too large (invalid key) |
30 | All | All | All | All other permanent errors |
34 | WRITE | Seq | Seq | Boundary violation |
35 | OPEN | All | All | File not found |
37 | OPEN | All | All | Inappropriate device type |
38 | OPEN | All | All | File previously closed with lock |
39 | OPEN | All | All | Conflict of file attributes |
41 | OPEN | All | All | File already opened |
42 | CLOSE | All | All | File not opened |
43 |
DELETE
REWRITE |
All | Seq | No previous READ or START |
44 |
REWRITE
WRITE |
All | All | Invalid record size |
46 | READ | All | Seq | No valid next record (at end) |
47 |
READ
START |
All | All | File not open, or incompatible open mode |
48 | WRITE | All | All | File not open, or incompatible open mode |
49 |
DELETE
REWRITE |
All | All | File not open, or incompatible open mode |
90 | All | All | All | Record locked by another user (record available) |
91 | OPEN | All | All | Open is unsuccessful; file locked by another access stream |
92 |
DELETE
READ REWRITE START WRITE |
All | All | Record locked by another user (record not available) |
93 | UNLOCK | All | All | No current record |
94 | UNLOCK | All | All | File not open, or incompatible open mode |
95 | OPEN | All | All | No file space on device |
I-O Error Condition | Status Value | |
---|---|---|
V3 | 85 | |
READ successful---record shorter than fixed file attribute. | 00 | 04 |
CLOSE reel/unit attempted on nonreel/unit device. | 00 | 07 |
READ fails---relative key digits exceed relative key. | 00 | 14 |
WRITE fails---relative key digits exceed relative key. | 00 | 24 |
OPEN I-O on file that is not mass storage. | 00 | 37 |
WRITE fails---attempt to write a record of a different size than
in the file description. |
00 | 44 |
READ fails---no next logical record (EOF detected). | 13 | 10 |
READ fails---no next logical record (EOF on OPTIONAL file). | 15 | 10 |
READ fails---no valid next record (already at EOF). | 16 | 10 |
READ NEXT or sequential READ---no valid next record pointer. | 16 1 | 46 1 |
READ or START fails---optional input file not present. | 25 | 23 |
READ successful---record longer than fixed file attribute. | 30 | 04 |
OPEN on relative or indexed file that is not mass storage. | 30 | 37 |
REWRITE fails---attempt to rewrite record of different size. | 30 | 44 |
CLOSE fails---file not currently open. | 94 | 42 |
DELETE or REWRITE fails---previous I-O not successful READ. | 93 | 43 |
OPEN fails---file previously closed with LOCK. | 94 | 38 |
OPEN fails---file created with different organization. | 94 | 39 |
OPEN fails---file created with different prime record key. | 94 | 39 |
OPEN fails---file created with different alternate record keys. | 94 | 39 |
OPEN fails---file currently open. | 94 | 41 |
READ or START fails---file not opened INPUT or I-O. | 94 | 47 |
WRITE fails---file not opened OUTPUT, EXTEND, or I-O. | 94 | 48 |
DELETE or REWRITE fails---file not opened I-O. | 94 | 49 |
OPEN INPUT on a nonoptional file---file not found. | 97 | 35 |
Previous | Next | Contents | Index |