COBOL Error Codes
Data reference errors include invalid data types, improper data definitions, improper data values, and illegal subscripting.
101 There is a reference to a LINKAGE SECTION data item for which no corresponding operand exists because:
1. There are more data items specified in the PROCEDURE DIVISION header than are specified in the USING phrase of the CALL statement in the calling program.
2. The PROCEDURE DIVISION header in the first (or main) program in the run unit specifies more than one data item.
102 There is a range error on a variable-length group reference.
103 An identifier or literal referenced in an INSPECT CONVERTING statement is illegal.
105 A reference to a data item is illegal.
105 A subscript calculation overflowed or underflowed.
106 An index-name value indicates more than 65535 occurrences.
Procedure errors include improper program structure or invalid calls.
201 A CANCEL statement has attempted to cancel a program which is still active; that is a program which has called, directly or indirectly, the program attempting the cancel.
202 The program-name on a CALL statement has a value which is equal to spaces.
203 The program name on the Runtime Command or CALL statement does not match any of the PROGRAM-ID names in any library but does match a valid library object filename. The call-by-filename technique is valid only for single-program object files.
204 The program-name on the Runtime Command or CALL statement does not match any of the PROGRAM-ID names in any library and does not match a valid object filename or machine language file.
205 A CALL statement has attempted to call a program which is still active; that is, a program which has called, directly or indirectly, the program attempting the call in error.
207 There is not enough memory to load the program from the Runtime Command or the CALL statement, or to build the in-memory library structures indicated in the Runtime Command, or to reserve memory for the ACCEPT and DISPLAY buffers. This may be caused by memory fragmentation resulting from the dynamics of CALL and CANCEL operations and file I/O, or it may mean the requested program is too large for the avail able memory.
208 The ALTER statement has an undefined section or paragraph name.
209 The G0 T0 statement was not altered before execution of the statement was attempted.
210 The PERFORM statement attempts to perform an undefined section or paragraph.
211 An E level compilation error has been encountered.
213 The RM/COBOL-85 object library file specified in the Runtime Command cannot be found.
214 The RM/COBOL-85 object library file specified in the Runtime Command does not contain a valid object program.
215 A PERFORM statement in an independent segment has performed a section or paragraph in a fxed segment which performed a section or paragraph in a different independent segment.
Input/output errors occur during file access. The format is: COBOL I/O error number on COBOL- filename file external-file-name The numerically ordered list presented below shows the values that can appear as number in the I/O error messages, and a description of each error. The I/O error number has the form:
| mm, nn|
mm is a two-digit decimal number indicating the general class of error that occurred. It is also the value stored into the FILE STATUS data item if such an item has been specified for the associated file. Thus, this value is available to the program. nn is a two-digit code that provides more specific information on the nature of the error This value is available to the program only if you call the subprogram C$RERR. The phrase " 1985 mode" indicates that the error message description applies to 85-standard COBOL only. The phrase "1974 mode" indicates that the error message description applies to 74-standard COBOL only. Messages not marked with either phrase indicate that the description applies to both 85- and 74-standard COBOL.
00 The operation was successful.
02 The operation was successful and a duplicate key was detected.
04, 05 The record read from the file is shorter than the minimum record length. (1985 mode)
04, 06 The record read from the file is longer than the record area. (1985 mode)
05 An OPEN operation was successful and the optional file was not present. If the open mode is I - 0 or EXTEND, the file has been created. A DELETE FILE statement was successful and the file was not present. (1985 mode)
07 The operation was successful. If the operation was a CLOSE statement with a NO REWIND,REEL,UNIT, or FOR REMOVAL clause, or if the operation was an OPEN statement with the NO REWIND clause, the referenced file is not on a unit/reel medium. (1985 mode)
10 An attempt was made to read past the end of file.
14 A sequential READ statement was 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. (1985 mode)
21 Invalid prime key sequence.
22 The new record value attempts to duplicate an indexed file key which prohibits duplicates, or a relative record number that already exists.
23 The specified record does not exist.
24 There is insufficient disk space for the operation.
24, 01 A sequential WRITE statement was 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. (1985 mode) ~
30, nn I/O error nn occurred, where nn may depend on the: device or machine on which the file resides. In general this is the decimal error number from a DOS function call. See the DOS Reference Manual for detailed information on these errors. ~t On DOS 2.n systems, displayed error codes 19 through 31 correspond to INT 24H error codes 0 through 12. A Procedure Division statement which explicitly or implicitly causes an overlay to be loaded may receive this error if the RM/COBOL<85 object file cannot b. read when the statement is executed.
34 There is insufficient disk space for the operation.
35 The file is not available because the external filename could not be found. The DOS path or file may not exist or the name may be misspelled. Specifying a path name or filename that is not a valid DOS name or that longer than DOS allows also results in this error. (19 mode).
37, 01 The file must be mass storage. The unit-name specified for the file was DISC,DISK, or RANDOM, but the external filename identifies a non-disk or non-file. (1985 mode)
37, 07 The OPEN or DELETE FILE operation is invalid on the read-only file. An open mode of OUTPUT,EXTEND, or I-0 was attempted on a read-only file. 1985 mode)
38 An OPEN or DELETE FILE operation failed because the filename was previously closed WITH LOCK. (1985 mode)
39, 01 The file organization specified for the filename does not match the actual file organization of the external file. (1985 mode)
39, 02 The minimum record length specified in the RECORD CONTAINS clause or implied by the record descriptions of the filename does not match the actual minimum record length of the external file. (1985 mode)
39, 03 The maximum record length specified in the RECORD CONTAINS clause or implied by the record descriptions of the filename does not match the actual maximum record length of the external file. (1985 mode)
39, 04 The minimum block length specified in the BLOCK CONTAINS clause for the filename does not match the actual minimum block size of the external file. (1985 mode)
39, 05 The maximum block length specified in the BLOCK CONTAINS clause for the filename does not match the actual maximum block size of the external file. (1985 mode)
39, 06 The record delimiting technique, LINE or BINARY SEQUENTIAL, specified for the filename does not match the actual record delimiting technique of the external file. (1985 mode)
39, 07 The CODE-SET specified for the filename does not match the actual character code of the external file. (1985 mode)
39, 08 The COLLATING SEQUENCE specified for the indexed file does not match the actual collating sequence of the external file.(l985 mode)
39, 09 The record type attribute, fixed or variable, specified in the RECORD CONTAINS clause or implied by the record descriptions of the filename does not match the record type attribute of the external file. (1985 mode)
41, 01 A duplicate open was rejected by a system which does or 02 not allow the external file to be opened twice. (1985
41, 03 A DELETE FILE was rejected because the file was in an open mode. (1985 mode)
42 A CLOSE operation was attempted on an unopened file. (1985 mode)
43 A DELETE or REWRITE operation was attempted on a file declared to be ACCESS MODE SEQUENTIAL, and the last operation on the file was not a successful READ operation. (1985 mode)
44, 03 The length of the record area specified in the WRITE REWRITE, or RELEASE statement is less than the mini mum record length of the file. (1985 mode) This error will also occur if the number of keys specified does not match the actual number of keys in the external file.
44, 04 The length of the record area specified in the WRITE, REWRITE, or RELEASE statement is greater than the maximum record length of the file. (1985 mode)
44, 07 A REWRITE statement attempted to change the length of a record in a sequential organization file. (1985 mode)
46 No file position is currently defined. A READ or READ NEXT operation was attempted, but the last READ,READ NEXT, or START operation was unsuccessful or returned an at end condition. (1985 mode)
47, 01 The requested operation conflicts with the open mode of the file. A START or READ operation is attempted on a file that is not open in the I NPUT or I - O mode. (1985 mode)
47, 02 A READ or START operation was attempted on an unopened file. (1985 mode)
48, 01 The requested operation conflicts with the open mode of the file. A WRITE operation is attempted on a file that is not open in the OUTPUT or EXTEND mode. (1985 mode)
48, 02 A WRITE operation was attempted on an unopened file. (1985 mode)
49, 01 The requested operation conflicts with the open mode of the file. A DELETE or REWRITE operation is attempted on a file that is not open in the I - O mode. (1985 mode)
49, 02 A DELETE or REWRITE operation was attempted on an unopened file. (1985 mode)
90, 01 The requested operation conflicts with the open mode of the file. A START or READ operation is attempted on a file that is not open in the INPUT or I-O mode. A WRITE operation is attempted on a file that is not open in the OUTPUT or EXTEND mode. A DELETE or REWRITE operation is attempted on a file that is not open in the I - O mode. (1974 mode)
90, 02 A DELETE or REWRITE operation was attempted on a file declared to be ACCESS MODE SEQUENTIAL, and the last operation on the file was not a successful READ operation. (1974 mode)
90, 03 The requested operation conflicts with the media type. A READ or OPEN INPUT operation was attempted on a file with a unit-name of OUTPUT, PRINT, or PRINTER. A WRITE, OPEN OUTPUT, or EXTEND operation was attempted on a file with a unit-name of CARD-READER or INPUT. A DELETE,REWRITE,START, or OPEN I-O operation was attempted on a file with a unit-name other than DISC,DISK, or RANDOM.
90, 04 The requested operation conflicts with the defined organization. A DELETE or START operation was attempted on an ORGANIZATION SEQUENTIAL file.
90, 05 A file truncate operation conflicts with other users. An OPEN OUTPUT operation was attempted on an external filename that is already open.
90, 07 The OPEN or DELETE FILE operation is invalid on a read only file. An open mode of OUTPUT,EXTEND, or I -O was attempted on a read-only file. (1974 mode)
91 A CLOSE operation was attempted on an unopened file.
91 02 A READ, START, WRITE, DELETE, or REWRITE operation was attempted on an unopened file. (1974 mode)
92, 01 A duplicate open was rejected by a system which does or 02 not allow the external file to be opened twice. (1974 mode)
92, 03 A DELETE FILE was rejected because the file was in an open mode. (1974 mode)
93, 02 An open was rejected because file lock conflicts with another user. An OPEN WITH LOCK was attempted on a file which is already open, or an OPEN without lock was attempted and the file is already open WITH LOCK.
93, 03 An OPEN or DELETE FILE operation failed because the filename was previously closed WITH LOCK. (1974 mode)
93, 04 The file could not be opened because another file in the same SAME AREA clause is currently open.
93, 05 The file could not be opened because another file in the same MULTIPLE FILE TAPE clause is already open.
94, 01 The file organization specified for the filename does not match the actual file organization of the external file. (1974 mode)
94, 02 The minimum record length specified in the RECORD CONTAINS clause or implied by the record descriptions of the filename does not match the actual minimum record length of the external file. (1974 mode)
94, 03 The maximum record length specified in the RECORD CONTAINS clause or implied by the record descriptions of the filename does not match the actual maximum record length of the external file. (1974 mode)
94, 04 The minimum block length specified in the BLOCK CONTAINS clause for the filename does not match the actual minimum block size of the external file. (1974 mode)
94, 0 5 The maximum block length specified in the BLOCK CONTAINS clause for the filename does not match the actual maximum block size of the external file. (1974 mode)
94, 06 The record delimiting technique, LINE or BINARY SEQUENTIAL, specified for the filename does not match the actual record delimiting technique of the external file. (1974 mode)
94, 07 The CODE-SET specified for the filename does not match the actual character code of the external file. (1974 mode)
94, 08 The COLLATING SEQUENCE specified for the indexed file does not match the actual collating sequence of the external file. (1974 mode)
94, 09 The record type attribute, fixed or variable, specified in the RECORD CONTAINS clause or implied by the record descriptions of the filename does not match the record type attribute of the external file. (1974 mode)
94, 20 The file is not available because the external filename i could not be found. The DOS path or file may not exist or the name may be misspelled. Specifying a path name ~| or filename that is not a valid DOS name or that is longer than DOS allows also results in this error.
94, 21 The file organization specified is invalid or unsupported or the requested open operation is illegal on the spec fied organization.
94, 22 The minimum record length is invalid. The minimum record length specified in the RECORD CONTAINS clause for the filename exceeds the maximum record length.
94, 23 The maximum record length is invalid. The maximum record length specified in the RECORD CONTAINS clause of the filename exceeds 65280.
94, 24 The minimum block size is invalid. The minimum bloc] size specified in the BLOCK CONTAINS clause of the file name exceeds the maximum block size.
94, 25 The maximum block size is invalid. The maximum bloc] size specified in the BLOCK CONTAINS clause of the file name is too large. For indexed organization files, the computed block size is also a function of the maximum record size. In general, if the BLOCK CONTAINS clause is omitted, the run time support system will default to the valid block size that is a multiple of the disk sector size. For files with c very large record size, specifying BLOCK CONTAINS RECORDS will yield the minimum possible block size.
94, 26 The record delimiter is invalid. A record delimiting technique other than LINE or BINARY was specified.
94, 27 The CODE-SET specified is invalid or unsupported.
94, 28 The C0 LLATING SEQUENCE specified for an indexed file i invalid or unsupported.
94, 29 The record type attribute, fixed or variable, specified for the filename is unsupported.
94, 61 There is insufficient disk space to create a file.
94, 62 There are invalid linage parameters. One or more linage parameters could be negative or greater than 32767, either LINAGE or FOOTING equals zero, or FOOTING is greater than LINAGE.
95, 01 The file must be mass storage. The unit-name specified for the file was DISC,DISK, or RANDOM, but the external filename identifies a non-disk or file. (1974 mode)
96 No file position is currently defined. A READ or READ NEXT operation was attempted, but the last READ,READ NEXT, or START operation was unsuccessful or returned an at end condition. (1974 mode)
97, 01 One or more characters in the record are illegal in a line sequential file.
97, 02 One or more characters could not be translated from the native character set to the external code-set.
97, 03 The length of the record area specified in the WRITE, REWRITE, or RELEASE statement is less than the minimum record length of the file. (1974 mode)
97, 04 The length of the record area specified in the WRITE,. REWRITE, or RELEASE statement is greater than the maximum record length of the file. (1974 mode)
97, 05 The record read from the file is shorter than the minimum record length.
97, 06 The record read from the file is longer than the record area.
97, 07 A REWRITE statement attempted to change the length of a record in a sequential organization file. (1974 mode)
97, 08 LINAGE parameter values error. One or more LINAGE parameters are negative or greater than 32767, LINAGE equals zero, FOOTING equals zero, or FOOTING is greater than LINAGE.
97, 09 The LINAGE TO LINE value is outside page body. Sort-Merge Errors Sort-Merge errors include errors processing a SORT or MERGE statement. Number Description
301 There was insufficient memory available to initiate a sort or merge process.
302 Fewer than three intermediate files were available to begin a SORT statement. The. sort procedure cannot begin unless it is able to create at least three intermediate files.
303 A record read from a MERGE file or SORT USING file was not long enough to include all the keys.
304 Too many out of sequence records were passed to the sort process. Use the B Runtime Command Operation to increase the memory available to sort; or divide the records to be sorted into several files, sort the several files, and merge the resulting files.
305 A SORT or MERGE statement was attempted while a sort or merge process was already active.
306 A RELEASE or RETURN statement was attempted and no sort or merge was active.
307 A RELEASE or RETURN statement was attempted for a sort or merge description other than the one currently being sorted or merged.
308 A RELEASE statement was attempted in an OUTPUT PROCEDURE, or a RETURN statement was attempted in an INPUT PROCEDURE.
309 A RETURN statement was attempted in an OUTPUT PROCEDURE after the at end condition was returned on the sort or merge file.
310 An application I/O statement was attempted on a file currently opened as a sort or merge USING or GIVING