After you set preferences for preprocessor statements and
configure a preprocessor in a property group, you can identify preprocessor
statements in an edit session.
Before you begin
Before you can identify preprocessor statements in an edit
session:
- Set preferences for preprocessor integration. For instructions,
see Setting preferences for preprocessor statements
- Configure a local preprocessor, preprocessor extension, or remote
preprocessor. For instructions, see these topics:
By default, the comparison routine that is used by the actions uses a faster
comparison algorithm for large files with many differences. As a result,
the differences that are identified as preprocessor statements in
the editor for large files might include some lines of text that were
not modified by the preprocessor. To disable this optimized algorithm:
- On the menu bar, click .
- Expand the General category and select Compare/Patch.
- Click the Text tab.
- Select Disable capping when comparing large documents.
- Click OK.
About this task
Preprocessor statements are customized language
statements that are supported by your environment to extend or simplify
creating code. For local and remote preprocessors, the editor uses
a preprocessor output file that contains the programming language
statements that are generated from the preprocessor statements. The
location of the output file depends on whether the preprocessor is
local or remote. For a local preprocessor, the output file is defined
by the Preprocessor Output File Name option
on the property group and is in the BuildOutput folder
of the local project. The output file for a remote preprocessor is
defined by the Preprocessor Output Location property
on the Editor Configuration page.
The preprocessor
output is used to provide editor functions, such as hover information
and content assist with the following limitations:
- Syntax of the preprocessor statement is not verified.
- Content assist and quick fix for incomplete preprocessor statement
is not provided.
- Hover information for a preprocessor statement variable is not
provided.
- Syntax coloring for specific keywords in preprocessor statements
is not supported. Syntax coloring can be defined for a preprocessor
statement and applies to the entire statement.
Procedure
- Open a COBOL or PL/I file in the COBOL Editor, PL/I Editor,
or System LPEX Editor.
- Right-click and select .
- Click one of these menu items:
- Identify Using Configured Preprocessors
- Compare statements in the program with the specified preprocessor.
Statements that match statements in the preprocessor are marked as
preprocessor statements. This menu item locates preprocessor statements
in the file by starting the preprocessor that is associated with the
file. Preprocessor statements are replaced code as defined by the
preprocessor. These statements are highlighted according to the settings
of the Syntax Coloring preference. The default
annotation for preprocessor statements is a vertical blue line at
the left side of the editor.
- Identify Using Specific Output File
- Compare statements in the program with an identified output file
from a previous invocation of the preprocessor. Statements that match
the output file are marked as preprocessor statements.
- Clear Identifications
- The code that is inserted by the preprocessor persists when the
file is saved. Use this menu item to remove marks that identify a
preprocessor statement.
Results
Note: In the PL/I Editor or System z® LPEX Editor, after local preprocessors are started, the PL/I
macro preprocessor is started if either the MACRO or PP compiler option
is specified. If you are using the Windows operating
system, you can specify these options in the property group or PROCESS
statement in the program. This function is not supported on Linux.