Indexed WRITE statements transfer output data to external records that have keyed access. (The OPEN statement establishes the attributes 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:
For More Information: