Fortran · File status code
What does IOSTAT 47 — Write to READONLY File mean in Fortran?
A WRITE (or REWRITE/DELETE) was attempted on a unit opened with ACTION='READ' or the READONLY specifier, so the runtime refuses the operation regardless of the underlying file system permissions.
A WRITE (or REWRITE/DELETE) was attempted on a unit opened with ACTION='READ' or the READONLY specifier, so the runtime refuses the operation regardless of the underlying file system permissions.
Change ACTION= to 'READWRITE' (or drop READONLY) on the OPEN statement if the unit genuinely needs to be written, or fix the logic issuing the unwanted write.