Fortran · File status code
What does IOSTAT 26 — OPEN or DEFINE FILE Required mean in Fortran?
Raised when a direct-access READ or WRITE (using REC=) is attempted on a unit that was never opened with ACCESS='DIRECT' (or set up with the legacy DEFINE FILE statement). The runtime has no record layout to use for the direct-access request.
Raised when a direct-access READ or WRITE (using REC=) is attempted on a unit that was never opened with ACCESS='DIRECT' (or set up with the legacy DEFINE FILE statement). The runtime has no record layout to use for the direct-access request.
Add an explicit OPEN with ACCESS='DIRECT' and an appropriate RECL before any direct-access I/O on that unit.