Forms for Indexed WRITE Statements (VMS only)

Indexed WRITE statements transfer output data to external records that have keyed access. (The OPEN statement establishes the characteristics of an indexed file.)

Indexed WRITE statements always write a new record. You should use the REWRITE statement to update an existing record.

The syntax of an indexed WRITE statement is similar to a sequential WRITE statement, but an indexed WRITE statement refers to an I/O unit connected to an indexed file, whereas the sequential WRITE statement refers to an I/O unit connected to a sequential file.

An indexed WRITE statement can be formatted or unformatted, and takes one of the following forms:

Formatted:

WRITE (eunit, format, [, iostat] [, err]) [io-list]

Unformatted:

WRITE (eunit, [, iostat] [, err]) [io-list]

For more information, see WRITE in the A to Z Reference.

This section discusses the following topics:

For More Information: