Compaq COBOL AAQ2G1FTK User Manual

Page 66

Advertising
background image

Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha

Forgetting to use a file suffix in the file specification, or not specifying
/SOURCE when your source file suffix is not .COB or .CBL

1.3.2.7 Compiling Programs with Conditional Compilation

To debug source code that contains conditional compilation lines, you can use
either the /CONDITIONALS qualifier or the WITH DEBUGGING MODE clause.
The /CONDITIONALS qualifier is listed in Table 1–4. For more information
about the /CONDITIONALS qualifier, invoke the online Help facility for
Compaq COBOL at the system prompt. For more information about the WITH
DEBUGGING MODE clause, refer to the Compaq COBOL Reference Manual.

Using the WITH DEBUGGING MODE clause as part of the SOURCE-
COMPUTER paragraph causes the compiler to process all conditional compilation
lines in your program as COBOL text. If you do not specify the WITH
DEBUGGING MODE clause, and if the /CONDITIONALS qualifier is not in
effect, all conditional compilation lines in your program are treated as comments.

The WITH DEBUGGING MODE clause applies to: ( 1 ) the program that specifies
it, and ( 2 ) any contained program within a program that specifies the clause.

1.3.2.8 Interpreting Messages from the Compiler

If there are errors in your source file when you compile your program, the
Compaq COBOL compiler flags these errors and displays helpful messages.
You can reference the message, locate the error, and, if necessary, correct the
error in your program.

The general format of compiler messages shown on your screen is shown in the
following example:

..........................^
%COBOL-s-ident, message-text

At line number n in name

%COBOL

The facility or program name of the Compaq COBOL compiler. This prefix
indicates that the Compaq COBOL compiler issued the message.

s

The severity of the error, represented in the following way:

F

Fatal error. The compiler does not produce an object module. You must correct the
error before you can compile the program to produce an object module.

E

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.

W

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.

I

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. Note
that these messages are suppressed by default. You must invoke /WARN=ALL or
/WARN=INFO to enable them.

ident

The message identification. This is a descriptive abbreviation of the message text.

1–36 Developing Compaq COBOL Programs

Advertising