Real-time syntax checking automatically validates the syntax of COBOL code and embedded
CICS® and SQL statements.
About this task
Supported Editors:
- COBOL Editor
- z System LPEX Editor
The editor performs real-time syntax checking and provides annotations that describe the errors.
If an error is found, a warning icon (
) 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 unit option on the Real-Time Syntax Checking preference
page. The maximum includes the file content and referenced files.
You can customize the appearance of the annotation. The default appearance is a yellow squiggly
line under the detected error. To customize, click in the Preferences window. Then, select
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 editors check for the following error types in COBOL source files:
- COBOL syntax errors
- Missing copybook files
- Undeclared variables
- CICS syntax errors in
EXEC CICS
blocks
- IMS syntax errors in
EXEC
DLI blocks
- Ambiguous variable references
- Unreachable code. This error type is identified in v14.1.6 and later versions of the
product.
Limitations:
- Real-time syntax checking is not a substitute for compiling. Real-time syntax checking can catch
most high-level syntax errors, but for full error checking, it is best to compile your source
code.
- For real-time syntax checking to handle COPY statements correctly, the statement must end with a
period (.).