COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-9
User Library
The language in which a routine is written determines whether it can execute in user
library space:
A CRE HP COBOL program can be put in a TNS user library if it satisfies the criteria
listed in Library Programs.
A loadfile can include as many as 32 code segments—16 in user code space and 16 in
user library space, or all 32 segments in user code space. Each code segment consists
of up to 128 KB.
HP COBOL enables you to write COBOL programs nested within other COBOL
programs. No individual HP COBOL program can produce a program unit of more than
128 KB. No nested set of HP COBOL programs can produce a program unit of more
than 128 KB, in which no program but the outermost can exceed 64 KB. The program
units that make up a run unit can total no more than 32 x 128 KB (16 x 128 KB if it calls
any TNS user library routines).
You can specify a TNS user library in the LIB option of the RUN command. For
information on the LIB option, see the TACL Reference Manual. For more information
on user libraries, see the Binder Manual.
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.
Topics:
•
Building a User Library
•
Specifying a User Library
Language
in Which
Routine is
Written Routine Can Execute in User Library Space
HP COBOL Yes, if the ENV LIBRARY directive is specified
HP C Yes, if the ENV EMBEDDED directive is specified
HP C++ Yes, if the ENV EMBEDDED directive is specified
FORTRAN Yes, but then it cannot have any COMMON, DATA, or SAVE statements
Pascal No
TAL Yes, if no global blocks are defined
Note. ASSIGN and PARAM commands for files in a TNS user library are ignored.
Note. This topic applies only to the NMCOBOL compiler. A TNS program uses a TNS user
library (see TNS User Library
).