Before you begin, you must complete Exercise 3.5: Open a source member for edit.
Before you start, here are some useful tips on using the LPEX editor. Let's look at some of the features of the LPEX editor, so you can later easily find your way around and use them:
Highlighting specification fields
The LPEX editor highlights the Tokens (specification fields) of your RPG program source, providing a separate color for each, improving readability. When you make changes to a line, the token colors get updated only after you move your cursor off the line.
To see how token highlighting works:
The line where you typed the asterisk (*) becomes a comment line and its
color changes accordingly.
The token highlighting changes to reflect that this is a non-commented C specification.
Displaying types of lines
Using the LPEX editor, it is possible to have only particular types of source lines displayed at a time.
To display types of lines:
The menu items list the types of line selections that can be made.
The Editor window now contains only those RPG statements that are
comments.
All statements types are displayed. In addition, the choices in the pop-up menu can be used to include only control specifications, user subroutines, procedures and others. The Filter Selection option under the Selected option in the Edit menu allows the selection of only those lines containing a particular selected character string.
Checking the syntax of a file
Syntax checking is available for RPG code, and by default will be active. The syntax of RPG code is checked automatically when a change is made to a line, and the cursor is moved off the line.
When errors are found, they are displayed following the statement with the error.
Keeping track of columns in a specification line
The format line is at the top of the Editor window, just above the first statement. A format line is used to help keep track of the columns in a particular specification line. The content of the format line can vary to reflect the particular type of specification being keyed such as F specs, C specs, D specs and so on.
To display a format line:
The format line gets updated as a line gets focus.
You can 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 in
which column the cursor is positioned.
You can select a format line for any specification you want.
The Format Line Selection window opens.
Now you can start and create the service program.
You have highlighted tokens of your RPG source, shown only comment lines, shown all lines, displayed a format line and now you are ready to begin Exercise 3.7: Editing a member and creating a service program module.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.