Compaq AAQ2G1FTK Marine Radio User Manual


 
Developing Compaq COBOL Programs
1.3 Developing Programs on OpenVMS Alpha
1.3.4.5 Interpreting Run-Time Messages
During execution, an image can generate a fatal error called an exception
condition. When an exception condition occurs, the system displays a message.
Run-time messages can also be issued by the OpenVMS Alpha operating system
or by other utilities such as SORT. Other kinds of errors that can occur at run
time include program run errors and run-time input/output errors.
Run-time messages have the following format:
%COB-s-ident, message-text
%COB
The program name of the Compaq COBOL Run-Time Library. This prefix
indicates a run-time message.
s
The severity of the error. As with messages from the compiler and the linker, the
severity indicator can be F (Fatal), E (Error), W (Warning), or I (Informational).
ident
The message identification. This is a descriptive abbreviation of the message text.
message-text
The run-time message. This portion may contain 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.
The following example shows a run-time message issued for an illegal divide:
%COB-E-DIVBY-ZER, divide by zero; execution continues
Both the compiler and the OpenVMS Alpha Run-Time Library include facilities
for detecting and reporting errors. You can use the OpenVMS Debugger and the
traceback facility to help you locate errors that occur during program execution.
For a description of Compaq COBOL run-time messages, use the HELP COBOL
Run-Time Messages command.
Run-Time Messages
Faulty program logic can cause abnormal termination. If errors occur at run time,
the Run-Time Library (RTL) displays a message with the same general format as
system error messages. In addition, the system traceback facility displays a list
of the routines that were active when the error occurred.
When an error occurs, TRACEBACK produces a symbolic dump of the active call
frames. A call frame represents one execution of a routine. For each call frame,
TRACEBACK displays the following information:
1. The module name, (program-id)
2. The routine name (program-id)
3. The source listing line number where the error or CALL occurred
4. Program-counter (PC) information
You can also use the OpenVMS Debugger to examine the machine code
instruction. To do this, compile and link the program using the /DEBUG qualifier.
When you run the program, you automatically enter the debugger. Once in the
debugger, you could use the EXAMINE/INSTRUCTION command to examine
the contents of the failed instruction. You could also use the debugger in screen
mode, which would indicate where the error occurred.
Developing Compaq COBOL Programs 1–51