21.1 Overview of Libraries
Libraries are files that can contain object modules, text
modules, and shareable images. There are two types of
libraries: system-supplied and user-supplied. System-
supplied libraries are provided by the OpenVMS system,
and user-supplied libraries are libraries that you create.
Shareable images are similar to libraries; they contain code
that can be shared by other programs. However, shareable
images contain executable code rather than object code.
If you have routines that are used in many programs, plac-
ing the routines in object module libraries or shareable image
libraries lets you access them at link time. You do not need
to include the routines in the source code, thus shortening
compilation time and conserving disk space.
If you have routines that are used simultaneously by many
different programs, placing the routines in installed shareable
images can improve performance at run time, conserve main
physical memory, and reduce paging I/O because one copy of
the executable code is shared by all users.
Object module libraries, shareable image libraries, and share-
able images can be accessed in the BASIC environment as
well as at DCL command level. When you link programs at
DCL command level, these libraries can contain object code
created by any native mode compiler or assembler.
When you run a program in the BASIC environment, you
can access:
.
Object libraries containing only BASIC object code (object
code from SUB, FUNCTION, and PICTURE subpro-
grams)
.
Shareable image libraries that contain BASIC or non-
BASIC object code (such as a transfer vector written in
VAX MACRO)
Only BASIC subprograms can be loaded into the environment
with the LOAD command.
For a more thorough understanding of libraries and share-
able images, see the OpenVMS Linker Utility Manual and
the Guide to Creating Modular Library Procedures . See the
OpenVMS System Manager's Manual for more information
about installing shareable images. For information about text
libraries, see Chapter 17.