CRE Programmer's Guide

Compiling and Binding Programs for the TNS CRE
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
3-3
Specifying a Run-Time Environment
All routines in a program must be compiled to run in either a language-specific run-time
environment or the CRE. Routines compiled with the ENV NEUTRAL, ENV
EMBEDDED, and ENV LIBSPACE directives are exceptions to this rule; these routines
do not depend on run-time library resources so they can run in either environment.
All routines that run in the user library space (user library routines) must be compiled
for the same run-time environment as their callers in the user code space (user code
routines). For example, TAL user library routines compiled with the ENV NEUTRAL
directive can be called by TAL routines compiled for either a language-specific run-time
environment or the CRE. C and COBOL user library routines can be called only by
programs that run in the CRE.
Table 3-4
on page 3-3 lists the recognized and default ENV directive options for each
language.
OLD COBOL or FORTRAN user code routines that use the TNS COBOL or
FORTRAN language-specific run-time libraries only
EMBEDDED C user code routines that do not rely on run-time libraries; intended for
subsystems programming
LIBSPACE C user library or system library routines that do not rely on run-time libraries;
intended for systems programming
Table 3-4. Recognized and Default ENV Options
Language Recognized ENV Directives Default ENV Option
C COMMON, EMBEDDED, LIBRARY, LIBSPACE COMMON
COBOL COMMON, LIBRARY, OLD OLD
FORTRAN COMMON, OLD OLD
TAL COMMON, NEUTRAL, OLD NEUTRAL
Table 3-3. Determining Which ENV Options to Use (page 2 of 2)
ENV Option Use for