Real-time syntax checking of COBOL files

The System z® LPEX Editor and the COBOL Editor automatically validate the syntax of COBOL code and embedded CICS® and SQL statements.

The editor performs real-time syntax checking and provides annotations that describe the errors. If an error is found, a warning icon (Exclamation mark in yellow triangle) is displayed. To see the annotation that describes the error, hover your mouse over the icon. The maximum number of errors that are reported is based on the value that is specified for the Maximum number of problems reported per compilation editor preference. The maximum includes the file content and referenced copybook members.

You can customize the appearance of the annotation. The default appearance is a yellow squiggly line under the detected error. To customize, click Windows > Editor > Text editors > Annotation. Then, select Exclamation mark in yellow triangle Warnings in the annotation types list. Change the appearance by selecting values under Show in. For example, to highlight the error, check the Text as box and select Highlighted from the menu. Use the Color field to define the highlight color.

To turn off real-time syntax checking, select Disable syntax parser on the Real-Time Syntax Checking preference page. To enable or disable SQL annotations, use the EXEC SQL statements preference page.

The System z LPEX Editor and the COBOL Editor check for the following error types in COBOL source files:

Examples

The following example shows the annotation for a syntax error.

Division expected instead of this input annotation.
The code contained the following statement:
Syntax error in COBOL program. Statement coded is incorrect.
The IDENTIFICATION statement must contain "DIVISION" instead of "DIV". The annotation appearance is a green highlight.

The following example shows a missing COPYBOOK. The appearance for this annotation is the default appearance.

Annotation for missing COPYBOOK


Feedback