Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha
Defining the Search Order for Libraries
When you specify libraries as input for the linker, you can specify as many as you
want; there is no practical limit. More than one library can contain a definition
for the same module name. The linker uses the following conventions to search
libraries specified in the command string:
•
A library is searched only for definitions that are unresolved in the previously
specified input files.
•
If you specified more than one object module library, the libraries are searched
in the order in which they are specified.
For example:
$ LINK METRIC,DEFLIB/LIBRARY,APPLIC
The library DEFLIB will be searched only for unresolved references in the object
module METRIC. It is not searched to resolve references in the object module
APPLIC. However, this command can also be entered as follows:
$ LINK METRIC,APPLIC,DEFLIB/LIBRARY
In this case, DEFLIB.OLB is searched for all references that are not resolved
between METRIC and APPLIC. After the linker has searched all libraries
specified in the command, it searches default user libraries, if any, and then
the default system libraries.
1.3.3.5 Creating Shareable Images
You can create Compaq COBOL programs as shareable images by using the
LINK qualifier /SHARE. A shareable image is a single copy of a program that
can be shared by many users or applications. Using shareable images provides
the following benefits:
•
Saves system resources, since one physical copy of a set of procedures can be
shared by more than one application or user
•
Facilitates the linking of very large applications by allowing you to break
down the whole application into manageable segments
•
Allows you to modify one or more sections of a large application without
having to relink the entire program
The following list describes one way to create and install a Compaq COBOL
program as a shareable image:
1.
Create the main program used to call the subprogram (as a shareable image).
2.
Create the subprogram.
3.
Link the shareable image program using the /SHARE qualifier and including
the options file containing the symbol vector in the LINK command as an
input file. (Refer to Using Symbol Vectors with Shareable Images in this
section for information about declaring universal symbols using a symbol
vector.)
4.
Define a logical name to point to your shareable image.
5.
Link the main program with the shareable image.
Once you have completed these steps, you can run the main program to access
the subprogram installed as a shareable image.
Developing Compaq COBOL Programs 1–43
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......