COBOL Manual for TNS and TNS/R Programs

HP COBOL Manual for TNS and TNS/R Programs522555-006
13-1
13 Libraries and Utility Routines
Utility routines are object programs that your HP COBOL program can call. Utility
routines are in libraries.
TNS libraries are categorized by the memory area in which their routines execute:
If a TNS HP COBOL program calls a utility routine, the routine must be bound into the
program’s target file. The files COBOLEX0, COBOLEX1, COBOLEXT, CBL85UTL,
COBOLLIB, and CLULIB contain utility routines that are to be configured into either the
system library or TNS user library or made available to Binder to enable you to bind
them into your own object files. Among these utility routines are FastSort interface
routines and Saved Message Utility (SMU) routines. As Figure 13-1 shows, FastSort
interface routines are in CBL85UTL, SMU routines for the non-CRE environment are in
COBOLLIB, and SMU routines for the CRE are in CLULIB (Figure 13-1 is not to scale).
For native HP COBOL programs, utility routines are in public shared run-time libraries
(SRLs) named ZCOBSRL and ZCRESRL. (You can also create a user library for a
native HP COBOL program.) If a program calls a utility routine, the NMCOBOL
compiler automatically searches the SRLs for the routine, but the routine is not bound
into the program’s target file. As Figure 13-2 shows, ZCOBSRL contains native
versions of the routines in CBL85UTL and COBOLLIB, and ZCRESRL contains
routines that are in CLULIB. ZCOBSRL and ZCRESRL also contain routines that were
in the system library for TNS HP COBOL programs (Figure 13-2 is not to scale).
Library Type Memory Area Where Routines Execute
Private object library
(linkfile
)
User code space
System library System code space
TNS user library User library space
Figure 13-1. TNS Libraries and Their Utility Routines
CBL85UTL COBOLLIB CLULIB
CRE
COBOL85
Environment
SMU Routines
Other
Routines
CLU_PROCESS_CREATE
_
Other
Routines
FastSort
Routines
CLU_PROCESS_FILE_NAME_
VST619.vsd