The STATUS keyword specifies the status of the file that you wish to
open. It takes the following form:
STATUS = sta
- sta
- Is a character expression with one of the following values:
- 'OLD': Open a previously created file.
- 'NEW': Create a new file; if the file already exists, an error occurs.
- 'SCRATCH': Create a new file and delete it when it closes.
- 'UNKNOWN': First try 'OLD'; if the file is not found,
use 'NEW' and create a new file.
The default is 'UNKNOWN'. This is also
the default value if you implicitly open a file by using WRITE.
However, if you implicitly open a file by using READ, the default
value is 'OLD'. If
you specify the compiler option NOF77 (or OPTIONS /NOF77), the
default value is 'NEW'.
Scratch files (STATUS='SCRATCH') are
created in the user's working directory and are visible while they
are open. When they are closed, they are deleted.
- Note
- The STATUS keyword is also
used in CLOSE statements to specify the status of a file after
the file is closed. However, in CLOSE statements the STATUS values
are the same as those listed for the DISPOSE
keyword (see Section 10.6.9).
Previous Page Next Page Table of Contents