The Outline view acts as an excellent resource when you want to edit ILE
RPG, COBOL, CL, or DDS source in the Remote Systems LPEX editor. The Outline
view displays a structural outline of items defined in the file that you currently
have open in the Remote Systems LPEX editor area. With the editor active,
you can expand the file structure in the Outline view, and click various elements
in the view to jump to that location in the source itself.
Here are some of the ways that the Outline view can make editing source
easier and faster for ILE RPG source:
- While you code calculations in the Remote Systems LPEX editor, you can
save time by checking your definitions in the Outline view, so that you do
not need to jump back and forth in the source between the calculations and
your definitions.
- You can click a definition
in the outline view to quickly jump to the appropriate place in your source,
without having to search for the definition.
- You can quickly view the return and resolved values listed beside your
procedure prototypes.
- You can refresh your source information while using the Outline view
by clicking the refresh button
at
the top of the view or by using the Ctrl + Shift + F5 keyboard shortcut.
The Outline view is enabled for the following types of native
IBM® i source:
ILE RPG
When you edit ILE RPG source, the
Outline view displays up to three high-level nodes:
- Global Definitions: definitions that are visible throughout the program
- Main Procedure: parameters and subroutines
- Subprocedures: all procedures defined in the program, each with up to three
nodes for parameters, local definitions, and subroutines:
Depending on how you have coded your RPG source, the
Global
Definitions and
Local Definitions node
in the Outline view may display the following types of items when expanded:
- Files
- Data Structures
- Indicators
- Constants
- Fields
- Prototypes
- Key lists
Clicking any of the elements in this tree takes you to the place in your
source where the item is defined. If you click a subprocedure in the
Subprocedures section
of the Outline view, the positioning in the source will span the whole procedure
definition section.
The ILE RPG outline view refreshes in the background so you can continue
using the editor and RSE while it updates. The refresh action is disabled while the outline
view is refreshing.
With the Update the Outline view when text is changed in the editor preference on the
preference page selected, the Outline view contents are automatically updated when text is changed in the editor. To update
external information that changes, such as database files, press the Refresh button.
If this preference is not selected, the Refresh button needs to be pressed to update the contents of the Outline view. Changing the preference setting
will not effect source files already open in the editor.
With the
Update the Outline view when text is changed in the editor preference selected, there are some changes in the Outline view:
- Items are listed in the order that they appear in the source.
- A Sort button alphabetically sorts the items.
- A Collapse All button collapses all expanded items.
- Parameter lists are listed.
For additional information about the Outline view when the preference is selected, see
http://www.ibm.com/support/docview.wss?uid=swg21592728
Notes® about
the Outline view for ILE RPG source:- If the Update the Outline view when text is changed in the editor preference is selected,
there may be some cases of ILE RPG source with errors which cause the Outline view to not update. In these cases,
warning icons are displayed in the editor.
- Any returned or resolved value for a procedure prototype displays beside
the prototype name.
- If your procedure definition is a /copy member, then the vertical bar
of highlighted source is positioned at the /copy location that contains the
procedure definition. Also, if you click a prototype, your cursor is placed
at the beginning of the line where your procedure is prototyped.
- If a keyword uses a named constant, the Outline view displays the actual
value of the named constant.
- For case preservation: The names in the outline view reflect the
case used when the name was coded in the source. For example, if an entity
is retrieved from an external description, such as an externally described
file, then the record formats and field names are in upper case when displayed
under the File node. However, if they are used in the program with
a different case, then they appear with the case preserved under the Field node.
This does not apply if the Update the Outline view when text is changed in the editor preference is selected.
- KFLD key lists can contain key fields that are null-capable, which means
that the keys can contain null values. To indicate that you want to search
for a null key, you specify an indicator in Factor 2. Ordinarily, program
verifiers will identify the presence of Factor 2 as an error if you do not
have the following keyword coded in your source: ALWNULL(*USRCTL). The field
also will not display as null-capable in the Outline view. To change this
behaviour, you can code ALWNULL(*USRCTL) into your source, or you can change
the program verifier option to indicate that you always want to process null-capable
fields in your programs. To set this option:
- Click .
- In the Preferences window, expand and
click the Data tab.
- Change the Allow null values setting to *USRCTL to
indicate that you want to search for null keys using Factor 2 in KFLD.
- Click OK.
COBOL
You work with COBOL source in the outline view just as you would with ILE
RPG source:
- The view displays four nodes to represent the four high-level divisions
in the COBOL source: Identification Division, Environment Division, Data Division,
and Procedure Division.
- Expand any of the nodes to see the elements underneath. Click on each
element to place your cursor at the corresponding location in the source.
CL
You can also work with CL source members in the Outline view. The view
displays labels and subroutines in the source.
DDS Source
You can also work with DDS source members in the Outline view. The view
offers more detail to reflect the DDS source member structure. In particular,
icons are provided to indicate the type of element in the source, such as
a record or a keyword. The view displays the hierarchy of files, records,
fields, help specifications, keys, and keywords in the selected DDS object.
The root node for a DDS object in the Outline view is the name of the file,
with an icon indicating the type of file, (also indicated by the extension
on the file name). The rest of the elements beneath the root node reflect
the structure of the DDS object, for example, a record group or a set of keywords.
Double-clicking on any of these elements will position your cursor at the
appropriate place in the DDS source.
Notes about
the Outline view for DDS source:- Records can either be contained at the file level, under the root node,
or as children of a Record Group node.
- Resolved Named Field reference labels will display the resolved data length
and decimal positions of the field. If the field reference is not resolved,
then either an increment or a blank space will display beside the field in
the Outline view (depending on whether or not an increment is specified in
the source).
- Indicator Conditions incorporate special boolean labelling. If an Indicator
Condition has the following format, Indicator Condition 07 08 O 09,
the spaces between the sets of numbers indicate that the condition is boolean,
and the presence of an O indicates or. In this case, the
condition would be that 7 and 8 are ON, or 9 is ON.