Fortran · File status code

IOSTAT 30 — Open Failure

What does IOSTAT 30 — Open Failure mean in Fortran?

A generic OPEN (or INQUIRE) failure the runtime couldn't attribute to a more specific condition like file-not-found or permission-denied — often surfaces on unusual devices, segmented files, or when reopening a unit already tied to standard I/O.

IOSTAT 30 — Open FailureIntel Fortran

Condition

A generic OPEN (or INQUIRE) failure the runtime couldn't attribute to a more specific condition like file-not-found or permission-denied — often surfaces on unusual devices, segmented files, or when reopening a unit already tied to standard I/O.

Fix

Add IOSTAT and IOMSG to the OPEN statement to capture the underlying OS error text, since the bare error number alone doesn't say which precondition failed.

Pending source verification. Not yet checked against official documentation.

Related file status code