3.3 Displaying Types of Lines

Next you are ready to filter the types of lines you are viewing in the Editor. This feature helps you navigate through your ILE RPG source.

Showing Comment Lines

Follow these steps:

  1. Select View from the menu bar choice, then select Show > Comments. The Editor now contains only those RPG lines that contain comments.
  2. Move the cursor to the line Subroutine : List.
  3. Select View from the menu bar choice, then select Show all. All the lines are displayed, and you are at the beginning of the first subroutine.
  4. Instead of selecting Show all to see all the lines, you can press Ctrl+A.

Showing Subroutine Lines

Now, let's show all the lines where subroutines are defined in your source.

Follow these steps

  1. Select View from the menu bar choice, then select Show > Subroutines. All subroutine specifications are displayed.
  2. Now that only subroutine lines are displayed, you can move to the area in your file where a subroutine is located.

  3. Move the cursor to the line with the subroutine declaration Detail.
  4. Press Ctrl+A to show all records. The cursor is still positioned on the line for the declaration of the subroutine Detail, but all lines are now showing.

Showing lines makes it quick and easy to find lines without having to scroll through the source.

Filtering Lines

Besides allowing you to show only certain types of lines, the CODE Editor allows you to filter lines that contain a string.

Follow these steps:

  1. Select View from the menu bar choice, then select the Filter menu choice.
  2. Type BEGSR in the Entry field.
  3. Click Filter. Only the lines that contain the string BEGSR appear in the Editor.
  4. Press Ctrl+A to show all lines before continuing with the next lesson.

Click on to indicate that you've done all the steps.