COBOL Manual for TNS/E Programs (H06.03+)
HP COBOL Manual for TNS/E Programs—520347-003
23-1
23
Calling Other Programs and
Routines
A HP COBOL program that calls one or more non-COBOL routines is called a mixed-
language program (as is a non-COBOL program that calls one or more COBOL
programs).
HP COBOL programs can call programs compiled by these compilers:
•
TNS/E C
•
TNS/E C++
•
EpTAL
A called routine can have an ordinary, VARIABLE, or EXTENSIBLE parameter list.
Topics:
•
Run-Time Environment
•
Calling Other COBOL Programs
•
Calling Non-COBOL Routines
•
Passing Parameters
To call your HP COBOL program from a non-COBOL program, use the non-COBOL
language’s method of calling an external routine. The method varies from language to
language; see the reference manual for the appropriate non-COBOL language.
Run-Time Environment
Native programs always run in the CRE.
In 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 still has complete access to the HP C run-time library.
The CRE library, a collection of routines that implements the CRE, 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.
Note. This section applies to the Guardian environment. For information on mixed-language
programming in the OSS environment, see Mixed-Language Programs and Utility Routines.










