COBOL Manual for TNS/E Programs (H06.03+)
HP COBOL Manual for TNS/E Programs—520347-003
18-1
18
HP COBOL CRE Support
All native programs run in the CRE. Native HP COBOL programs can call and be
called by programs written in native HP C, native HP C++, and pTAL, even if the main
program is not written in HP COBOL.
Topics:
•
Introducing the CRE
•
Shared File Operations
•
Arithmetic Overflow Processing
For more information about writing HP COBOL programs for the CRE, see the CRE
Programmer’s Guide.
Introducing the CRE
The Common Run-Time Environment (CRE) is a set of services that supports mixed-
language programs. The CRE library is a collection of routines that implements the
CRE. The CRE library enables the language-specific run-time libraries to coexist
peacefully with each other. User routines and run-time libraries call CRE library
routines to access shared resources managed by the CRE, such as the standard files
(input, output, and log) and the user heap, regardless of language.
The CRE does not support all possible operations. For example, the CRE supports file
sharing only for the three standard files: standard input, standard output, and standard
log. The language-specific run-time libraries access all other files by calling operating
environment procedures directly, whether or not a program uses the CRE.
Each routine in the program appears to be running in its own language-specific run-
time environment, regardless of the language of the main routine. For example, if the
main routine of a mixed-language program is written in HP COBOL, an HP C routine
has complete access to the HP C run-time library.
Refer to the CRE Programmer’s Guide for more information on writing programs that
use the services provided by the CRE.










