FORTRAN Reference Manual
Introduction to File I/O in the HP NonStop
Environment
FORTRAN Reference Manual—528615-001
5-19
Structured Files
3. Check the values of file creation parameters with the SHOW command. Note that
the SHOW command displays default values for file attributes in addition to the
values you specify.
4. Create the file with the CREATE command. FUP checks the values you chose with
the SET command and creates a file if those values will result in a legal file.
5. Specify STATUS='OLD' in the OPEN statement for a structured file. This is the
default when the file already exists.
6. To delete a record from a structured file do an unformatted WRITE to the file.
Specify UPDATE=.TRUE. but do not include a data list on the WRITE statement.
For a complete description of structured files see the ENSCRIBE Programmer’s Guide.
Entry-Sequenced Files
An entry-sequenced file appends records to the end of a file in the order in which they
are written. In an entry-sequenced file:
•
Records are searched sequentially from the beginning of the file.
•
The length of a record depends upon the length specified when it is written. Once
you delete a record, its space can only be used for another record of the same
size.
•
Records added to the file can vary in length, but once a new record is added, its
length cannot change.
•
Records in the file can be updated but not deleted.
•
You cannot use direct access.
•
You can access records by alternate keys. See Using Alternate Keys on
page 5-22.
•
Records are always written at the end of the file, also after a REWIND or OPEN
statement. The only exception to this is a WRITE statement with an UPDATE =
.TRUE. specifier.










