The error codes listed on Table A-1 can be detected by the Fortran 90 run-time support. These codes are all in the range 100-199. In addition, the run-time code can return IRIX error codes in the range of 1-99. IRIX error codes are documented in the intro(2) reference page.
When the run-time library detects an error, the following things can occur:
If the error is detected in an I/O statement that specifies an IOSTAT variable, the code is stored in the variable.
If the error is detected in an I/O statement that specifies an ERR label, control passes to that label.
When the error is not in an I/O statement, or when neither the IOSTAT nor ERR clause is given, the error message is displayed on the standard error file and the program terminates.
When the program is terminated by an error, a core file is produced if the f77_dump_flag environment variable is defined and set to y. The core file can be used with dbx to inspect the state of the program at termination.
PERROR and related procedures described in the perror(3f) reference page are used to display error messages.
![]() | Note: Some error codes in Table A-1 are returned by the Fortran 77 run-time libraries, but are not returned by Fortran 90. Such codes are marked with (F77) at the end of the explanation. |
In most cases these codes are related to I/O features that are not supported by Fortran 90, such as indexed I/O. They are retained in Table A-1 because you may find them coded in Fortran 77 source programs you are porting to Fortran 90.
Table A-1. Run-Time Error Messages
Number | Message/Cause |
---|---|
100 | error in format Illegal characters in the FORMAT in the latest I/O statement. |
101 | out of space for I/O unit table Out of virtual space that can be allocated for the I/O unit table. |
102 | formatted io not allowed Cannot do formatted I/O on logical units opened for unformatted I/O. |
103 | unformatted io not allowed Cannot do unformatted I/O on logical units opened for formatted I/O. |
104 | direct io not allowed Cannot do direct I/O on sequential file. |
105 | sequential io not allowed Cannot do sequential I/O on this file. |
106 | can't backspace file Cannot perform BACKSPACE/REWIND on file. |
107 | null file name Filename specification in OPEN statement is null. |
108 | can't stat file Cannot get descriptive information about this file from file system. |
109 | file already connected The specified filename has already been opened as a different logical unit. |
110 | off end of record Attempt to do I/O beyond the end of the record. |
111 | truncation failed in endfile An error occurred while closing the file. |
112 | incomprehensible list input Input data for list-directed read contains invalid character for its data type. |
113 | out of free space Cannot allocate virtual memory space on the system. |
114 | unit not connected Attempt to do I/O on unit that has not been opened or cannot be opened. |
115 | read unexpected character Unexpected character encountered in formatted or directed read. |
116 | blank logical input field Invalid character encountered for logical value. |
117 | bad variable type Specified type for the namelist element is invalid. This error is most likely caused by incompatible versions of the front end and the run-time I/O library. |
118 | bad namelist name The specified namelist name cannot be found in the input data file. |
119 | variable not in namelist The namelist variable name in the input data file does not belong to the specified namelist. |
120 | no end record $END is not found at the end of the namelist input data file. |
121 | namelist subscript out of range The array subscript of the character substring value in the input data file exceeds the range for that array or character string. |
122 | negative repeat count The repeat count in the input data file is less than or equal to zero. |
123 | illegal operation for unit You cannot set your own buffer on direct unformatted files. |
124 | off beginning of record Format edit descriptor causes positioning to go off the beginning of the record. |
125 | no * after repeat count An asterisk (*) is expected after an integer repeat count. |
126 | 'new' file exists The file is opened as new but already exists. |
127 | can't find 'old' file The file is opened as old but does not exist. |
130 | illegal argument Invalid value in the I/O control list. |
131 | duplicate key value on write Cannot write a key that already exists. (F77) |
132 | indexed file not open Cannot perform indexed I/O on an unopened file. (F77) |
133 | bad isam argument The indexed I/O library function receives a bad argument because of a corrupted index file or bad run-time I/O libraries. (F77) |
134 | bad key description The key description is invalid. (F77) |
135 | too many open indexed files Cannot have more than 32 open indexed files. (F77) |
136 | corrupted isam file The indexed file format is not recognizable. This error is usually caused by a corrupted file. (F77) |
137 | isam file not opened for exclusive access Cannot obtain lock on the indexed file. (F77) |
138 | record locked The record has already been locked by another process. (F77) |
138 | key already exists The key specification in the OPEN statement has already been specified. (F77) |
140 | cannot delete primary key DELETE cannot be executed on a primary key. (F77) |
141 | beginning or end of file reached The index for the specified key points beyond the length of the indexed data file. This error is probably because of corrupted ISAM files or a bad indexed I/O run-time library. (F77) |
142 | cannot find requested record The requested key for indexed READ does not exist. (F77) |
143 | current record not defined Cannot execute REWRITE, UNLOCK, or DELETE before doing a READ to define the current record. (F77) |
144 | isam file is exclusively locked The indexed file has been exclusively locked by another process. (F77) |
145 | filename too long The filename exceeds 128 characters. |
147 | record too long Indexed record is too long to read. (F77) |
148 | key structure does not match file structure Mismatch between the key specifications in the OPEN statement and the indexed file. (F77) |
149 | direct access on an indexed file not allowed Cannot have direct-access I/O on an indexed file. (F77) |
150 | keyed access on a sequential file not allowed Cannot use keyed access together with sequential organization. (F77) |
151 | keyed access on a relative file not allowed Cannot use keyed access together with relative organization. (Note 1) |
152 | append access on an indexed file not allowed Cannot use append access together with indexed organization. (F77) |
153 | must specify record length A record length specification is required when opening a direct or keyed access file. |
154 | key field value type does not match key type The type of the given key value does not match the type specified in the OPEN statement for that key. (F77) |
155 | character key field value length too long The length of the character key value exceeds the length specification for that key. (F77) |
156 | fixed record on sequential file not allowed RECORDTYPE='fixed' cannot be used with a sequential file. (F77) |
157 | variable records allowed only on unformatted sequential file RECORDTYPE='variable' can be used only with an unformatted sequential file. (F77) |
158 | stream records allowed only on formatted sequential file RECORDTYPE='stream_lf' can be used only with a formatted sequential file. (F77) |
159 | maximum number of records in direct access file exceeded The specified record is bigger than the MAXREC= value used in the OPEN statement. |
160 | attempt to write to a read-only file User does not have write permission on the file. |
161 | must specify key descriptions Must specify all the keys when opening an indexed file. (F77) |
162 | carriage control not allowed for unformatted units CARRIAGECONTROL can be used only on a formatted file. (F77) |
163 | indexed files only Indexed I/O can be done only on logical units that have been opened for indexed (keyed) access. (F77) |
164 | cannot use on indexed file Illegal I/O operation on an indexed (keyed) file. (F77) |
165 | cannot use on indexed or append file Illegal I/O operation on an indexed (keyed) or append file. (F77) |
167 | invalid code in format specification Unknown code is encountered in format specification. |
168 | invalid record number in direct access file The specified record number is less than 1. |
169 | cannot have endfile record on non-sequential file Cannot have an endfile on a direct- or keyed-access file. |
170 | cannot position within current file Cannot perform fseek() on a file opened for sequential unformatted I/O. |
171 | cannot have sequential records on direct access file Cannot do sequential formatted I/O on a file opened for direct access. |
173 | cannot read from stdout Attempt to read from stdout (unit 6). |
174 | cannot write to stdin Attempt to write to stdin (unit 0). |
176 | illegal specifier The I/O control list contains an invalid value for one of the I/O specifiers; for example, ACCESS='INDEXED'. |
177 | end-of-record condition occurs with PAD=NOThe iolist contains more items than the record can supply, and the PAD=YES specifier was not given. |
178 | EOR= specifier requires ADVANCE=NOAn EOR label can be given only with nonadvancing sequential I/O. |
179 | SIZE= specifier requires ADVANCE=NOThe number of characters read is only meaningful with nonadvancing sequential I/O. |
180 | attempt to read from a writeonly file User does not have read permission on the file. |
181 | direct unformatted io not allowed Direct unformatted file cannot be used with this I/O operation. |
182 | cannot open a directory The name specified in FILE= must be the name of a file, not a directory. |
183 | subscript out of bounds The exit status returned when a program compiled with the –C option has an array subscript that is out of range. |
184 | function not declared as varargs Variable arguments used in a call to a subroutine not declared in a $VARARGS directive (refer to the varargs(3f) reference page) |
185 | internal error Internal run-time library error. |