The POSITION specifier indicates the position of a file connected for sequential access. It takes the following form:
'ASIS' | Indicates the file position is unchanged if the file exists and is already connected. The position is unspecified if the file exists but is not connected. |
'REWIND' | Indicates the file is positioned at its initial point. |
'APPEND' | Indicates the file is positioned at its terminal point (or before its end-of-file record, if any). |
The default is 'ASIS'. (On Fortran I/O systems, this is the same as 'REWIND'.)
A new file (whether specified as new explicitly or by default) is always positioned at its initial point.
In addition to the POSITION= specifier, you can use position statements. The BACKSPACE statement positions a file back one record. The REWIND statement positions a file at its initial point. The ENDFILE statement writes an end-of-file record at the current position and positions the file after it. Note that ENDFILE does not go the end of an existing file, but creates an end-of-file where it is.
For More Information:
For details on record position, advancement, and transfer, see your programmer's guide.