IOMSG= specifier
Standard: F77 F90 F95 F2003
<Syntax>
IOMSG = variable

The IOMSG= specifier is permitted in all input/output statements. The variable must be a scalar character with default kind; its length should be sufficient to hold any message of interest.
<Semantics>
The IOMSG= specifier causes the specified variable to be defined with an explanatory message if an error, end-of-file or end-of-record condition occurs during execution of the input/output statement (if the variable is too short, the message will be truncated). If no such condition occurs, the variable is unchanged.

Note that if no IOSTAT= and no appropriate END=, EOR= or ERR= specifier appears, the program will be terminated on that condition; therefore it is necessary to use one of these together with the IOMSG= specifier if it is to be useful.

<Related>
END= specifier, EOR= specifier, ERR= specifier, IOSTAT= specifier