3.5 Using a Format Line

To help you type in RPG source you can use a format line. The format line located at the top of the editing area, can help you keep track of the columns in the ILE RPG/400 specification lines. The content of the format line can vary to reflect particular specification lines. Let's take a look at the format line.

Follow these steps:

  1. Position the cursor anywhere on row 117. A format line appears containing information on an ILE RPG calculation specification, since the cursor was on that type of specification. If the Format line is not visible, select Options > Controls > Format line.
  2. Select Edit > Locate > Line. Click Sequence Number and enter 1170 in the entry field. Click OK. The sequence number 1170 is selected. Alternatively, click Line Number and enter the line number 117 in the entry field instead of the sequence number.

  3. Move the cursor right or left with the arrow keys to go from character to character, or with the Tab key to go from field to field. An indicator on the format line moves with the cursor to show you which column you are in.
  4. Move the cursor to row 118. A format line for a comment specification appears, since the cursor was on that type of specification.
  5. Select View from the menu bar choice, then select Select format line. The Format Line Selection window appears.
  6. Select the C-Calculation radio button, and then select OK. The format line changes to one for a Calculation specification.
  7. Select Options from the menu bar choice, and then select Controls. Deselect Format Line. This turns off the Format Line. You can turn the Format Line back on by selecting it again from the menu.
  8. Click on to indicate that you've done all the steps.