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:
- Click the PAYROLLC Editor window, click Source and then click
Syntax Check All on the workbench menu.

Error messages appear to draw attention to the errors.

- 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.
- Add the required left parenthesis to correct the error.
- 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, select the language
you want to change the settings for in the left pane of the Preferences window
and select the Automatic syntax checking check box and then click
OK.

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
- 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
- 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
- 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
- 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)
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
- 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.