COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
For information about individual routines:
SourceLibrary
CRE Programmer’s GuideZCREDLL
ZCOBDLL RoutinesZCOBDLL
Memory Areas
The memory a COBOL process uses is divided into distinct areas, each holding code blocks or
data blocks for the COBOL run unit or for Guardian environment routines that serve the run unit.
Table 87 Memory Area Characteristics
CommentsSizePurposeMemory Area
Routines from loadfiles
execute here.
256 megabytesHolds code blocks produced
by the compilation
User code space
The maximum size of one
data item is 128 MB.
1.5 GBHolds data blocks produced
by the compilation
User data space
System library routines
execute here.
Holds code for the system
routines that service the run
unit in the user code space
System code space
Holds data for the system
routines that service the run
unit in the user code space
System data space
System Library
System library content is determined at system generation (SYSGEN). System library routines run
in the system code space.
User Library
A user library contains routines that the operating environment links to the loadfile (run unit) at run
time. Run-time linking does not include copying the routines into the loadfile. A loadfile can have
only one user library associated with it.
A user library is a DLL. See Dynamic-Link Libraries (DLLs).
Dynamic-Link Libraries (DLLs)
A DLL is a library of shared code [PIC] that contains functions or data for other PIC loadfiles. (For
more information about PIC and DLLs, see the DLL Programmer’s Guide for TNS/E Systems.)
You can put a program in a DLL if:
• It is not a main program.
• It does not contain embedded SQL/MP or SQL/MX statements.
• It does not contain external objects (data or files that are to be shared with code that is outside
the library).
NOTE: ASSIGN and PARAM commands for files in a DLL are ignored.
If you put an HP COBOL program in a DLL, you must export the program name when you build
the DLL; otherwise, other programs cannot call the HP COBOL program. To export the HP COBOL
program name, use either the ELD directive (Guardian) or the -Weld option (OSS and PC), with
one of the linker options in Table 88.
600 Libraries and Utility Routines










