FORTRAN Reference Manual
Introduction to File I/O in the HP NonStop 
Environment
FORTRAN Reference Manual—528615-001
5-8
Units
Logical Record Length
The HP Formatter software package performs all FORTRAN I/O, both formatted and 
unformatted. The Formatter allocates a buffer whose size is equal to the record size 
you specify with one of the following:
•
The RECL specifier in an OPEN statement.
•
The REC specifier in a UNIT compiler directive.
•
The REC specifier in a TACL ASSIGN command.
•
The REC specifier in a FUP CREATE command that creates the file (for structured 
files only).
If you use more than one method to specify the size of a record, the record length 
specified in an OPEN statement overrides the record length specified in an ASSIGN 
statement, which overrides the record length specified in a UNIT directive. For a 
structured file, the REC specifier in the FUP CREATE command overrides all other 
record-length specifications.
If you open a file without specifying its record length by any of the above methods, 
FORTRAN uses the configured record length for the device the file is on (for example, 
80 bytes for a card reader). For devices such as disk volumes and processes, 
FORTRAN uses 132-byte records.
The following statement connects the file INFO to unit 49, and specifies the record 
length to be 124 characters:
OPEN (49, FILE='info', RECL=124)
Units
A FORTRAN program accesses an external file by “connecting” the file to a “unit” for 
that program. Units are the handles by which FORTRAN I/O statements refer to files 
after they are connected. Files have names, but units have numbers. Valid unit 
numbers are integers in the range 1 to 999 inclusive. The OPEN and INQUIRE 
statements are the only FORTRAN I/O statements that can refer to a file by its file 
name. All other statements must use unit numbers.
For any Guardian program running under the operating system, a file can:
Unstructured Y Y N
Entry-sequenced Y N Y
Key-sequenced Y N Y
Relative Y Y Y
Table 5-4. FORTRAN Access Methods for HP-defined Files (page2of2)
Access Method
File Type Sequential Direct Keyed










