Exercise 3.10: Filtering lines by type

Before you begin, you must complete Exercise 3.9: Filtering lines by string.

To help you navigate quickly through your ILE COBOL source the editor allows you to filter lines based on the line type. Imagine you want to see where all the divisions are defined in your source.
Editor pop-up menu with Filter sub menu

To filter lines by type:

  1. Right-click in the Editor window with the PAYROLLC program.
  2. Click Filter view > Divisions on the pop-up menu.

    All source lines with divisions are displayed allowing you to move quickly and easily to the desired division in your file.
    Division filter in action

  3. Move your cursor to the line with the DATA DIVISION (line 64).
  4. Expand the division to show all lines in this division.

    Now you could work with the source inside this division.

  5. Right-click in the Editor window and click Show all on the pop-up menu.

You have filter lines in your source by line type and now you are ready to begin Exercise 3.11: Searching multiple files.