Exercise 3.7: Indenting source

Before you begin, you must complete Exercise 3.6: Prompting language specifications.

When editing ILE RPG source, it can be difficult to determine the beginning and ending of constructs. The iSeries Indent view allows you to see your source with constructs in an indented mode.

To indent source:

  1. Click Source > Show Indentation from the workbench menu.

    The iSeries Indent view opens at the bottom of the workbench.
    Indent view at bottom of workbench

    You can display the iSeries Indent view as a full view.

  2. Double-click the iSeries Indent tab.
    Maximized Indent view
  3. Scroll down to line 150. The Row shown on the status bar is the cursor position.

    In the iSeries Indent view you see some nested conditions with indented lines. As you will notice this helps to recognize the beginning and ending of these conditions.

    Note:
    The Indented view is Browse mode only and cannot be edited.
  4. Click the X in the top right corner of the view to close the iSeries Indent view.
  5. This returns you to the Editor window with the PAYROLL program.

You have used the Indent view to see the beginning and ending of constructs and you are ready to begin Exercise 3.8: Finding and replacing text.