Compaq AAQ2G1FTK Marine Radio User Manual


 
Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha
message-text
The compiler’s message. In many cases, it consists of no more than one line of
output. A message generally provides you with enough information to determine
the cause of the error so that you can correct it.
At line number n in name
The integer n is the number of the line where the diagnostic occurs. The number
is relative to the beginning of the file or text library module specified by name.
A sample compiler message with two diagnostics looks like this in the listing file:
12 PROCEDURE DIVISION.
13 P-NAME
14 MOVE ABC TO XYZ.
................^
%COBOL-E-NODOT, Missing period is assumed
14 MOVE ABC TO XYZ.
............................^
%COBOL-F-UNDEFSYM, Undefined name
In the sample, the first diagnostic pointer ( ^ ) points to the MOVE statement
in source line number 14, which is the closest approximation to where the error
(P-NAME is not followed by a period) occurred. The second diagnostic pointer
points to XYZ, an undefined name in source line number 14. Each diagnostic
pointer is followed by a message line that identifies, in this order:
The Compaq COBOL compiler generated the message
The severity code of the message
The message identification (a mnemonic of the message text)
The text of the message
Although most compiler messages are self-explanatory, some require additional
explanation. The online HELP facility for Compaq COBOL contains a list and
descriptions of these Compaq COBOL compiler messages. Use the HELP COBOL
Compiler Messages command to access this list.
To examine messages that occurred during compilation, you can search for each
occurrence of %COBOL in the compiler listing file. Section 1.3.2.9 describes
listing files.
The severity levels, and what you should do next, are as follows:
Severe The compiler does not produce an object module. You must correct the
error before you can compile the program to produce an object module.
Error The compiler makes an assumption about what you intended and
continues. However, the compiler’s assumption may not relate to your
intention. Correct the error.
Warning The compiler attempts to correct the error in the statement, but you
should verify that the compiler’s action is acceptable. Otherwise, your
program may produce unexpected results.
Informational This message usually appears with other messages to inform you of
specific actions taken by the compiler. No action is necessary on your
part.
Developing Compaq COBOL Programs 1–37