TAL Reference Manual

Compiler Directives
TAL Reference Manual526371-001
16-33
Usage Considerations
The meaning of the ENV attributes are:
Usage Considerations
ENV can appear only once in a compilation unit, either in the compilation command or
in the source code before any declarations. Use ENV only with a D-series compilation
unit.
ENV lets you specify the intended run-time environment of a D-series object file. To
execute successfully, however, the object file must meet the requirements of the run-
time environment.
If ENV is not in effect, all procedures in the compilation unit have the ENV NEUTRAL
attribute.
ENV COMMON Directive
An object file can run in the CRE if the MAIN routine has the ENV COMMON attribute
and if all routines meet CRE requirements.
When ENV COMMON is in effect, all procedures in the compilation unit (except
procedures in object files listed in SEARCH directives) have the ENV COMMON
attribute. SEARCH directives can list object files compiled with any ENV attribute
except OLD. Each procedure in a SEARCH file retains its original ENV attribute.
Using Binder, you can bind an object file compiled with ENV COMMON to any object
file except those compiled with ENV OLD. Each procedure in the new object file retains
its original ENV attribute.
When a compilation unit contains a MAIN procedure and ENV COMMON is in effect,
the compiler allocates and initializes special data blocks as required by the CRE. For
information on these data blocks and on the requirements of the CRE, see Section 17,
Mixed-Language Programming, in the
TAL Programmer’s Guide.
ENV OLD Directive
An object file compiled ENV OLD can run in a COBOL85 or FORTRAN run-time
environment outside the CRE (if the object file meets the requirements of the run-time
environment).
When ENV OLD is in effect, all procedures in the compilation unit (except procedures
in object files listed in SEARCH directives) have the ENV OLD attribute. SEARCH
directives can list object files compiled with any ENV attribute except COMMON. Each
procedure in a SEARCH file retains its original ENV attribute.
ENV Attribute Intended Run-Time Environment
COMMON The CRE
OLD A COBOL or FORTRAN run-time environment outside the
CRE
NEUTRAL None; the program relies primarily on system procedures