COBOL File Status Codes

March 17, 2018 | Author: dharmireddy | Category: File System, Computer File, Database Index, Input/Output, Sequence


Comments



Description

Introduction(Next) (Previous) (Table-of-Contents) This document provides a summary of the two-byte File-Status-Key (sometimes referred to as file return code or file status code). For the COBOL environment if the FILE STATUS clause is specified in the FILECONTROL 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-key content that may be set by Micro Focus COBOL (Mainframe Express or Net Express) or an IBM Mainframe (MVS or OS/390). File Status Key Overview (Next) (Previous) (Table-of-Contents) The ANS/85 standard provides for a two-byte file-status-key. The first character of the file-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 with some comments where vendor additions or extensions may occur. Note: If status-key-1 is a nine (9) then status key 2 is "implementor-defined". Many vendors take advantage of the x"00' to x'FF' (or 0-255) binary value. Therefore, the file status key may not always be a numeric value. Status Key-1 Status Key-2 Condition Successful Completion Description 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 0 0 2 4 5 7 1 At END 0 An attempt was made to write beyond the externally defined boundaries of a relative or indexed file.4 the end of the file had been reached. 2. 3. A permanent error exists because of a boundary violation. The I-O phrase was specified but the file would not support the input and output operations permitted. Or. An OPEN statement with the INPUT. Possible violations are: 1. 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. 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. A sequence error exists for a sequentially accessed indexed file. An OPEN statement was attempted on a file previously closed with lock. or the first READ was attempted on an optional input file that was not present. or a START or random READ statement was attempted on an optional input file that was not present. Under VSE. 4. An attempt was made to randomly access a record that does not exist in the file. or EXTEND phrase was attempted on a nonoptional file that was not present. An attempt was made to write a record that would create a duplicate key in a relative file. or the ascending requirements for successive record key values were violated. 2 Invalid key 1 2 3 4 3 Permanent error 0 4 5 7 8 . The INPUT phrase was specified but the file would not support read operations. No further information. the EXTEND phrase was specified for a SAM file. I-O. an attempt was made to write beyond the externally-defined boundaries of a sequential file. An OPEN statement was attempted on a file that would not support the open mode specified in the OPEN statement. 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. 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. The EXTEND or OUTPUT phrase was specified but the file would not support write operations. This key value applies to an indexed file in which the alternate key has been declared 'UNIQUE'. 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. or extend mode. The execution of a WRITE statement was attempted on a file not open in the I-O. the physical size of the new record is allowed to be smaller than that of the record being replaced. and the record is not the same size as the record being replaced. In this case. the prime record key. 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. The execution of a DELETE or REWRITE statement was attempted on a file not open in the I-O mode. and the blocking factor. the alternate record keys. The execution of a READ statement was attempted on a file not open in the input or I-O mode. The preceding READ statement was unsuccessful but did not cause an at end condition 2. 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.9 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. or indexed). No further information. the record type (fixed or variable). 4 Logic error 1 2 3 4 5 6 7 8 9 9 Implementor- 0 . (Micro Focus) For line sequential files this refers to the physical size of the record. These attributes include the organization of the file (sequential. the code set. For a mass storage file in the sequential access mode. The preceding READ statement caused an at end condition. 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. relative. that is after space removal. A CLOSE statement was attempted for a file not in the open mode. An attempt has been made to REWRITE a record to a file. tab compression and null insertion. An OPEN statement was attempted for a file in the open mode. the maximum record size. 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. output. defined 1 2 3 4 5 6 For VSAM only: Password failure. Too many device files open (Micro Focus). The length of the record being processed does not conform to the fixed file attributes for that file. Possible causes: For a READ statement. For an OPEN or CLOSE statement with the REEL/UNIT phrase the referenced file is a non-reel/unit medium. For VSAM only: Invalid or incomplete file information. Attempted to read from a file opened for output. For VSAM with CMPR2 compiler-option only: No file position indicator for sequential request. 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. Status 1&2 00 02 Description Successful completion Indexed files only. Relative files only. 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. You have reached the end of the file. Logic error. Too many files open simultaneously (Micro Focus). For VSAM under MVS: No DD statement specified for this file. Record error: probably zero length (Micro Focus). Sequential files only. Too many indexed files open (Micro Focus). Attempted to open a file that is already open. 04 05 06 07 08 09 10 12 13 14 15 16 17 . the second character is known as statuskey-2. Attempted to write to a file that has been opened for input. For VSAM only: Resource not available. 7 Primary File Status Keys (Next) (Previous) (Table-of-Contents) The first character of the file-status-key is known as status-key-1. No room in directory or directory does not exist. The referenced optional file is not present at the time the OPEN statement is executed. For a WRITE or REWRITE statement. No next logical record exists. FOR VSAM and SAM under VSE: No DLBL statement specified for this file. the record just written created a duplicate key value for at least one alternate record key for which duplicates are allowed. File not found. For VSAM only: OPEN statement execution successful: File integrity verified. The combinations of possible values and their meanings are shown below. Possible causes: Attempting to write beyond the externally defined boundaries of a file Attempting a sequential WRITE operation has been tried on a relative file. or a transmission error. 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. Files in sequential access mode. before the execution of a DELETE or REWRITE statement. An OPEN operation with the I-O. and the record is not the same size as the record being replaced. Device or resource busy (Micro Focus). or EXTEND phrases has been tried on a nonOPTIONAL file that is not present. 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. 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. May need to map the COBOL file name to the physical file name. that is 22 23 24 30 32 34 35 37 38 39 41 42 43 44 45 . Indicates a boundary violation. Possible causes: Attempting to WRITE or REWRITE a record that is larger than the largest. A CLOSE operation has been tried on file already closed. Alternate indexes are incorrectly defined (Key length or position. refer to the ASSIGN(EXTERNAL) directive) 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 file already opened. 2. The ascending key requirements of successive record key values has been violated. key-position or file organization. Too many Indexed files opened. Sequentially accessed files only. such as a data check parity error. Relative and indexed files only. or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file Attempting to REWRITE a record to a file and the record is not the same size as the record being replaced. (Micro Focus) For line sequential files this refers to the physical size of the record.(Run Time System (RTS) message by Micro Focus). was not a READ statement. Indicates no record found. Other possible causes are: 1. A boundary violation exists. Trying to open a file that does not exist. 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.18 19 20 21 Read part record error: EOF before EOR or file open in wrong mode (Micro Focus). An attempt has been made to REWRITE a record to a file. An OPEN operation has been tried on a file previously closed with a lock. duplicates or sparse parameters). and that record does not exist in the file. key-length. An attempt has been made to access a record. INPUT. A conflict has been detected between the actual file attributes and the attributes specified for the file in the program. The I/O statement failed because of a boundary violation.. or. This can also happen when a sequential file is open for input and an attempt is made to open the same file for output. Indexed and relative files only. identified by a key. Indicates a sequence error. The Recording Mode is Variable or Fixed or not defined the same as when the file was created. (Micro Focus. The last I/O statement executed for the file. This is usually caused by a conflict with record-length. This condition indicates that an attempt has been made to write beyond the externally defined boundaries of a sequential file. Alternatively a START or READ operation has been tried on an optional input file that is not present. Rewrite error: open mode or access mode wrong (Micro Focus). This can also be cause when a physical line sequential file (ASCII/Text) is being read as a sequential file and the directive SEQUENTIAL(LINE) is not set (Micro Focus). the physical size of the new record is allowed to be smaller than that of the record being replaced. A DELETE or REWRITE operation has been tried on a file that is not opened I-O. 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. In this case. Serial mode error. Micro Focus. Record error. Read partial record error: EOF before EOR or file open in wrong mode. A WRITE operation has been tried on a file not opened in the OUTPUT. Too many files open simultaneously. Could also indicate an out of memory situation. Rewrite error: open mode or access mode wrong. Too many indexed files open. Attempt to write to a file opened for input. probable cause is zero record length. Insufficient buffer space. Disk space exhausted. Attempt to input from a file opened for output. Device or resource busy. or EXTEND mode. If status-key-1 is equal to 9 then statuskey-2 is a one byte. File not found. I-O. Extended File Status Keys (Next) (Previous) (Table-of-Contents) The first character of the file-status-key is known as status-key-1. the COBOL file name may not be mapped to a fully qualified PC file name. No room in directory or directory does not exist. Illegal device specification. Illegal file name. File not open when access tried. tab compression and null insertion. File name not supplied.46 47 48 49 after space removal. or on a file open I-O in the sequential access mode. 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9012 9013 9014 9015 9016 9017 9018 05 06 07 08 09 0A 0C 0D 0E 0F 10 11 12 9019 9020 13 14 . binary value as defined in the following table. A READ or START operation has been tried on a file not opened INPUT or I-O. Check the ASSIGN(EXTERNAL) directive and possible environment variable setting for the COBOL file name. Attempt to open a file that is already open. Status-key-2 Status-key-2 Decimal Hex 00 01 02 03 04 Description No further information. Too many device files open. Record locked. Bad indexed file format. Disk not compatible. Illegal or impossible access mode for OPEN. Disk I/O error. Too many indexed files. Physical I/O error. (Micro Focus) This could indicate the filename. Language initialization not set up correctly. Indexed data file name too long. Indexed structure overflow. Not owner of file. or no such process. Too many indexed files open. Indexed file not open. Attempting to read a LINE SEQUENTIAL file as a SEQUENTIAL file(Micro Focus). Corrupt index file. Illegal argument to ISAM module.9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 15 16 17 18 File is a directory. File system is read only.IDX is missing. Block I/O error. Attempt to open an NLS file using an incompatible program. File already exists. 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 41 42 43 44 45 46 47 48 49 4A 4B . No record found in indexed file. File not compatible. Attempt to write on broken pipe. File information missing for indexed file. Operating system data error. Attempt to add duplicate record key to indexed file. Attempt to delete open file. Device not available. Attempt to access a file with incorrect permission. No space on device.) File locked. Incorrect mode or file descriptor. End of indexed file. File access denied. Illegal or impossible access mode for CLOSE. No current record in indexed file. (Could indicate that you have reached the maximum number of duplicate keys. Console input or console output open in wrong direction. Record length or key data inconsistency.9076 9077 9081 9092 9100 9101 9102 9104 9105 9124 9125 9129 9135 9138 9139 9141 9142 9143 9146 9147 9148 9149 9150 9151 9152 9158 9159 9161 9173 9180 9182 9183 9188 9193 9194 4C 4D 51 5C 64 65 66 68 69 7C Internal ISAM module failure. File already open . File not open . Null file name used in a file operation. Wrong open mode or access mode for REWRITE/ DELETE. File closed with lock . Malformed line sequential-file. Memory allocation error. Program abandoned at user request. This can be caused by issuing a read after the end-of-file has been reached during sequential processing. Illegal key description in indexed file. File size too large. End-of-file marker error. Illegal operation on an indexed file. File header not found. Invalid file operation.cannot be closed. Wrong open mode or access mode for READ/START. Called program not found. (Micro Focus) This could indicate a File Name is mapped to use Fileshare and the Fileshare Server has not been started. Attempt to open line sequential file for I-O. Connection to remote system file server is failing (Micro Focus) Attempt to access record zero of relative file. REWRITE/DELETE in sequential mode not preceded by successful READ. Error in variable length count. A PUT for update or an ERASE was issued without a previous GET for update. Wrong open mode or access mode for WRITE. No current record defined for sequential read.cannot be opened.cannot be opened. Connection to remote system is failing. 7D 81 87 8A 8B 8D 8E 8F 92 93 94 95 96 97 98 9E 9F A1 AD B4 B6 B7 BC C1 C2 . Sequential file with non-integral number of records. REWRITE on file not opened I-O. Key already exists in indexed file. Random read on sequential file. File must not exist. Attempt to REWRITE to a line-sequential file. File name too large. Malformed MULTIPLE REEL/UNIT file. File is closed with lock. . Record number too large in relative or indexed file.9195 9196 9210 9213 9218 9219 C3 C4 D2 D5 DA DB DELETE/REWRITE not preceded by a READ. Operating system shared file limit exceeded. Too many locks.
Copyright © 2024 DOKUMEN.SITE Inc.