FORTRAN Reference Manual

Compiler Directives
FORTRAN Reference Manual528615-001
10-68
UNIT Compiler Directive
exclusion-code
is one of the following keywords: EXCLUSIVE, PROTECTED, or SHARED.
exclusion-code specifies the file exclusion mode. The default value is
SHARED.
EXT pri-ext
EXT ( pri-ext [, sec-ext ] )
pri-ext and sec-ext are integers in the range 0 through 32767 that
specify the primary and secondary extent size, in pages. If you omit sec-ext,
the compiler uses the value of pri-ext for sec-ext. The default value is
(1,1).
Considerations
You can use one of three methods to connect a unit to a file: the UNIT directive,
the TACL ASSIGN command, or the OPEN statement. The order of precedence of
these three methods is shown below:
?UNIT (7, $s.#1, UNITNAME output) <-- lowest
ASSIGN OUTPUT, $s.#titan
OPEN (7, FILE = '$print') <-- highest
For additional information, see Units on page 5-8.
You can specify the attributes for a range of units. The following example specifies
that the access code for units 8 through 11 is INPUT:
?UNIT (8 - 11, INPUT )
For a structured file, you must use the CREATE command of the FUP utility to
create the file and specify additional file attributes such as file type and record key
descriptions.
Units 4, 5, and 6 exist automatically, even if there are no UNIT directives defining
them.
Specify the UNIT directive either with the FORTRAN command (after the
semicolon following the object file name), or in the source input file before the first
FORTRAN statement.
Example
?UNIT ( 15-17, spec, REC 80, OUTPUT, PROTECTED )