FORTRAN Reference Manual
Introduction to File I/O in the HP NonStop
Environment
FORTRAN Reference Manual—528615-001
5-7
File Properties
When connected for sequential access, a file has the following attributes:
•
If direct access is not permitted for the file, record order corresponds to the order in
which the records were written. If you can also access the file directly, the order of
the records is the same as that specified for direct access.
•
The file’s records can be formatted, unformatted, or mixed. This is an HP
extension.
•
The last record can be an end-of-file record.
When connected for direct access, a file has the following attributes:
•
The end-of-file record (if any) is not considered to be a part of the file.
•
The file’s records can be formatted, unformatted or mixed. This is an HP extension.
•
Each record of the file has a unique, nonnegative record number that you must
specify when you write the record. You can never change the number of a record.
•
You cannot delete the record, but you can rewrite it.
•
In an EDIT format file, a record number is an EDIT line number times 1000 (that is,
line number 12.34 is record number 12340). A line can have record number 0. In
other unstructured files and in relative files, record numbers are positive integers.
•
You can update (rewrite) records in all file types capable of direct access.
•
You can delete records in some file types by rewriting a zero-length record with an
unformatted WRITE statement that specifies UPDATE = .TRUE. and does not
have a data list.
•
Records are ordered by record number, but you can read or write records in any
order. For example, you can write record 3 although records 1 and 2 do not exist,
or you can read any defined record while the file is connected to a unit.
The attributes of files that can be connected for keyed access are described in
Structured Files
on page 5-18.
Table 5-4. FORTRAN Access Methods for HP-defined Files (page1of2)
Access Method
File Type Sequential Direct Keyed
Magnetic tape Y N N
Card reader Y N N
Printer Y N N
Terminal Y N N
Process Y N N
$RECEIVE Y N N
EDIT format file Y Y N










