Fortran · File status code
What does IOSTAT 21 — Duplicate File Specifications mean in Fortran?
Triggered when a program issues a second OPEN (or DEFINE FILE) on a unit or file that already has conflicting attributes established, without an intervening CLOSE. It typically comes from copy-pasted setup code that reopens the same unit with different keywords.
Triggered when a program issues a second OPEN (or DEFINE FILE) on a unit or file that already has conflicting attributes established, without an intervening CLOSE. It typically comes from copy-pasted setup code that reopens the same unit with different keywords.
Close the unit before reopening it with different attributes, or reuse the existing OPEN and only change the attributes that legitimately need to change.