Lists incorrect source
The Diagnostic Report lists all source program lines found to contain a potential error condition. Each line listed is followed by a diagnostic message. The message identifies the problem portion of the COBOL statement with an asterisk (*), indicates the type of condition detected with a keyword indicator, and briefly describes the condition.
Sample report
PRANDEM2 DIAGNOSTIC LISTING DICTIONARY LOADER dd mmm yy 1425 PAGE 2 GEN-LN SOURCE CARD REMARKS 130000 MOVE SPACE TOO DETAIL-REC. * ($$$) SYNTAX ERROR
Diagnostic Report messages
The Diagnostic Report lists three types of diagnostic messages:
Syntax ($$$)
One of the following three messages appears following the $$$ indicator:
The character string reported is a valid COBOL keyword or expression, but it cannot be used where it appears.
The operand of the PERFORM statement is undefined.
The word or construction does not conform to COBOL syntax rules.
ANS, ANS68, ANS74
The appropriate form of the following diagnostic message appears following the ANS, ANS68, or ANS74 indicators:
ANS/ANS-68/ANS-74 DOES NOT ALLOW 'keyword'
The keyword reported violates ANS 1968 standards for COBOL (ANS-68), 1974 standards (ANS-74), or both 1968 and 1974 standards (ANS).
Logical flow (FLO)
One of the following messages appears following the FLO indicator:
ALTER TO procedure-name IN PROCEDURE
PERFORM procedure-name-1 THRU procedure-name-n
The ALTER statement causes the altered paragraph to transfer into the THRU range of a PERFORM procedure that does not contain the altered paragraph.
ALTER TO procedure-name OUT OF PROCEDURE PERFORM procedure-name-1 THRU procedure-name-n The ALTER statement sets the altered paragraph so that it will transfer out of the THRU range of the PERFORM procedure in which the altered paragraph resides.
ALTERED PARAGRAPH NEVER REACHED
This paragraph is never reached when the program is executed. The paragraph is altered however, by a statement that can be reached.
END OF PROC DIV REACHED
Program flow can fall through the end of the last paragraph of the PROCEDURE DIVISION. Program flow, should be ended by a STOP RUN statement.
GO TO procedure-name IN PROCEDURE PERFORM procedure-name-1 THRU procedure-name-n
The GO TO statement resides outside the THRU range of the PERFORM procedure and transfers control to a paragraph inside the PERFORM procedure.
GO TO procedure-name OUT OF PROCEDURE PERFORM procedure-name-1 THRU procedure-name-n
The GO TO statement transfers control out of the THRU range of the PERFORM in which the GO TO resides.
PARAGRAPH NEVER REACHED
Program flow cannot reach this paragraph during execution of the program
PERFORM EXIT BEFORE ENTRY
A statement of the form PERFORM procedure-name-1 THRU procedure-name-n has been found where the procedure-name-n precedes procedure-name-1 in the program.
PERFORM RANGE OVERLAPS PERFORM procedure-name-1 THRU procedure-name-n
The range of this PERFORM statement overlaps the range of PERFORM procedure-name-1 THRU procedure-name-n. Either the two names have a common entry or exit, or one range is not completely nested in the other.
PROCEDURE EXIT NEVER REACHED
The procedure name in the statement flagged can never be reached at execution time. The name is referred to, however, by a statement of the form PERFORM procedure-name-1 THRU procedure-name-n. This message is also issued for a paragraph referred to by an ALTER statement of the form ALTER procedure-name-1 to procedure-name-2, where either procedure-name-1 or procedure-name-2 cannot be reached.
REACHED FROM LAST PARA/SECT AND PERFORM procedure name-1 THRU procedure-name-2
Program flow can reach this statement in either of the following ways:
SENTENCE NEVER REACHED
This sentence will never be reached during program execution.
STATEMENT NEVER REACHED
This statement (within a sentence) will never be reached during program execution.
Types of problems flagged
Note that with the exception of two of the three syntax messages, Diagnostic Report messages identify problems that normal COBOL compilation might not flag. These problems fall into two categories as follows:
Problem |
Description |
---|---|
Compatibility |
ANS messages flag areas of potential compatibility in successfully compiled programs that might be run through another compiler. |
Logical flow |
FLO messages flag potential flaws in logic that could not be detected by the COBOL compiler. For example, FLO diagnostics can aid in identifying statements that can never be reached during execution. |
Syntax errors in compiled programs
Note that messages identifying syntax errors may be issued for programs that have compiled successfully. Such error messages usually identify minor differences in the syntax requirements enforced by the user's compiler and the Program Processor. For example, some compilers do not flag as erroneous COBOL statements that begin in column 8 instead of 12. The Program Processor flags such statements. If these syntax errors are not important to the user, they can be ignored.
Copyright © 2013 CA.
All rights reserved.
|
|