This appendix lists all of the error codes and classes.
As described in section 6, FIO/RIO can return both machine independent and machine specific error codes in the STATUS argument. Portable programs should only test for the machine independent codes or test for error classes using FIO_TEST.
Note that, historically, the codes FIO__ILLAC and FIO__IVUNT have been used both as machine independent internal FIO error codes and as VMS specific error codes. This usage is retained for compatibility. It is unlikely to cause any problems, but the user should be aware of this, particular if mixing direct FORTRAN I/O operations with FIO calls that perform actual I/O.
Internal (machine independent) FIO status values:
FIO__EOF | End of file |
FIO__ERROR | Error |
FIO__FDNFP | File descriptor does not have an associated file parameter descriptor |
FIO__ILLAC 1 | Illegal access mode |
FIO__ILLFD | Illegal file descriptor |
FIO__INVRL | Invalid record length |
FIO__IVUNT 1 | Invalid unit number |
FIO__ISACT | File parameter is active |
FIO__IVACM | Invalid access mode |
FIO__IVFMT | Invalid format |
FIO__NOUNT | No more unit numbers available |
FIO__NTOPN | File not open |
FIO__OSERR | General operating system error code |
FIO__TOOFD | No more available file descriptors |
FIO__TOOFP | Too many file parameters |
FIO__UNKPA | Parameter is not a file parameter |
Error classes:
Class name | STATUS values that match the class |
OPEN error | FIO__FILNF, FIO__CFOLF, FIO__COEXI, FIO__NFEXI, |
FIO__NAMER, FIO__NODEV, FIO__OPNER, FIO__PTAFD, | |
FIO__PERMD, FIO__ILLOP, FIO__ALOPN, FIO__TOOMF | |
CLOSE error | FIO__CLSER, FIO__ILLCL, FIO__INCOC |
READ error | FIO__RDER, FIO__INPCN, FIO__INREQ, FIO__SYNAM, |
FIO__TOOMV, FIO__RUNCH, FIO__BLINP, FIO__ILSTI, | |
FIO__IINAM | |
WRITE error | FIO__WRT, FIO__REWRT, FIO__OUTCN, FIO__OUTOV |
REWIND error | FIO__REWER |
BACKSPACE error | FIO__BACER, FIO__CNTBF |
Note that references to error classes in programs are case insensitive.
DEC FORTRAN (OSF/1, Ultrix and VMS) specific FIO status values:
FIO__ALOPN | File already open |
FIO__BACER | BACKSPACE error |
FIO__CLSER | File close error |
FIO__CNTSF | Cannot stat file (Ultrix only) |
FIO__COEXI | Cannot overwrite existing file (Ultrix only) |
FIO__DLTER | File delete error |
FIO__DUPFL | Duplicate file |
FIO__ENDFL | ENDFILE error |
FIO__FILNF | File not found |
FIO__FINER | FIND error |
FIO__FORVR | Format/variable-type mismatch |
FIO__ILLAC 1 | Illegal access mode |
FIO__INCKC | Inconsistent key change or duplicate key |
FIO__INCOC | Inconsistent OPEN/CLOSE parameters |
FIO__INCRC | Inconsistent record length |
FIO__INCRG | Inconsistent file organization |
FIO__INCRT | Inconsistent record type |
FIO__INFOR | Infinite format loop |
FIO__INPCN | Input conversion error |
FIO__INREQ | Input statement requires too much data |
FIO__INSVR | Insufficient virtual memory |
FIO__INVMK | Invalid key match specifier for key direction |
FIO__INVKY | Invalid key specification |
FIO__INVRG | Invalid argument to FORTRAN Run-Time Library |
FIO__INVRV | Invalid reference to variable |
FIO__IVUNT 1 | Invalid unit number |
FIO__KEYVL | Keyword value error in OPEN statement |
FIO__LISYN | List-directed I/O syntax error |
FIO__MIXFL | Mixed file access modes |
FIO__NAMER | File name error |
FIO__NOCRC | No current record |
FIO__NODEV | No such device |
FIO__OPNER | File open error |
FIO__OPREQ | OPEN or DEFINE FILE required |
FIO__OUTCN | Output conversion error |
FIO__OUTFL | Outside file |
FIO__OUTOV | Output statement overflows record |
FIO__PTAFD | Permission to access file denied (Ultrix only) |
FIO__RDER | File read error |
FIO__RECIO | Recursive I/O operation |
FIO__RECTL | Record too long |
FIO__REQSA | Requires seek ability (Ultrix only) |
FIO__REWER | REWIND error |
FIO__REWRT | REWRITE error |
FIO__SEGRC | Segmented record format error |
FIO__SPLOC | Specified record locked |
FIO__SYNAM | Syntax error in NAMELIST input |
FIO__SYNER | Syntax error in format |
FIO__TOOMV | Too many values for NAMELIST variable |
FIO__TOORC | Too many records in I/O statement |
FIO__UNLER | UNLOCK error |
FIO__UNTNC | Unit not connected (Ultrix only) |
FIO__VFVAL | Variable format expression value error |
FIO__WRTER | File write error |
Sun FORTRAN specific FIO status values:
FIO__BLINP | Blank logical input field (Sun Fortran 1.x only) |
FIO__CFOLF | Cannot find ‘OLD’ file |
FIO__CNTBF | Cannot backspace file |
FIO__CNTSF | Can’t stat file |
FIO__DIONA | Direct I/O not allowed |
FIO__ERFMT | Error in format |
FIO__FILEO | Error in FILEOPT parameter |
FIO__FIONA | Formatted I/O not allowed |
FIO__IINAM | Illegal input for namelist |
FIO__ILARG | Illegal argument |
FIO__ILINP | Illegal logical input field (Sun Fortran 2.x only) |
FIO__ILLUN | Illegal unit number |
FIO__ILOPU | Illegal operation for unit |
FIO__ILSTI | Incomprehensible list input |
FIO__INSPE | Incompatible specifiers in open (Sun Fortran 2.x only) |
FIO__NAARC | No after repeat count |
FIO__NEGRC | Negative repeat count |
FIO__NFEXI | ‘NEW’ file exists |
FIO__OFBOR | Off beginning of record |
FIO__OFEOR | Off end of record |
FIO__OOFSP | Out of free space |
FIO__REQSA | Requires seek ability |
FIO__RUNCH | Read unexpected character |
FIO__SIONA | Sequential I/O not allowed |
FIO__TOOMF | Too many file opens – no free descriptors (Sun Fortran 1.x only) |
FIO__TRUNF | Truncation failed (Sun Fortran 1.x only) |
FIO__UIONA | Unformatted I/O not allowed |
FIO__UNKNO | Unknown system error |
FIO__UNTNC | Unit not connected |
FIO__UNTNO | Attempted operation on unit that is not open (Sun Fortran 1.x only) |
The following FIO error status codes may be returned on machines running SunOS or Solaris. They correspond to operating system error rather than Fortran errors. This is not an exhaustive list of all possible errors. Rather they are those errors that it seemed to the author of the package to be worth detecting.
FIO__PERMD | Permission denied |
FIO__FTOOL | File to large |
FIO__NSLOD | No space left of device |
FIO__FNTL | File name too long |
FIO__DQEXC | Disk quota exceeded |
Redundant FIO status values:
These status values are no longer used by FIO. The symbolic constants are retained so that old code that may refer to them will still compile. However, any code that tests for them as a returned status value will never find these values.
FIO__CRTER | File create error |
FIO__EREXH | Error establishing exit handler |
FIO__ILLCL | Illegal close request |
FIO__ILLOP | Illegal open request |
FIO__NOTFD | File not found (superseded by FIO__FILNF) |
FIO__NTSUP | Option not supported yet |
FIO__OLORG | Illegal origin |
FIO__REDON | File is readonly |
FIO__TOMNY | Too many open files |