Real-time syntax checking of PL/I files

Real-time syntax checking automatically validates the syntax of PL/I files and embedded CICS® and SQL statements.

Supported Editors:
  • PL/I Editor
  • z Systems® LPEX Editor

The editor checks syntax in real time and provides annotations that describe encountered 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 is reported is based on the value that is specified in the Maximum number of problems reported per compilation unit editor preference. The maximum includes the file content and referenced include members

You can customize the appearance of the annotation. For example, instead of a yellow squiggly line under a warning you can display syntax errors with red highlighting or a green dashed box. To customize the annotation appearance, open the Annotation preference page, and select Warnings Exclamation mark in yellow triangle in the list.

To turn off real-time syntax checking on the Real-Time Syntax Checking preference page, select Disable syntax parser.

The editors check for the following error types in PL/I source files:
  • Missing include files
  • Undeclared variables
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 (.).

Examples

In the following example from the HelloApp.pli sample, the program shows a syntax error for the Do forever; statement.
Flag showing errors in PL/I syntax
Place the cursor over the flag to display the annotation that explains the error.
Annotation explaining errors in PL/I syntax.
In the following example from the Global Auto Mart sample application, the GAM0ICT include file is missing.
Annotation for missing include file.
In the following example from the HelloApp.pli sample file, the program declares a variable named theAnswer2, but uses a variable named theAnswer.

Limitations

The following legal PL/I syntactic constructions are marked as errors:
  • Invalid PL/I syntax in macro preprocessor input when the macro preprocessor output is legal PL/I
  • Labels on preprocessor directives
  • Entry constants
  • Type functions
  • Factoring of attributes when you declare structures
  • An isub option with defined attribute
  • A tstack attribute of the attach statement
  • Implicit variable declarations
The following invalid PL/I syntactic constructions are not marked as errors:
  • Condition prefixes for do statements
  • Label prefixes for declare, default, when, otherwise, and on statements
  • Scaling factors for float or fixed
  • Duplicate attributes for declaration statements
  • Syntax errors in macro preprocessor output

You can specify the NAMES, OR, and NOT compiler options in PROCESS statements and in property groups that are associated with PL/I programs. Compiler options that are specified in PROCESS statements override compiler options that are specified in property groups. You can also specify default NAMES, OR, and NOT compiler options when the PL/I compiler is installed on a remote system, but the real-time syntax checker does not recognize these default options. Other compiler options are not supported.