A preprocessor transforms preprocessor statements
into language syntax before a program is compiled. You can configure
the editors to run preprocessors on the workstation, on a remote system,
or from an installed preprocessor extension plug-in. A property group
is used to configure the preprocessors that run when you edit a file.
About this task
When you compile a program, you can run a preprocessor
to transform preprocessor statements into code. You can also start
the preprocessor when you edit a file to help identify coding issues
before compilation. Use the
Preprocessor Integration preference
for the editor to trigger running the preprocessor during edit. Use
the
Editor Configurations page of the property
group editor to define the location of the preprocessor and to configure
it. The editors support preprocessors at the following locations:
- Local preprocessors: The preprocessor runs on the local computer.
- Preprocessor extensions: The preprocessor is an installed preprocessor
extension plug-in that runs in the product workspace.
- Remote preprocessors: The preprocessor runs on a remote computer.
Restriction: Several limitations are associated
with using a preprocessor within the editor:
- Not all preprocessor statements within an EXEC block might be
identified
- Real-time syntax checking of programs that contain preprocessor
statements that contain only the beginning or ending of a language
comment
- All preprocessor statements might not be identified if the code
is reorganized
- Preprocessor statements that modify text in another location of
a program might not be identified
Procedure
To enable, configure, and run preprocessors in an editor:
- Set preprocessor integration preferences for the editor. For instructions, see Setting preferences for preprocessor statements.
- In the property group that is associated with the files
that you want to edit, configure a preprocessor. For instructions,
see one of these topics:
- Edit a COBOL or PL/I file in the COBOL Editor, PL/I Editor,
or System z® LPEX Editor
to run the preprocessor and identify preprocessor statements. For instructions, see Identifying preprocessor statements.