Teach Yourself COBOL in 21 days, Second Edition

Previous chapterNext chapterContents


- D -
Handling Compiler Errors

One of the difficulties of COBOL is dealing with compiler error messages. COBOL is very fussy about the syntax of the program. Some simple errors can produce problems that are difficult to find.

Rules for Locating Errors

The following are two rules to remember at all times:

General Problem Areas

The following are general procedural and typing errors to watch for and avoid:

Specific Errors for Different Compilers

The following is a list of some errors that are hard to catch:

01  SAVE-THE-TOTAL               PIC 9999.
SAVE-THE-TOTAL.
     PERFORM DO-SOMETHING.
MOVE 12 TO ANOTHER-NUMBER
Error: Destination is ambiguous
MOVE 10 T0 THE-NUMBER
OPERAND not declared.
005500 PROGRAM-DONE.
005600     STOP-RUN.\


Previous chapterNext chapterContents


Macmillan Computer Publishing USA

© Copyright, Macmillan Computer Publishing. All rights reserved.