CRE Programmer's Guide
CRE Services
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
2-4
Program Initialization
In both the OSS and Guardian environments, the CRE validates the environment
during program execution. If it detects that the environment is corrupted, it writes a
message for the user to read, and terminates the program.
Program Initialization
TNS CRE
In the Guardian environment, the TNS CRE:
•
Initializes its own state
•
Calls an initialization routine for each language-specific run-time environment that
is represented in the program’s object file
•
Establishes a trap handler
•
Processes initialization messages including the startup message, ASSIGN
message, and PARAM messages
•
Initializes structures for standard files and for process pairs
In the OSS environment on G-series systems, the TNS CRE:
•
Initializes its own state
•
Calls an initialization routine for each language-specific run-time environment that
is represented in the program’s object file
Native CRE
The native CRE performs only those common steps that pertain to C, C++, native-
mode COBOL, and pTAL run-time initialization. Each language-specific run-time library
causes its own initialization routine to be asserted.
In the Guardian environment, the native CRE:
•
Initializes its own state
•
Establishes a signal handler
•
Processes initialization messages including the startup message, ASSIGN
message, and PARAM messages
•
Initializes structures for standard files and for process pairs
In the OSS environment, the native CRE initializes its own state, and each language-
specific run-time library causes its own initialization routine to be asserted.
Program Termination
The CRE calls a language-specific termination routine for each language represented
in the program’s object file and then calls a kernel routine to stop the process. The