Sunteți pe pagina 1din 7

File Status Codes

Introduction
[Next] [Previous] [Table-of-Contents]

This document provides a summary of the VSAM File Status Codes. If the FILE STATUS clause is specified in the FILE-CONTROL entry, a value is placed in the specified status key (the 2-character data item named in the FILE STATUS clause) during execution of any request on that file. The value indicates the status of that request. The value is placed in the status key before execution of any EXCEPTION/ERROR declarative or INVALID KEY/AT END phrase associated with the request. The following tables contain file status codes that may be set by the mainframe or by Mainframe Expres or NetExpress provided by Micro Focus.

File Status Key


[Next] [Previous] [Table-of-Contents]

The first character of the status key is known as status key 1; the second character is known as status key 2. The combinations of possible values and their meanings are shown below. Status Status Key-1 Condition Key-2 Description

Successful Completion

0 2

No further information The input-output statement was successfully executed, but a duplicate key was detected. For a READ statement the key value for the current key of reference was equal to the value of the same key in the next record within the current key of reference. 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. A READ statement was successfully executed, but the length of the record being processed did not conform to the fixed file attributes for that file. An OPEN statement is successfully executed but the referenced optional file is not present at the time the OPEN statement is executed. If the open mode is I-O, the file has been created. Under MVS, the file has been created if the open mode is I-O or EXTEND. This does not apply to VSAM sequential files. File status 0 is returned. For a CLOSE statement with the NO REWIND, REEL/UNIT, or FOR REMOVAL phrase or for an OPEN statement with the NO REWIND phrase, the referenced file was on a non-reel/unit medium. A sequential READ statement was attempted and no next logical record existed in the file because the end of the file had been reached, or

4 5

At END

the first READ was attempted on an optional input file that was not present. A sequential READ statement was attempted for a relative file and the number of significant digits in the relative record number was larger than the size of the relative key data item described for the file. A sequence error exists for a sequentially accessed indexed file. The prime record key value has been changed by the program between the successful execution of a READ statement and the execution of the next REWRITE statement for that file, or the ascending requirements for successive record key values were violated. An attempt was made to write a record that would create a duplicate key in a relative file; or an attempt was made to write or rewrite a record that would create a duplicate prime record key or a duplicate alternate record key without the DUPLICATES phrase in an indexed file. This key value applies to an indexed file in which the alternate key has been declared 'UNIQUE'. An attempt was made to randomly access a record that does not exist in the file, or a START or random READ statement was attempted on an optional input file that was not present. An attempt was made to write beyond the externally defined boundaries of a relative or indexed file. Or, a sequential WRITE statement was attempted for a relative file and the number of significant digits in the relative record number was larger than the size of the relative key data item described for the file. No further information. A permanent error exists because of a boundary violation; an attempt was made to write beyond the externally-defined boundaries of a sequential file. An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a nonoptional file that was not present. An OPEN statement was attempted on a file that would not support the open mode specified in the OPEN statement. Possible violations are: 1. The EXTEND or OUTPUT phrase was specified but the file would not support write operations. 2. The I-O phrase was specified but the file would not support the input and output operations permitted. 3. The INPUT phrase was specified but the file would not support read operations. 4. Under VSE, the EXTEND phrase was specified for a SAM file. An OPEN statement was attempted on a file previously closed with lock.

Invalid key

Permanent error

0 4

5 7

The OPEN statement was unsuccessful because a conflict was detected between the fixed file attributes and the attributes specified for that file in the program. These attributes include the organization of the file (sequential, relative, or indexed), the prime record key, the alternate record keys, the code set, the maximum record size, the record type (fixed or variable), and the blocking factor. An OPEN statement was attempted for a file in the open mode. A CLOSE statement was attempted for a file not in the open mode. For a mass storage file in the sequential access mode, the last input-output statement executed for the associated file prior to the execution of a REWRITE statement was not a successfully executed READ statement. For relative and indexed files in the sequential access mode, the last input-output statement executed for the file prior to the execution of a DELETE or REWRITE statement was not a successfully executed READ statement. A boundary violation exists because an attempt was made to rewrite a record to a file and the record was not the same size as the record being replaced, or an attempt was made to write or rewrite a record that was larger than the largest or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file-name. A sequential READ statement was attempted on a file open in the input or I-O mode and no valid next record had been established because: 1. The preceding READ statement was unsuccessful but did not cause an at end condition 2. The preceding READ statement caused an at end condition. The execution of a READ statement was attempted on a file not open in the input or I-O mode. The execution of a WRITE statement was attempted on a file not open in the I-O, output, or extend mode. The execution of a DELETE or REWRITE statement was attempted on a file not open in the I-O mode. No further information. For VSAM only: Password failure. Logic error. For VSAM only: Resource not available. For VSAM with CMPR2 compiler-option only: No file position indicator for sequential request. For VSAM only: Invalid or incomplete file

Logic error

1 2 3

7 8 9 9
Implementordefined

0 1 2 3 4 5

information. For VSAM under MVS: No DD statement specified for this file. FOR VSAM and SAM under VSE: No DLBL statement specified for this file. For VSAM only: OPEN statement execution successful: File integrity verified.

File Status Codes


[Next] [Previous] [Table-of-Contents]

The first character of the status key is known as status key 1; the second character is known as status key 2. The combinations of possible values and their meanings are shown below.

Status 1&2 00 02 04 05 07 10 14 21 22 23 24

Description
Successful completion Indexed files only. One of two possibilities: For a READ statement, the key value for the current key is equal to the value of that same key in the next record in the current key of reference. For a WRITE or REWRITE statement, the record just written created a duplicate key value for at least one alternate record key for which duplicates are allowed. The length of the record being processed does not conform to the fixed file attributes for that file. The referenced optional file is not present at the time the OPEN statement is executed. Sequential files only. For an OPEN or CLOSE statement with the REEL/UNIT phrase the referenced file is a non-reel/unit medium. No next logical record exists. You have reached the end of the file. Relative files only. The number of significant digits in the relative record number is larger than the size of the relative key data item described for that file. Sequentially accessed files only. Indicates a sequence error. The ascending key requirements of successive record key values has been violated, or, the prime record key value has been changed by a COBOL program between successful execution of a READ statement and execution of the next REWRITE statement for that file. Indexed and relative files only. Indicates a duplicate key condition. Attempt has been made to store a record that would create a duplicate key in the indexed or relative file OR a duplicate alternate record key that does not allow duplicates. Indicates no record found. An attempt has been made to access a record, identified by a key, and that record does not exist in the file. Alternatively a START or READ operation has been tried on an optional input file that is not present. Relative and indexed files only. Indicates a boundary violation arising from one of the following conditions: an attempt is made to write beyond the externally defined boundaries of a file; a sequential WRITE operation has been tried on a relative file, but 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. The I/O statement was unsuccessfully executed as the result of a boundary violation for a sequential file or as the result of an I/O error, such as a data check parity error, or a transmission error. The I/O statement failed because of a boundary violation. This condition indicates that an attempt has been made to write beyond the externally defined boundaries of a sequential file. An OPEN operation with the I-O, INPUT, or EXTEND phrases has been tried on a nonOPTIONAL file that is not present. An OPEN operation has been tried on a file which does not support the open mode specified in the OPEN statement. An OPEN operation has been tried on a file previously closed with a lock. A conflict has been detected between the fixed file attributes and the attributes specified for that file in the program.

30 34 35 37 38 39

41 42 43 44

An OPEN operation has been tried on file already opened. A CLOSE operation has been tried on file already closed. Files in sequential access mode. The last I/O statement executed for the file, before the execution of a DELETE or REWRITE statement, was not a READ statement. A boundary violation exists. Possible violations are:- An attempt has been 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.- An attempt has been made to REWRITE a record to a file, and the record is not the same size as the record being replaced. A sequential READ operation has been tried on a file open in the INPUT or I-O mode but no valid next record has been established. A READ or START operation has been tried on a file not opened INPUT or I-O. A WRITE operation has been tried on a file not opened in the OUTPUT, I-O, or EXTEND mode, or on a file open I-O in the sequential access mode. A DELETE or REWRITE operation has been tried on a file that is not opened I-O.

46 47 48 49

Extended File Status Codes


[Next] [Previous] [Table-of-Contents]

The first character of the status key is known as status key 1. When status key 1 is equal to 9 then status key 2 is a binary value as defined in the following table.

9/nnn 001 002 003 004 005 006 007 008 009 010 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028

Description
Insufficient buffer space. Could also indicate an out of memory situation. File not open when access tried. Serial mode error. Illegal file name. Illegal device specification. Attempt to write to a file opened for input. Disk space exhausted. Attempt to input from a file opened for output. No room in directory (also, directory does not exist). File name not supplied. Attempt to open a file which is already open. File not found. Too many files open simultaneously. Too many indexed files open. Too many device files open. Record error: probably zero length. Read part record error: EOF before EOR or file open in wrong mode. Rewrite error: open mode or access mode wrong. Device or resource busy. File is a directory. Illegal or impossible access mode for OPEN. Illegal or impossible access mode for CLOSE. Disk I/O error. Operating system data error. Block I/O error. Device not available. No space on device.

029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 045 047 065 066 067 068 069 070 071 072 073 074 075 077 078 081 100 101 102 104 105 129 135 138 139 141 142 143 146 147 148

Attempt to delete open file. File system is read only. Not owner of file. Too many indexed files, or no such process. Physical I/O error. Incorrect mode or file descriptor. Attempt to access a file with incorrect permission. File already exists. File access denied. Disk not compatible. File not compatible. Language initialization not set up correctly. Corrupt index file. Attempt to write on broken pipe. File information missing for indexed file. Attempt to open an NLS file using an incompatible program. Indexed structure overflow. (Could indicate that you have reached the maximum number of duplicate keys.) File locked. Attempt to add duplicate record key to indexed file. Indexed file not open. Record locked. Illegal argument to ISAM module. Too many indexed files open. Bad indexed file format. End of indexed file. No record found in indexed file. No current record in indexed file. Indexed data file name too long. Internal ISAM module failure. Illegal key description in indexed file. Key already exists in indexed file. Invalid file operation. Illegal operation on an indexed file. Sequential file with non-integral number of records. Null file name used in a file operation. Memory allocation error. Attempt to access record zero of relative file. File must not exist. File closed with lock - cannot be opened. Record length or key data inconsistency. File already open - cannot be opened. File not open - cannot be closed. REWRITE/DELETE in sequential mode not preceded by successful READ. No current record defined for sequential read. Wrong open mode or access mode for READ/START. Wrong open mode or access mode for WRITE.

149 150 151 152 158 159 161 173 180 182 183 188 193 194 195 196 210 213 218 219

Wrong open mode or access mode for REWRITE/ DELETE. Program abandoned at user request. Random read on sequential file. REWRITE on file not opened I-O. Attempt to REWRITE to a line-sequential file. Malformed line sequential-file. File header not found. Called program not found. End-of-file marker error. Console input or console output open in wrong direction. Attempt to open line sequential file for I-O. File name too large. Error in variable length count. File size too large. DELETE/REWRITE not preceded by a READ. Record number too large in relative or indexed file. File is closed with lock. Too many locks. Malformed MULTIPLE REEL/UNIT file. Operating system shared file limit exceeded.

S-ar putea să vă placă și