PDM and SEU to RSE and Remote Systems LPEX Editor transition

Learn about the similarities between PDM and the Remote System Explorer and SEU and the Remote Systems LPEX Editor and the enhancements in the Remote System Explorer and the Remote Systems LPEX Editor that are not available in PDM and SEU. Learn about how to accomplish the most commonly performed tasks on your IBM® i using RSE and the Remote Systems LPEX Editor and why these tools are better than PDM and SEU.

Getting started in PDM

To start working in PDM, normally you:
  1. Start the emulator
  2. Sign on
  3. Issue the STRPDM command, or one of the WRKxxxPDM commands

In PDM, the WRKxxxPDM command only remember your previously entered parameters, so you must often type frequently used parameters repeatedly. In PDM you can only see one library’s objects, and one file’s members at a time, and it is not possible to work with your libraries, objects and members at the same time. To accomplish this goal, you might have several emulators running so that you can work with your various lists of items simultaneously.

How to begin in RSE

To start working in RSE:
  1. Start up the workbench
  2. When prompted, specify a workspace
  3. Once the workbench is started, ensure that you are in the Remote System Explorer Perspective

    Window > Open Perspective > Remote System Explorer. RSE perspective

  4. Next you will need to create a connection.
  5. See create a connection.

Creating a connection is the equivalent of defining your emulator sessions. You can define multiple connections to the same IBM i, but in addition, you can include different configurations for the startup of your connection, such as saving different user IDs and passwords, initial library lists etc.

Tips:
  • When creating a connection, leave the default profile pre-filled. The default profile can be used to share connections with others, and to use filter pools.
  • When specifying host name, you can either specify the IP address, or the fully qualified name (if necessary).
  • The Verify host name check box ensures that you can actually connect to the IBM i you have specified. To ensure that you have all necessary PTFs installed on your IBM i, right-click the Objects subsystem under the connection (after it has been created) and select Verify connection. This will ensure that all necessary ports are open, callbacks can be performed, and that the required host PTFs are applied.
  • To define a connection’s startup properties, right-click on a connection and select Properties.

Subsystems

The first thing you will notice when you expand your connection is a list of subsystems.

Remote Subsystems

IBM i connections have five different subsystems:
  1. Objects subsystem: This can be used to access libraries, objects and members
  2. Commands subsystem: By default, this subsystem is pre-populated with a set of predefined commands that you can use to run against remote objects. You can also define command sets, and commands of your own. The results are logged in the Commands Log view .
  3. Jobs subsystem: Use this subsystem to list jobs. You can subset by job attributes, and perform job operations, such as hold, resume, end.
  4. IFS Files subsystem: Explore IFS files and folder structure and perform actions on them.
  5. Qshells subsystem: Access the list of active running Qshells for the connection, and use this subsystem to start a Qshell. See Running and viewing commands and shells using the Remote Shell view

The view that a connection is in, is called the Remote Systems view. It works much like Windows File Explorer: drill down by clicking on the “plus” (+) to gain access to desired items. For example, expand the *LIBL filter to see all the libraries in the library list, then expand a file to see all its members (much like option 12 in PDM).

Filters

Expanding a subsystem, results in a list of filters for that subsystem. Filters are names of lists of items that you can specify reuse and share. Filters “filter out” undesirable items. When creating filters, you can use generic values like in PDM and have as many filters as you want or need. Filters can be created for each subsystem, so you can have filters for IFS files, local files, objects etc.

Tips:
  • You can always drill down (PDM option 12) within a filter if the item is a container (a library and a file are examples of containers)
  • Unlike PDM, you can specify multiple levels of generic values, for example you could specify Library BOB, file QRPG* member A*, when you create your filter.
  • Pay close attention to the page where you specify the filter name. On this page you will be allowed to choose whether or not you want the filter to be only for the specified connection, or to appear in all connections. You will also be allowed to specify a profile, if you want to share your filters with others.

Since filters are names and stored with your connection, so unlike PDM where only the previous parameters for the WRKxxxPDM command are remembered, in RSE all filters are persisted between sessions.

Filter strings

When first created, a filter contains only one filter string. By modifying the properties of a filter, you can add additional filter strings. Filter strings provide the ability to generate more complex lists. For example, in PDM you can only list the members in one source physical file in a single library. By using multiple filter strings in a filter, you can list members in different files, and even in different libraries in a single named filter.

Tips:
  • Filters must contain the same types of items. For example, it is not possible to list objects and members in the same filter.
  • Group items into a filter by project or application. For example, add filter strings so that you can see the DDS members in the same list as your RPG and COBOL files.
  • See filtering members.

Remote Systems view

As previously mentioned, the Remote Systems view can be used to navigate and list objects you need to access to develop your applications. Drill down, or expand items to see their children. Right-click to gain access to actions available in a pop-up menu. Standard actions such as drag and drop, copy, paste, delete and rename are available through the popup menu (right-click). These options are quite powerful in comparison to PDM: You can use copy and paste or drag and drop to copy or move members and even objects from one IBM i to another (no more SAVOBJ and FTP!). The pop-up menu also contains many other actions that can be performed on items, and allows you to create additional actions of your own.

See User actions and Manipulating items.

Object Table view

The Remote Systems view can often feel awkward for the PDM user, so after you have created your connections and filters, you may find yourself more often in the Object Table view. The Object Table view is a more comfortable interface for PDM users. You can open the view directly by selecting the Object Table tab at the bottom of the Remote System Explorer Perspective, or by selecting the Show in Table View action item in the pop-up of the Remote Systems view. You can use the Work with menu to generate lists the same way as you would with the WRKxxxPDM commands. The Work with menu keeps a small list (10) of previously displayed lists in the Object Table view, which is also better than PDM. The command line appears at the bottom of the Object Table view, and allows you to enter commands, or parameters for actions, like in PDM.

Object Table view

You can modify which columns appear in the Object Table view. More customizable than F14 in PDM , you can choose to hide or show any individual column. You can type a character to bring up the Position To dialog. This dialog allows you to quickly scroll to your desired item.

Tips:
  • Click on column headings to sort by that column.
  • Use the Show in Table View to show filter contents in the Object Table view.
  • Collapse the command line for a clean screen and the ability to see more items.
  • Double-click on the Object Table tab, to maximize the view to the full workbench. You will then be able to see more items in one screen.
  • Use filters to generate complicated lists, use the Work with submenu to get access to infrequently used or simple lists.

Object Table View actions

Like the Remote Systems View, the Object Table View has actions that can be invoked on items in it. As in the Remote Systems View, access to the action is provided through a pop-up menu from clicking with the right mouse button. In the pop-up from the Object Table View, you will see a list of actions with their PDM option number to make the menu feel more familiar. Use the user action menu to create and add your own actions. User actions added either in the Table or Remote Systems View, appear in the User Actions menu in both views.

Object Table View pop-up menu

Tips:
  • Use the Show in Table action from inside the Object Table View to go from a list of libraries to a list of objects, etc. (PDM option 12)
  • Double-click a member to open it in Remote Systems LPEX Editor in edit mode.
  • Click on the item name to open an edit cell in the Table view directly to quickly rename an item. The Description column, and member type column are also edit enabled, and allows you to quickly change the values in those columns as well.
  • Access an objects properties (option 8 in PDM) by selecting the Properties menu item in the pop-up menu in the Object Table View or Remote Systems View.
  • See Managing objects in the Object Table View.

User actions

User actions (F16 in PDM) allow you to extend the Object Table View and the Remote Systems View with the action that you use. You can create your own action, where you will be able to prompt the command to run, and define how a command is executed.

Note: RSE has three command modes:
  1. Normal: RSE jobs run in batch, so even though the mode is normal (meaning in this case immediate), you still cannot run interactive commands like STRPDM
  2. Batch: Commands are submitted to a new batch job.
  3. Interactive: Commands are run interactively in a STRRSESVR job.
When creating actions, the same substitutions variables (for example, &L, &N) that are available in PDM are also available in RSE, in addition to several others. Use the Insert variable button to see the list of available variables. Actions are very customizable and you can:
  • Specify if the action should refresh the Remote Systems View or Object Table View after running
  • Specify whether or not the command should be called once for each selected object, or once for all the objects. This gives greater flexibility than PDM. For example, in RSE you could define a Save Object action, which would allow you to select several objects and when invoked, would generate a single command to save all of the selected objects to one save file.
  • Unlike PDM, actions can be refined so that they are only displayed for appropriate types. There are several types predefined, but user types can be easily added to the list. For example, this allows you to have action for only *PGM objects, or only RPGLE members.
  • Selective prompts can be used when defining the CL command to run for the action.

One of the advantages of RSE user actions is that they can be named, which makes them easier to use and remember than the two letters in PDM.

Command line

The Object Table View contains a command line.

Object Table View with Command Line

You can use the command line to run any command, or in the Object Table View, to specify additional parameters for PDM options. The results of any commands are displayed in the messages field. You can use familiar PDM keys:
  • F9 to retrieve the last command
  • F4 to prompt a command

The Show Log button can be used to view the Commands Log view.

Commands Log view

Command execution mode can also be selected.

Tips:

Compiling

Compile actions (PDM options 14 and 15) are grouped into two menus: With and without prompting. You can add your own compile commands to the compile menu. This is much the same as adding a user action.

Create a new compile command

Compile actions are different from other actions: The results of the command itself appear in the Commands Log, but for commands which support events files, errors generated by the compiler are displayed in the Error List view.

Tips:
  • Additional command execution preferences can be found in Window > Preferences > Remote Systems > IBM i > Command Execution preference page (similar to PDM F18)
  • Compile commands use the same defaults as the host
  • The compile actions remembers the last used compile command by member type
  • Add your own compile commands and specify the source types that they should apply to, or refine existing compile commands, by modifying the properties and the CL command parameters.
  • The default is to compile in batch, use the Command Execution preferences to specify additional SBMJOB parameters, or to switch to normal execution (note that this is technically not interactive, because, as previously mentioned, RSE jobs run in batch).
  • See Compiling your programs.

Searching

There is two ways to search (PDM option 25, FNDSTRPDM) in RSE:
  1. From the Search menu option (then selecting IBM i)
  2. From the Find String action in the Remote Systems View and Object Table View

RSE allows you to search filters, not just libraries, files and members. This means that you can search with very flexible search patterns. For example, you could search all the members in the file QRPGLESRC in library MYLIB and the members A* in the files PRJA* in library PROJECT by invoking the Find string action on the filter that contained those filter strings. This would not be possible as one single operation in PDM or using the FNDSTRPDM command.

Search dialog

Parameters for search are similar to FNDSTRPDM and uses the FNDSTRPDM command to generate the results.

Search results appear in the Remote Search view, and the view has a history of searches. In PDM, you see the search results and members one at a time in the order that the matches are found. In RSE, you see the list of all the search results in one place, allowing you to open whichever member you want first and using whichever match in the member you decide. The Remote Search view allows you to manage the resulting list, by letting you remove members and matches through the pop-up menu.

Remote Search view

Tips:

Remote Systems LPEX Editor

As previously mentioned, Remote Systems LPEX Editor can be quickly launched in edit mode from the Remote Systems View, Object Table View, and Remote Search view by double-clicking a member. However, you can also launch the editor by using the pop-up menu on a member to open (PDM option 2) or browse (PDM option 5).

The Remote Systems LPEX Editor is based on the base LPEX Editor, and contains IBM i specific functions.

The first thing you will notice that is different from SEU when you open the editor, the use of color in the source. This is called tokenization, and is the coloring of language tokens to make them easy to distinguish.

Editor with Outline view

You will also notice the prefix area, which contains the sequence numbers of the member. The prefix area in Remote Systems LPEX Editor, supports SEU commands (for example, CC, B, A, LL, etc.)

You will also note that for the DDS, RPG, COBOL, and CLP, CLLE languages, an Outline view appears. The Outline view displays the outline of your program and can be used to navigate within your program.

Tips:

Table 1. Remote Systems LPEX Editor versus SEU: A comparison of basics
SEU Remote Systems LPEX Editor
Full screen mode when browsing only (F13) Full screen mode for both edit and browse (double click the editor tab). However, many more lines are visible in Remote Systems LPEX Editor in full screen than in SEU.
Split screen and browse Split screen for edit and browse:
  • Drag and drop editor tabs to view more than on member at a time
  • Use editor view pop-up or Ctrl+2 to split the current editor view to work with different parts of the same member (up to 5 splits are allowed)
Date area: at the right, always enabled Date area appears next the sequence numbers. It is Off by default, but can be enabled through the preference, or the pop-up menu.
Print: STRSEU, Option 6 Printing is available from the File menu, or Ctrl+P

Editor view, split screen, and date area

Syntax checking, prompting and help

Like, SEU, Remote Systems LPEX Editor has automatic syntax checking. However, unlike SEU, all the syntax errors are immediately visible, not just the first one. As errors are embedded into the editor view, you don’t need to move to the bottom of the screen to scroll through errors. Remote Systems LPEX Editor, uses the latest language syntax to check syntax for DDS, RPG and COBOL. An active connection is required for syntax checking SQL, and CL. CL does cache syntax information, so syntax checking may be available when disconnected, if cached information exists.

Syntax check file showing syntax errors in source

Help (F1 both in SEU and Remote Systems LPEX Editor) is not just available for errors, but for source too. Context sensitive help links F1 with the reference manual so that you get help for exactly what you are editing. For example, F1 on an ILE RPG opcode, would bring up the help for that opcode, this type of help is simply unavailable from SEU. Reference manuals are also quickly accessible through the Source menu in Remote Systems LPEX Editor, requiring the need for print ones, to be minimized.

Help on opcode

As in SEU, F4 allows you to prompt when editing in Remote Systems LPEX Editor. For languages other than CL, the Prompt view will appear and allow you to modify your source. For CL, a modal window appears with your prompt. F1 context sensitive help is available from all prompts.

Source Prompter view

See Editing members.

Verifiers and Error List view

Syntax checking ensures that there are no errors on the line that you type, but Remote Systems LPEX Editor provides an additional check, called the Verifier. A verifier does the same syntax checking and semantic checking that the compiler does, without generating an object. This means that if you try to use an undeclared variable, the verifier will let you know.

The verifier function is available for COBOL, RPG and DDS from the Source menu, or by pressing Ctrl+Shift+V. Use the Source menu to verify with prompt and specify additional options.

Any errors detected by a verify will appear in the Error List View, exactly as those from a compile.

Error List view

The Error List View allows you to insert the errors into the editor view, by double-clicking. Use the F1 key to get help for errors, and use the view menu to filter errors that you don’t want to see (for example, perhaps you wish to ignore informational messages). The menu can also be used to dictate whether or not, and how error messages are inserted into the editor view.

To cleanup any inserted errors, from the editor, you can use Ctrl+F5 to Refresh. This will
  • Remove any syntax, verifier, or compile errors
  • Clear any excluded lines

Or you can use the Remove messages menu option from the Source menu.

The Error List View can also be used as a TODO list. As you modify lines, they are either marked with an ‘X’ to indicate that the line has been deleted, or with a checkmark, to indicate that an error has been addressed. Only another verify will ensure that the errors have truly been fixed.

Using the verifier allows advantages over SEU:
  • You can ensure a clean compile before actually compiling. This can be important for machines where compiling must only occur on off-peak times.
  • If you are working offline, you can ensure that you are working with source that will compile when you reconnect to your IBM i.
The Error List View (whether being used for compile results or verify) has several advantages as well:
  • There is no need to switch between a spooled file and the source, or have two emulators open, as both are visible simultaneously, and you can have all the errors inserted into the source.
  • When used as a TODO list, its easy to ensure that all errors are addressed in one shot. There is no need to fix an error, recompile, fix another and so on, until all errors are addressed.
  • When an error occurs in a /COPY member, and /INCLUDE member in RPG, or a Copy book in COBOL, double-clicking on the error opens that member quickly for you and inserts the errors, as with the primary source member.
  • F1 help for errors helps you figure out how to fix the error quickly without having to pull out a reference manual.
  • Using the preferences you can hide any messages you don’t want to look at (such as informational or warning messages), making it easier to ensure that you address important errors quickly.
  • See Verify and Error List View.

Content assist, templates and RPG wizards

While the only function to help you enter code in SEU is the prompter, Remote Systems LPEX Editor has several functions which will help you quickly enter code.

Content assist (Ctrl+Space) will propose, display and insert code completions at the cursor position. Based on the previously typed characters, or in the case of RPG, column position as well, invoking content assist will present you with possible valid completions to the code you have already entered. For example, this can be useful when you are unsure of the number of parameters required when calling a procedure, or even the parameter types.

Content assist

Templates can be used to generate frequently used blocks of code. They can be imported and exported, which means they can be shared. For example, if you have a standard header that must be added to each program, or a standard interface, you can define a template, and insert it by typing its name and then Ctrl+Space.

RPG templates on Preferences page

See Completing code with content assist and templates.

Tip: The content assist function and Outline view in RPG is driven by the information generated by a verify. This is what pulls in external information like procedures found in a /COPY member, or fields and records from a display file. It's important to refresh the Outline view at least once before invoking content assist, or only limited content assist will be available.

There are three RPG wizards that can help creating code quickly:
  • D Specification Wizard
  • Procedure Wizard
  • Java™ Method Call Wizard

These are extremely useful to the new programmer, and for the more experienced one, as they are for more complicated language elements and reduce the need to refer to reference manuals. They can be quickly accessed through the Source menu in the Editor view, and through the pop-up New menu. Simply specify all the information through a graphical interface.

RPG Definition Specification wizard

Code will be generated for you.

code generation from wizard

See Creating an RPG Definition Specification.

Additional Remote Systems LPEX Editor parser action and preferences

Additional preferences and actions are available for the IBM i languages:
  • Column Sensitive Editing: This function is useful for column sensitive languages like RPG and DDS. Normally in a windows application, inserting and deleting text will push the remaining text left or right, and for these languages results in a syntax error. Enabling column sensitive editing will limit insertion and deletion to the columns specified for the language.
  • Signatures: Available for RPG and DDS, enabling this feature will automatically flag each line with the specified signature. Note that modified lines in Remote Systems LPEX Editor have the date changed as in SEU, regardless of member type.
  • Automatic-uppercasing: Uppercases modified lines. Available for CL, DDS, RPG, COBOL members
  • Automatic-indent: Indents the cursor when enter is pressed on the following line to help pretty-print your source. Available for CL, RPGLE.
  • Automatic-formatting: Formats your source as you enter it, according to specified preferences. Available for CL and free-form SQLRPGLE.
  • Open/Browse /COPY member or Copy book: For RPG and COBOL languages, you can open or browse members referred in the source through the pop-up in the Editor menu.
  • Show block nesting: Using Ctrl+Shift+O, or from the Source menu in the pop-up menu, you can display an arrow indicating the nesting level at the cursor location.

    Block nesting

  • Show fields: When a file is referenced in a program, you can use this menu option from the pop-up menu to show the fields in the file in the Object Table View. Available in RPG, COBOL, and CL.
  • RPG actions:
    • Convert to free form (RPGLE)
    • Convert to ILE (RPG)
    • Show indentation (RPG, RPGLE)

All these features, which are not available in SEU, are designed to speed up and improve your editing experience.

Additional useful LPEX keys

In SEU, all functions are available through keystroke. In Remote Systems LPEX Editor, most function is available through menus and keystrokes as well. Here is a list of additional keys you might find useful in LPEX:
Table 2. LPEX keys
Key combination Description
Ctrl+Home Go to the top (like TOP in SEU)
Ctrl+End Go to the end (like BOTTOM is SEU)
Ctrl+L Go to line number (also entering line number in prefix area like SEU works)
Alt+S Split a line
Alt+J Join a line
Alt+L Select a line
Alt+R Select a rectangle
Ctrl+W Show all lines (useful when lines are filtered out)
Ctrl+Z Undo
Ctrl+Y Redo
Ctrl+S Save
Ctrl+M Match (selects matching brackets, and for languages like CL and RPG, control statements like DO/ENDDO, IF/ENDIF)
Ctrl+Shift+M Find match

Printing

Like most Windows applications, printing can be done through the File > Print menu option or by pressing Ctrl+P. The advantage over SEU is that this can be done while editing, and that printing in LPEX also tokenizes the printed source, so long as you select the Tokenized checkbox. Printing in Remote Systems LPEX Editor, prints to your Windows printer, not the IBM i printer. Print options can be found at Window > Preferences > LPEX Editor > Print.

Print preferences for the LPEX editor

The following substitution variables are available for use in the header and footer:
  • %p: page number
  • %n: source name, base file name, or document name
  • %f: full path file name or document name
  • %d: date
  • %t: time

Tips:

Find and replace in Remote Systems LPEX Editor

In Remote Systems LPEX Editor you can use Ctrl+F to bring up the Find function in LPEX. The search is more flexible than in SEU as you can specify regular expressions that allow you to search for a pattern. For example, if you specify this|that as the search string with the Regular expression check box selected, then the editor will search for lines with this or that on them. You can use Ctrl+N or Shift+F4 to find the next match.

Editor with Find and Replace dialog

Tips:

See Finding and replacing text.

Compare a file in the Remote Systems LPEX Editor

Comparing (PDM option 54) in Remote Systems LPEX Editor requires you to open a member in the editor. Once open, you can easily compare that member to another by selecting the Compare button in the toolbar or through the Edit > Compare > Compare file menu option.

Once the compare has been triggered, source appears merged with different lines flagged in color. Pink is the color used for the source being compared to, and yellow is the color for the opened source.

Unlike on the IBM i, where you have to flip between the spooled file and the source opened in SEU, comparing in Remote Systems LPEX Editor will allow you to continue to modify the member that was opened originally. Use Ctrl+Shift+N to navigate to the next mismatch and Ctrl+Shift+P for the previous mismatch. If you do modify source, you can use Ctrl+Shift+R to refresh the compare and finally Edit > Compare > Clear to end. During a compare session, the pop-up menu displays a Compare submenu where you can control the current compare settings being used.

Session comparing files

Tips:

Compile from the Remote Systems LPEX Editor

When you have source open in Remote Systems LPEX Editor, it's not convenient to go to the Remote Systems View or Object Table View to issue a compile. Instead you can use one of the following:
  • Toolbar button (uses the last used compile command for the member type to compile without prompt)
  • Ctrl+Shift+C (uses the last used compile command for the member type to compile without prompt)
  • Compile menu (where you can choose to compile with and without prompts, and select whichever compile command you want for the item) If you have not saved prior to compiling, you will be prompted to do so.

See Compiling.


Feedback