Fortran · File status code

IOSTAT 34 — Unit Already Open

What does IOSTAT 34 — Unit Already Open mean in Fortran?

Occurs when a legacy DEFINE FILE statement specifies a logical unit number that is already connected to another file via a prior OPEN or DEFINE FILE.

IOSTAT 34 — Unit Already OpenIntel Fortran

Condition

Occurs when a legacy DEFINE FILE statement specifies a logical unit number that is already connected to another file via a prior OPEN or DEFINE FILE.

Fix

Close the unit first, or pick a unit number that isn't already in use — grepping for every OPEN/DEFINE FILE on that number is the fastest way to find the conflict.

Pending source verification. Not yet checked against official documentation.

Related file status code