Technical data
Run-Time Considerations
21
Preconnected Files
Table 1-7 shows the standard preconnected files at program start.
All other units are also preconnected when execution begins. Unit n is
connected to a file named fort.n. These files need not exist, nor will they be
created unless their units are used without first executing an open. The
default connection is for sequentially formatted I/O.
File Positions
The Fortran 77 standard does not specify where OPEN should initially
position a file explicitly opened for sequential I/O. The I/O system positions
the file to start of file for both input and output. The execution of an OPEN
statement followed by a WRITE on an existing file causes the file to be
overwritten, erasing any data in the file. In a program called from a parent
process, units 0, 5, and 6 are positioned by the parent process.
Unknown File Status
When the parameter STATUS="UNKNOWN" is specified in an OPEN
statement, the following occurs:
• If the file does not already exist, it is created and positioned at start of
file.
• If the file exists, it is opened and positioned at the beginning of the file.
Table 1-7 Preconnected Files
Unit # Unit
5 Standard input
6 Standard output
0 Standard error










