# 10.7 REWIND Statement

The REWIND statement repositions a sequential file currently open for sequential or append access to the beginning of the file. It takes one of the following forms:

    REWIND ([UNIT=]u [,ERR=s] [,IOSTAT=ios])

    REWIND u

u
  Is a logical unit number.
s
  Is the label of the executable statement that receives control if an error occurs.
ios
  Is an integer scalar memory reference that is assigned a positive integer if an error occurs and zero if no error occurs.

Rules and Behavior

The unit number must refer to a file on disk or magnetic tape. For example, the following statement repositions logical unit 3 to the beginning of the currently open file:

    REWIND 3

A REWIND statement should not be specified for a file that is open for direct access.

Previous Page Next Page Table of Contents