Severe errors

A severe error cannot be recovered from, even if the ERR_RECOVERY run-time option has been specified with the value YES. A severe error causes the IOSTAT= specifier to be set to one of the values defined below and the ERR= label to be branched to if these specifiers are present on the input/output statement. If the IOSTAT= and ERR= specifiers are not present on the input/output statement when a severe error condition is encountered, the program stops.

Table 1. IOSTAT Values for severe error conditions
IOSTAT Value Error Description
1 END= is not specified on a direct access READ and the record is nonexistent.
2 End of file encountered on WRITE of an internal file.
6 File cannot be found and STATUS='OLD' is specified on an OPEN statement.
10 Read error on direct file.
11 Write error on direct file.
12 Read error on sequential or stream file.
13 Write error on sequential or stream file.
14 Error opening file.
15 Permanent I/O error encountered on file.
37 Dynamic memory allocation failure - out of memory.
38 REWIND error.
39 ENDFILE error.
40 BACKSPACE error.
107 File exists and STATUS='NEW' was specified on an OPEN statement.
119 BACKSPACE statement attempted on unit connected to a tape device.
122 Incomplete record encountered during direct access READ.
130 ACTION='READWRITE' specified on an OPEN statement to connect a pipe.
135 The user program is making calls to an unsupported version of the XL Fortran run-time environment.
139 I/O operation not permitted on the unit because the file was not opened with an appropriate value for the ACTION= specifier.
142 CLOSE error.
144 error.
152 ACCESS='DIRECT' is specified on an OPEN statement for a file that can only be accessed sequentially.
153 POSITION='REWIND' or POSITION='APPEND' is specified on an OPEN statement and the file is a pipe.
156 Invalid value for RECL= specifier on an OPEN statement.
159 External file input could not be flushed because the associated device is not seekable.
165 The record number of the next record that can be read or written is out of the range of the variable specified with the NEXTREC= specifier of the INQUIRE statement.
169 The asynchronous I/O statement cannot be completed because the unit is connected for synchronous I/O only.
172 The connection failed because the file does not allow asynchronous I/O.
173 An asynchronous READ statement was executed while asynchronous WRITE statements were pending for the same unit, or an asynchronous WRITE statement was executed while asynchronous READ statements were pending for the same unit.
174 The synchronous I/O statement cannot be completed because an earlier asynchronous I/O statement has not been completed.
175 The WAIT statement cannot be completed because the value of the ID= specifier is invalid.
176 The WAIT statement cannot be completed because the corresponding asynchronous I/O statement is in a different scoping unit.
178 The asynchronous direct WRITE statement for a record is not permitted because an earlier asynchronous direct WRITE statement for the same record has not been completed.
179 The I/O operation cannot be performed on the unit because there are still incomplete asynchronous I/O operations on the unit.
181 A file cannot be connected to a unit because multiple connections are allowed for synchronous I/O only.
182 Invalid value for UWIDTH= option. It must be set to either 32 or 64.
183 The maximum record length for the unit is out of the range of the scalar variable specified with the RECL= specifier in the INQUIRE statement.
184 The number of bytes of data transmitted is out of the range of the scalar variable specified with the SIZE= or NUM= specifier in the I/O statement.
185 A file cannot be connected to two units with different UWIDTH values.
186 Unit numbers must be in the range 0 to 2,147,483,647.
192 The value of the file position is out of the range of the scalar variable specified with the POS= specifier in the INQUIRE statement.
193 The value of the file size is out of the range of the scalar variable specified with the SIZE= specifier in the INQUIRE statement.
200 FLUSH error.
201 The unit specified in the FLUSH statement is connected to a non-seekable file.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us