Although there is another FAQ on the "traditional" file status codes, there are some new ones in the '02 Standard (and some new implementor defined ranges). The following information is from the '02 Standard:
* * * * * * * *
I-O status expresses one of the following conditions upon completion of the input-output operation:
1) Successful completion. The input-output statement was successfully executed.
2) Implementor-defined successful completion. A condition specified by the implementor occurred and the input-output statement was successfully executed.
3) At end. A sequential READ statement was unsuccessfully executed as a result of an at end condition.
4) Invalid key. The input-output statement was unsuccessfully executed as a result of an invalid key condition.
5) Permanent error. The input-output statement was unsuccessfully executed as the result of an error that precluded further processing of the file. Any specified exception procedures are executed. The permanent error condition remains in effect for all subsequent input-output operations on the file unless an implementor-defined technique is invoked to correct the permanent error condition.
6) Logic error. The input-output statement was unsuccessfully executed as a result of an improper sequence of input-output operations that were performed on the file or as a result of violating a limit defined by the user.
7) Record operation conflict. The input-output statement was unsuccessfully executed as a result of the record being locked by another file connector.
8) File sharing conflict. The input-output statement was unsuccessfully executed as a result of the file being locked by another file connector.
9) Implementor-defined unsuccessful completion. The input-output statement was unsuccessfully executed as a result of a condition that is specified by the implementor.
9.1.12.1 through 9.1.12.9 specify the values placed in the I-O status for the previously named conditions resulting from the execution of an input-output operation. If more than one value applies, the implementor determines which of the applicable values to place in the I-O status.
9.1.12.1 Successful completion
1) I-O status = 00. The input-output statement is successfully executed and no further information is available concerning the input-output operation.
2) I-O status = 02. The input-output statement is successfully executed but a duplicate key is detected.
a) For a READ statement with the NEXT phrase specified or implied, the key value for the current key of reference is equal to the value of the same key in the next record in the physical file.
b) For a READ statement with the PREVIOUS phrase specified, the key value for the current key of reference is equal to the value of the same key in the prior record in the physical file.
c) For a REWRITE or WRITE statement, the record just written created a duplicate key value for at least one alternate record key for which duplicates are allowed.
3) I-O status = 04. A READ statement is successfully executed but the length of the record being processed does not conform to the fixed file attributes for that file.
4) I-O status = 05. An OPEN statement is successfully executed but the file is described as optional and the physical file is not present at the time the OPEN statement is executed. If the open mode is I-O or extend, the physical file has been created.
5) I-O status = 07. The input-output statement is successfully executed but a CLOSE statement with the NO REWIND, REEL/UNIT, or FOR REMOVAL phrase or for an OPEN statement with the NO REWIND phrase references a physical file on a non-reel/unit medium.
1) I-O status = 0x. An implementor-defined condition exists. The value of x is specified by the implementor and may be any of the uppercase letters 'A' through 'M' or lowercase letters 'a' through 'm', where the range of letters is defined by the sequence of letters in ISO/IEC 646. This condition shall not duplicate any condition specified for I-O status values 9x or 00 through 61.
9.1.12.3 At end condition with unsuccessful completion
1) I-O status = 10. A sequential READ statement is attempted and no next or prior logical record exists in the physical file because:
a) NEXT was specified or implied and the end of the physical file has been reached, or
b) PREVIOUS was specified and the beginning of the physical file has been reached, or c) a sequential READ statement is attempted for the first time on a file described as optional and the physical file is not present.
2) I-O status = 14. A sequential READ statement is attempted for a relative file and the number of significant digits in the relative record number is larger than the size of the relative key data item described for the file.
9.1.12.4 Invalid key condition with unsuccessful completion
1) I-O status = 21. A sequence error exists for a sequentially accessed indexed file. The prime record key value has been changed by the runtime element between the successful execution of a READ statement through a file connector and the execution of the next REWRITE statement for that file through the same file connector, or the ascending sequence requirements for successive record key values are violated. (See 14.8.47, WRITE statement.)
2) I-O status = 22. An attempt is made either:
a) to write a record that would create a duplicate key in a physical relative file.
b) to write a record that would create a duplicate prime record key in a physical indexed file, or c) to write or rewrite a record that would create a duplicate alternate record key when the DUPLICATES phrase is not specified for that alternate record key in the physical file.
3) I-O status = 23. This condition exists because:
a) an attempt is made to randomly access a record that does not exist in the physical file; or
b) a START or random READ statement is attempted on a file described as optional and the physical file is not present; or
c) a START statement is attempted with an invalid key length specification; or
d) a START statement is attempted on a sequential file that has no records or that does not support the ability to position at the specified record.
4) I-O status = 24. An attempt is made to write beyond the externally-defined boundaries of a physical relative or indexed file. The implementor specifies the manner in which these boundaries are defined. Or, a sequential WRITE statement is attempted for a relative file and the number of significant digits in the relative record number is larger than the size of the relative key data item described for the file.
9.1.12.5 Permanent error condition with unsuccessful completion
1) I-O status = 30. A permanent error exists and no further information is available concerning the input-output operation.
2) I-O Status = 31. A permanent error exists during execution of an OPEN statement because the content of the data item referenced by the data-name specified in the USING phrase of the file control entry is not consistent with the specification for the device-name or literal in the ASSIGN clause of that file control entry.
3) I-O status = 34. A permanent error exists because of a boundary violation; an attempt is made to write beyond the externally-defined boundaries of a physical sequential file. The implementor specifies the manner in which these boundaries are defined.
4) I-O status = 35. A permanent error exists because an OPEN statement with the INPUT, I-O, or EXTEND phrase is attempted on a file that is not described as optional and the physical file is not present.
5) I-O status = 37. A permanent error exists because an OPEN statement is attempted on a file and that file will not support the open mode specified in the OPEN statement. The possible violations are:
a) the EXTEND or OUTPUT phrase is specified but the file will not support write operations.
b) the I-O phrase is specified but the file will not support the input and output operations that are permitted for the organization of that file when opened in the I-O mode.
c) the INPUT phrase is specified but the file will not support read operations.
6) I-O status = 38. A permanent error exists because an OPEN statement is attempted on a file connector previously closed with lock.
7) I-O status = 39. The OPEN statement is unsuccessful because a conflict has been detected between the fixed file attributes and the attributes specified for that file in the source unit.
9.1.12.6 Logic error condition with unsuccessful completion
1) I-O status = 41. An OPEN statement is attempted for a file connector in an open mode.
2) I-O status = 42. A CLOSE or UNLOCK statement is attempted for a file connector that is not in an open mode.
3) I-O status = 43. For a mass storage file in the sequential access mode, the last input-output statement executed for the associated file through a file connector prior to the execution of a DELETE or REWRITE statement through the same file connector was not a successfully executed READ statement.
4) I-O status = 44. A boundary violation exists because:
a) an attempt is made to write or rewrite a record that is larger than the largest or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file-name, or
b) an attempt is made to rewrite a record to a sequential file and the record is not the same size as the record being replaced.
c) an attempt is made to write or rewrite a record that is larger than the largest or smaller than the smallest record allowed by the fixed-or-variable-length format of the RECORD clause when the implementor has specified that variable-length records are produced.
5) I-O status = 45. Record identification failure. The input-output statement was unsuccessful because no record description entry was selected for processing with the FORMAT clause or the CODE-SET clause.
6) I-O status = 46. A sequential READ statement is attempted referencing a file connector open in the input or I-O mode and no valid next record has been established because:
a) The preceding START statement referencing that file connector was unsuccessful, or
b) The preceding READ statement referencing that file connector was unsuccessful.
7) I-O status = 47. The execution of a READ or START statement is attempted referencing a file connector that is not open in the input or I-O mode.
8) I-O status = 48. The execution of a WRITE statement is attempted referencing a file connector that is not open in the correct open mode as follows:
a) If the access mode is sequential, the file connector is not open in the extend or output mode.
b) If the access mode is dynamic or random, the file connector is not open in the I-O or output mode.
9) I-O status = 49. The execution of a DELETE or REWRITE statement is attempted referencing a file connector that is not open in the I-O mode.
9.1.12.7 Record operation conflict condition with unsuccessful completion
1) I-O status = 51. The input-output statement is unsuccessful due to an attempt to access a record that is currently locked by another file connector.
2) I-O status = 52. The input-output statement is unsuccessful due to a deadlock. The implementor shall specify under what conditions a deadlock is detected.
3) I-O status = 53. The input-output statement is unsuccessful because the statement requested a record lock, but this run unit holds the maximum number of locks allowed by this implementation.
4) I-O status = 54. The input-output statement is unsuccessful because the statement requested a record lock, but this file connector holds the maximum number of locks allowed by this implementation.
9.1.12.8 File sharing conflict condition with unsuccessful completion
1) I-O status = 61. A file sharing conflict condition exists because an OPEN statement is attempted on a physical file and that physical file is already open by another file connector in a manner that conflicts with this request.
The possible violations are:
a) An attempt is made to open a physical file that is currently open by another file connector in the sharing with no other mode.
b) An attempt is made to open a physical file in the sharing with no other mode and the physical file is currently open by another file connector.
c) An attempt is made to open a physical file for I-O or extend and the physical file is currently open by another file connector in the sharing with read only mode.
d) An attempt is made to open a physical file in the sharing with read only mode and the physical file is currently open by another file connector in the I-O or extend mode.
e) An attempt is made to open a physical file in the output mode and the physical file is currently open by another file connector.
9.1.12.9 Implementor-defined condition with unsuccessful completion
1) I-O status = 9x. An implementor-defined condition exists. This condition shall not duplicate any condition specified by the I-O status values 00 through 61. The value of x is defined by the implementor.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.