Technical Blog Post
Setting the date field in Remote Systems LPEX Editor
I get this question a lot: "can I set the set the Date field for a line or selection of lines in the Remote Systems LPEX Editor". The good news is that it's possible. The not so bad news is that you have to setup some simple preferences to make this happen.
First, to show the Date field in the LPEX Editor you need to right click in the editor and select Source > Show Date Area. You can also set the Show date area preference on the Remote Systems > Remote Systems LPEX Editor preference page so you don't have to do this every time you open a member.
LPEX ships a bunch of sample actions, one of which is setDate. This is the action that can set the date field for a line or selection of lines. Here are the steps to set this up:
1. Open the preferences dialog (Window > Preferences).
2. Switch to the LPEX > User Actions page. Enter the following values and click Set (don't forget to click Set or this doesn't add it to the table):
Class name: com.ibm.lpex.samples.SetDateAction
3. Click Apply.
4. Now you need to assign a keyboard shortcut to the action so it's easy to invoke from the editor. Switch to the user key actions preference page. Enter the following values and click Set.
The c-s-t sets the keyboard shortcut to Ctrl + Shift + T. You can enter any keyboard shortcut you want here.
5. Click Apply and close the preferences dialog.
When you are inside the LPEX editor you can now invoke the new action. Position the cursor on the line you want to change, or select the block of lines to change. Hint: to select the entire file press Ctrl + Home, then hold down Shift and press Ctrl + End.
Then invoke the action by pressing Ctrl + Shift + T. A dialog box appears at the bottom of the editor prompting for the new date.
While we're on the topic, RDi 7.5 added a new Find Date action to LPEX. Press Ctrl + Shift + D to search for lines that match a specific date, are greater than or less than a date, or match a range.
Alternatively you could move to a change management system like Rational Team Concert for i and stop relying on Date fields to detect when things are changed