The System z® LPEX
Editor provides real-time syntax checking of PL/I files in the form
of editor annotations.
The System z LPEX Editor
automatically validates the syntax of PL/I code and embedded CICS® and SQL statements. It flags
syntax errors in PL/I files and provides annotations describing the
errors. The following sections provide examples of the kinds of errors
the System z LPEX Editor
can flag in PL/I files.
You can enable or disable editor annotations using the PL/I
Annotations preference page.
Syntax errors
In the following example from
the HelloApp.pli sample program, the editor has flagged a mistake
in the Do forever; statement:
You can place your cursor over
the flag to display an annotation that explains the error:
Missing include files
The editor detects
missing include files and displays a warning when an include file
is missing. In the following example from the Global Auto Mart sample
application, the GAM0ICT include file is missing:
Undeclared variables
If a program uses a
variable that is undeclared, the editor displays a warning. 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:
- Macros
- Entry constants and entry variables
- Type functions
- Reserved attribute
- Parameter attribute
- limited attribute/option
- Generic attributes
- Factoring of attributes when declaring structures
- isub option with defined attribute
- cdecl, optlink, stdcall attributes of the linkage rule for procedure
options
- norescan attribute of activate directive
- tstack attribute of the attach statement
- Implicit variable declarations
- Some legal expressions are marked as errors
- Built-in functions and preprocessor functions
The following illegal 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
The process statement is ignored, so illegal syntax in this statement
is not marked as an error.