FORTRAN Reference Manual

Introduction to File I/O in the HP NonStop
Environment
FORTRAN Reference Manual528615-001
5-4
File Properties
FORTRAN treats each element of a file that is a character array or a RECORD
array as a record. The ordering of the records is the same as the ordering of the
elements of the array. The length of a record equals the length of an array element.
A variable, array element, substring, RECORD, or RECORD array element that is
a record of an internal file is defined when you write that record. If the number of
characters written is less than the declared length of the record, FORTRAN pads
the remainder of the record with blanks.
A record can be read only if it has been defined.
An internal file is always positioned at the beginning of the first record prior to data
transfer.
Considerations
You can access internal files only sequentially.
You cannot use auxiliary I/O statements to refer to internal files.
File Properties
To access an external file that exists for a program, you must connect the file to a
FORTRAN unit. At the time of connection a file has the following properties:
A unit number (see Units on page 5-8)
A file name
A form of data (formatted, unformatted, or both)
A method of access (sequential, direct, or keyed)
A record length
Table 5-3 lists the default values for file attributes that you do not specify when
connecting the file to a FORTRAN unit.
Table 5-3. FORTRAN Default File Attributes
Attribute Setting
File name A temporary file in the default disk volume
File type Unstructured
File code 0
Extent size One page (2048 bytes)
Record size 132 bytes
Access mode 'I-O'
Exclusion mode 'SHARED'
Tandem File Names