FORTRAN Reference Manual

Compiler Directives
FORTRAN Reference Manual528615-001
10-19
Using ENV COMMON
The run-time environment provides more consistent and complete run-time error
handling for programs that specify ENV COMMON.
You can specify an eight-character volume name when accessing information over
a network.
FORTRAN supports the NONSTOP and HIGHPIN directives. If ENV OLD is in
effect, FORTRAN prints a warning if it encounters a NONSTOP or HIGHPIN
directive and ignores the directive.
FORTRAN supports the EXECUTION-LOG, INSPECT, NONSTOP, and SWITCH-
nn TACL PARAMs. For more information about run-time PARAMs, see Section 11,
Running and Debugging Programs.
Considerations
The ENV directive must appear on the FORTRAN command line after the
semicolon that follows the object file name, or in the source input file before the
first FORTRAN source statement.
If you specify more than one ENV directive in a compilation, FORTRAN uses the
first one you specify and reports a warning message for each subsequent ENV
directive that appears before the first FORTRAN statement.
FORTRAN reports an error if it encounters an ENV directive after the first
FORTRAN statement and the ENV directive specifies a different environment than
the first ENV directive in your compilation.
Regardless of whether you specify ENV OLD or ENV COMMON, a FORTRAN
subprogram in a user library or in the system library can manipulate only its local
data and data items passed to it in its dummy arguments. It can return data only
through its dummy arguments and, if it is a function subprogram, as the value
returned by the function. It cannot directly access data items in, or equivalenced to,
items declared in COMMON, DATA, or SAVE areas, although such items can be
passed to the library routine as actual arguments.
A routine in a library cannot reference items allocated in the extended data
segment.
A library routine or utility routine can execute FORTRAN I/O statements only if the
unit number specified in the I/O statement is either specified in a UNIT directive or
as a constant value in an I/O statement in a program unit in the program’s user
code area. You can pass the unit number to the library routine as an actual
argument or you can establish the unit number by programmatic convention.
Programs that specify ENV COMMON might be affected as follows:
You must specify ENV COMMON either for all the FORTRAN programs or for none
of the FORTRAN programs that you bind together, including programs bound into
your object file as a result of SEARCH directives. You cannot mix FORTRAN
programs, subprograms, or functions if some of the program units are compiled
with ENV COMMON and others with ENV OLD.