Navigating in PL/I source files
The z Systems® LPEX Editor, PL/I Editor, and PL/I Compare Editor provide various ways to navigate to and from variable declarations, even when a variable is declared in a different file.
Procedure
To navigate to and from variable declarations:
Folding code blocks
When code folding is enabled, you can expand and collapse code blocks for
IFELSE, IF, ELSE, DO, SELECT, WHEN, OTHERWISE, PACKAGE, BEGIN,
and
PROCEDURE
statements.
Before you begin
- Open the Preferences window.
- Navigate to .
- Select Enable folding of code blocks.
About this task
The following screen capture shows a block of text that is collapsed, marked by +, and one that is expanded, marked by -.

A code block that has only one line of code after the initial line cannot be folded, as in this example:

Using the PL/I Outline view
When you open a file in the editor, an outline of the file opens in the Outline view. The outline view can be updated to contain preprocessor statements after running the Source > Preprocessor Commands action. You can expand or collapse program divisions, show or hide parts of a program, or filter parts of a program by name.
About this task
Icon | Outline element |
---|---|
![]() |
PROCEDURE or PROC |
![]() |
ON |
![]() |
REVERT |
![]() |
LABEL |
![]() |
DO, SELECT, and BEGIN statements |
![]() |
Data item |
When you open a file, the Outline view provides toolbar items and a menu for filtering the parts of a program. From this view, you can show or hide different parts of the program according to their division, expand and collapse the outline, and show or hide parts of the program according to their name.
Procedure
Navigating a source file with quick outline
Open a quick outline to see the structure of COBOL, JCL, and PL/I files and navigate in files.
About this task
Procedure
- To open the quick outline, click
or press Ctrl+O.The quick outline opens on top of the editor. It contains a search filter and an outline of the content of the editor.
- To filter the content of the quick outline, type the text
that you want to show in the filter. Elements that contain matching text and their ancestors are shown in the outline tree. The first matching element is selected in the outline.
- To close the quick outline and navigate to the selected element in the source file, press Enter or double-click the element.
Viewing a PL/I program structure
Use the Open Call Hierarchy action to see a tree-structure view of the procedure and function calls in a PL/I file.
About this task

- The left column contains the tree structure of the specified function or procedure
- The right column shows the line number for the code. When you click a node in the tree structure, the corresponding line number is displayed.
- Only static calls to procedures and functions are supported. Variable references to function names and procedure names are not supported.
- Multiple labels for a single procedure or function definition are not supported.
- Multiple entry points into a procedure are not supported.
- Double-clicking a procedure name when the procedure definition is in an expanded macro source results in being taken to the macro call.
Procedure
- In the editor, select the element that you want to view.
- Right-click and click Open Call Hierarchy from
the menu. The Call Hierarchy view opens.
Navigating the Call Hierarchy view
Procedure
The Call Hierarchy view contains the following toolbar buttons for filtering the contents of the view.
Callee Hierarchy: Displays in the view only the procedures that called the highlighted procedure.
Caller Hierarchy: Displays in the view only the procedures that are called by the highlighted procedure.
View menu: Shows a list of functions to perform in the Call Hierarchy view. In addition to the Caller Hierarchy and Callee Hierarchy view, you can select to hide or show built in functions.