### 10.2.1.7 I/O Status Specifier

The I/O status specifier designates a variable to store a value indicating the status of a data transfer operation. It takes the following form:

  IOSTAT=i-var
  i-var
  Is a scalar integer variable. When a data transfer statement is executed, i-var is set to one of the following values:

  A positive integer | Indicating an error condition occurred.
  A negative integer | Indicating an end-of-file or end-of-record condition occurred. The negative integers differ depending on which condition occurred.
  Zero | Indicating no error, end-of-file, or end-of-record condition occurred.

Execution continues with the statement following the data transfer statement, or the statement identified by a branch specifier (if any).

An end-of-file condition occurs only during execution of a sequential READ statement; an end-of-record condition occurs only during execution of a nonadvancing READ statement.

On OpenVMS systems, secondary operating system messages do not display when IOSTAT is specified. To display these messages, remove IOSTAT or use a platform-specific method such as an OpenVMS condition handler.

For More Information:

- On the error numbers returned by IOSTAT, see your user manual or programmer's guide.
- On OpenVMS condition handlers, see your user manual.

Previous Page Next Page Table of Contents