COBOL Manual for TNS and TNS/R Programs

Calling Other Programs and Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
23-19
Passing Parameters
In both the non-CRE environment and the CRE, if a program includes both HP COBOL
and FORTRAN routines, all input-output operations done on a particular file must be
performed within one language, or by routines provided by HP.
Pascal Routines
Only TNS HP COBOL programs in the Guardian environment can call Pascal routines.
If you want your native HP COBOL program to call a Pascal routine, convert the
Pascal routine to native HP COBOL, native HP C, native HP C++, or pTAL.
In the non-CRE environment, an HP COBOL program must not call any Pascal
procedure or function that directly or indirectly allocates or deallocates controlled
storage or performs Pascal input-output operations.
In both the non-CRE environment and the CRE, in order for an HP COBOL program to
call a Pascal routine, the Pascal routine must be exported (declared in an EXPORT list
in its own Pascal module).
TAL Routines
Only TNS HP COBOL programs can call TAL routines. If you want your native
HP COBOL program to call a TAL routine, convert the TAL routine to pTAL (see the
pTAL Conversion Guide).
In the non-CRE environment, if a TAL routine is available to both COBOL and
FORTRAN programs (as the SMU routines before RVU D20.00 are), do not specify the
language (TAL) after the keyword ENTER. By omitting the language specifier, you
declare that you are calling a routine that was compiled by the TAL compiler but uses
FORTRAN protocol for passing string parameters.
In the CRE, specifying “TAL” after the keyword ENTER is recommended.
Passing Parameters
Topics:
TNS Addressing Modes
Native Addressing Modes
What HP COBOL Can Pass by Content
What HP COBOL Can Pass by Reference
What HP COBOL Can Pass by Value.
Passing Parameters to COBOL Programs
Passing Parameters to Non-COBOL Routines