Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha
1.3.3.6 Interpreting Messages from the Linker
If the linker detects any errors while linking object modules, it displays system
messages indicating their cause and severity. If any error or fatal error conditions
occur, the linker does not produce an image file. See the OpenVMS Linker Utility
Manual for complete information about the format of linker options.
Linker messages are self-explanatory; you do not usually need additional
information to determine the specific error.
Common Linking Errors to Avoid
The following are some common errors to avoid when linking COBOL programs:
•
Trying to link a module that produced warning or error messages during
compilation. Although you can usually link compiled modules for which the
compiler generated system messages, you should verify that the modules
actually produce the expected output during program execution.
•
Forgetting to specify a file type for an input file that has a file type other than
the default on the command line. The linker searches for a file that has a file
type .OBJ by default. When the linker cannot locate an object file and you
have not identified your input file with the appropriate file type, the linker
signals an error message and does not produce an image file.
•
Trying to link a nonexistent module. The linker signals an error message
if you misspell a module name on the command line or if the compilation
contains fatal messages.
•
Omitting required module or library names from the command line. The
linker cannot locate the definition for a specified global symbol reference.
Consider, for example, the following LINK command for a main program
module, OCEAN.OBJ, that calls the subprograms REEF, SHELLS, and
SEAWEED:
$ LINK OCEAN,REEF,SHELLS
If the routine SEAWEED.OBJ does not exist in the directory from which
the command is issued, an error occurs and the linker issues the following
diagnostic messages:
%LINK-W-NUDFSYMS, 1 undefined symbol
%LINK-I-UDFSYMS,
SEAWEED
%LINK-W-USEUNDEF, undefined symbol SEAWEED referenced
in psect $CODE offset %X0000000C
in module OCEAN file DEVICE$:[COBOL.EXAMPLES]PROG.OBJ;1
%LINK-W-USEUNDEF, undefined symbol SEAWEED referenced
in psect $CODE offset %X00000021
in module OCEAN file DEVICE$:[COBOL.EXAMPLES]PROG.OBJ;1
If an error occurs when you link modules, you can often correct it by
reentering the command string and specifying the correct modules or
libraries.
For a complete list of linker options, see the OpenVMS System Messages and
Recovery Procedures Reference Manual.
Developing Compaq COBOL Programs 1–47
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......