Before you begin, you must complete Exercise 3.13: Comparing files in the CODE Editor (optional).
One of the powerful features that the LPEX Editor shares with SEU is its
ability to syntax check your source. Syntax checking can be done either
when the cursor leaves each line of source or all at once on either the
currently selected source or on the entire source member.
Now you will create a syntax error and watch for the prompt to correct
it.
To syntax check the file:
- In the PAYROLL Editor window move the cursor to line 211 which contains
EXSR ACDESR.
You might already be on that line but if not, type the line number in the
sequence number column, or scroll down.
- Append an X to the EXSR op-code to make it
EXSRX.
- Move the cursor off of the line.
An error message appears to draw attention to the error.

- Move the cursor onto the pink error message.
- Press F1.

This opens a window with second level help for the error.
- Minimize the Help window.
- Change EXSRX to EXSR to correct the error.
(Similarly, you can use Edit > Undo to correct this).
- Move the cursor off the line you just fixed.
The error message is automatically removed from the editor.
Tip: You can toggle automatic syntax checking.
Click Window > Preferences from the workbench menu and then expand
Remote Systems, iSeries, LPEX Editor Parsers and select the
language you want to change the settings for in the left pane of the
Preferences window, select the Automatic syntax checking check box
and then click OK.
Tip: You can syntax check the whole source member
currently in the editor by clicking Source > Syntax Check
All.

Now you are ready to review your knowledge of this module by taking the
quiz. You can also apply what you have learned in this module by
completing the practice tasks detailed in More practice.
Quiz
- When column sensitive editing is selected:
- Each column is considered a separate entry space
- If you are inserting or deleting characters into a string that is in the
Factor 2 entry, the result field entry does not move
- The default editor preference is that column sensitive editing is off
- All of the above
- The LPEX Editor has predefined settings, but also has an associated
preference page containing settings that you can define. (T, F)
- LPEX Editor preferences are set in the:
- Preferences window
- Editor window
- New wizard
- Remote Systems view
- You can configure the LPEX Editor to adopt the keyboard and command
personalities of many popular editors. (T, F)
- If you want to undo a set of changes made to a file you must use the
_______ operation. Name the operation.
- Insert
- Replace
- Redo
- Undo
- You can also cancel the effects of an undo operation by using the _______
operation. Name the operation.
- Insert
- Replace
- Redo
- Undo
- This help is invaluable if you cannot remember the order of fields in an
RPG specification or the allowed values for a variable field. Name the
help. Choose the best answer.
- Context sensitive help
- Language sensitive help
- Display help
- Field help
- To receive language sensitive help, press the ____ key in an Editor
window. Name the key:
- F2
- F3
- F1
- F4
- If the cursor is ________ an operation code, you receive help for that
operation code; otherwise, you receive help for the current
specification.
- before
- after
- on
- off
- Instead of entering or changing code directly in the Editor window, you
can use ________.
- Prompts
- Filters
- SEU commands
- Format line
- All of the above
- The ______ view allows you to see your source with constructs in an
indented mode. By default, the ________ view will show the indented
view in the bottom pane.
- Outdent
- iSeries Indent
- Edit
- The iSeries Indent view is browse mode only and cannot be edited.
(T, F)
- You use the _______ window to search for an item in the current
source. Choose the best answer.
- Search
- Find
- Edit
- Find/Replace
- You can search for:
- A word
- A partial word
- A sequence of words
- A pattern if it follows the rules of regular expression
- All of the above
- The LPEX Editor allows you to ____ or subset your source so that you see
only lines containing a given string.
- search
- find
- sort
- filter
- To help you navigate quickly through your ILE RPG source the editor allows
you to filter lines based on the _________. Choose the best
answer.
- string
- line type
- both
- If you would like to search through the members in a source physical file
or through the files in a local directory, you can use the _______
tool. Choose the best answer.
- Compare
- Search
- Find
- Edit
- The ________ tool allows you to compare different versions of a program
and find the differences. Choose the best answer.
- Convert
- Migrate
- Compare
- Search
- There are two ways to compare files. They are Compare tool in the
workbench and the Compare tool in the CODE Editor. (T, F)
- Syntax checking can be done either when the cursor leaves each line of
source or all at once on either the currently selected source or on the entire
source member. (T, F)
More practice
Given your experience using the Remote Systems LPEX Editor, try these new
tasks: Check out how token highlighting works in your ILE RPG
source. Display a format line and use it to enter your source.
Filter source by comments. Set auto-uppercase on. Use the
product online help to assist you in these tasks.
Module recap
You have completed Module 3. Editing source. You have learned how to:
- Change the default settings of the LPEX Editor Parsers
- Change the color settings and font used by the Editor
- Change the default behavior of the Enter key
- Use SEU commands to edit source
- Undo and redo source changes
- View language sensitive help for the MOVE operation code
- View a list of all help contents
- Limit the search of help to specific documents
- Search the help
- Request a prompt for a specification line
- Display context sensitive help for any field in the iSeries Source
Prompter
- View the beginning and ending of constructs in your source
- Use the Find and Replace window to search for an item in your source
- Filter or subset your source
- Filter lines based on line type
- Search through members in a source physical file
- Compare different versions of a program and identify the differences
- Syntax check source by line
- View help on syntax errors
Now that you have mastered editing source, you can move on to verifying
your source to ensure you have a clean compile on the iSeries system.
This approach saves you iSeries cycles! And you perform both verify and
compile from the Remote Systems view! Continue to Module 4. Verifying and compiling source.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.