CRE Programmer's Guide

Introducing the CRE
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
1-2
What Is the CRE?
For a mixed-language program running in a language-specific run-time environment,
the program’s main routine determines the run-time environment for all routines in the
program. The run-time libraries do not coordinate with each other.
For example, the main routine might establish a table of run-time error messages and
include error-reporting routines that require the table to be at a fixed location. It might
also allocate a set of data blocks for keeping track of environment information for the
set of files used by the user-written routines. Error reporting and file I/O operations
follow the rules and schemes of the run-time environment established by the main
routine’s run-time library. The main routine can safely call a routine written in another
language only if the called routine does not perform any operations that conflict with
the rules and schemes of the run-time environment of the main routine. The called
routine cannot perform operations that depend on the services of the called routine’s
own run-time environment, such as error reporting and file I/O operations.
What Is the CRE?
The Common Run-Time Environment (CRE) eliminates the problems cited in the
previous subsection. Programs running in the OSS environment or the Guardian
environment can use the services of the CRE, as shown in the following figures.
Note. For simplicity, Figure 1-1 does not show the TAL run-time library or explicit calls to
system routines in non-TAL programs. Only TAL programs with embedded SQL statements use
the TAL run-time library when they run without the CRE.
Figure 1-2. The Common Run-Time Environment in the Guardian Environment
102VST
.VS
D
C
Program
COBOL
Program
FORTRAN
Program
TAL
Program
NonStop Operating System
C
RTL
COBOL
RTL
FORTRAN
RTL
TAL
RTL
CRE Library