IBM i > DEVELOPER > WEBSPHERE

If Only RDi Could...


We often hear comments that start out with “if only RDi could…” that typically refer to something the commenter can do using the green-screen development tools. Sometimes it’s from folks who like Rational Developer for IBM i as much as we do and have a few things they still feel they can do better with the green-screen tools. Sometimes it’s from folks who seem to be looking for an excuse to keep using the old tools because they feel they just couldn’t be as productive without that feature.

Our responses to these comments range from “yes, that would be great” to “it already does that, and here’s how.” A surprising number of times we find that it’s some feature of PDM or SEU that we didn’t even know existed—despite both of us having used them for years before the graphical tools became available. Many times we respond by asking the person more about how they use that feature in context, because we can often offer suggestions of alternative ways to accomplish the same task using RDi features.

This month we thought we’d share a few of our answers, particularly those that many RDi users don’t seem to know about. Who knows, maybe we’ll address one of your own “if only...” scenarios.

Finding Things in Long Lists

The Remote Systems view in RDi is patterned after PDM, the green-screen tool that provides lists of libraries, objects or members. Most RDi users surely know that they can see similar lists in the Remote Systems view and that they can create their own named filters to subset the lists of libraries, objects or members to fit their needs.

Using either method, some still struggle with finding things in those lists quickly. PDM has “Position to” and “Position to type” entry fields at the top of the lists to help with that. In RDi, we use a couple of different features to replace the PDM “position to” options.

Let’s say you’re looking for a physical file in a library. In PDM, you might key in the first few letters of name and then key in *FILE for type to be positioned in the list at or at least near the file you’re looking for.

Using Remote Systems, we would first right-click on the library name and choose “Expand to” and then select the object type we’re interested in. It allows us to expand to “All Files,” which is similar to what *FILE did for us in PDM. But we also have option of expanding to a specific type of file, such as Data Files—much more helpful in this case—or Source Files, which is another very useful option. There aren’t nearly as many different object types available in “Expand to” as there are in PDM, but remember that RDi is really “just” a development tool, so the options are those that developers are most likely to need—such as Programs and Service Programs, Modules, Data Queues and Data Areas, along with many different types of files, such as Message Files and Save Files.

One significant difference with Remote Systems’ “Expand to” feature is that it actually filters the list to only the object types you’ve asked for rather than simply positioning the list. So don’t forget when you’ve finished working with that list to go back to “Expand to” and specify “All,” which is the last option in the list. Since it’s actually a filtering of the list, it’s a bit closer to using filtering in PDM—either on the WRKOBJPDM command or by using the F17=Subset feature in PDM.

Even after filtering down to the specific type, such as Data Files, there may still be a long list. Or perhaps you just don’t want or need to do the type filter (e.g., the library only contains files); you just want to search for the name. In that case, we find the fastest way to position to a name in a list is to simply begin to key the name. That positions you to an item in the list of that name. Just don’t pause for too long when keying the name or RDi will think you’re trying to position to a new name.

Getting More Information About Items in a List

For those looking for a more PDM-like experience with lists, there is always the “Show in Table” feature. We don’t use this frequently because the filtering and positioning options we already mentioned work for us most of the time, but some RDi users find these tables very helpful. They do offer more information about the objects or members in the list than is shown in Remote Systems by default.

Right-click on a library or a source file or a filter name and choose the “Show in Table” option. That will populate an Object Table view (typically placed in the same area where your Error List is). Open the Object table to full screen to see a list far more reminiscent of PDM, including the Text. (By the way, if you want to see Text in the regular Remote Systems view, take a look at the free iSphere plug-in that we discussed in “A Closer Look at iSphere,” with installation hints here in our blog.)

You can add more columns to the Object Table using the View Menu (little triangle near the top right of the view) and choosing “Show Columns > All.” One feature of this view that isn’t available in PDM is that you can click on any column to sort the list by that column. If there’s a source file in your Object Table list, double-click on it to view its members in a similar list. As before, you may choose to show additional columns of information for members as well. The back and forward arrows (near the View Menu) allow you to go back to earlier lists. Double-clicking on a member in the list will open it in the editor.

To position to items in an Object Table, as in the Remote Systems view, you may just begin keying the name and a “Position to” dialog box appears which, in the case of an object list (versus a member or library list), includes an entry box for the object type. You can even press F17 (or use the Subset option from the View menu) to subset the list by things such as Name, Type and Text. How very PDM of it!

PDM Options in RDi

If you really long for those numbered PDM options, you can right-click on an object, member or library name in the Object Table and you’ll see a PDM Options selection—complete with their old PDM numbers next to them. Of course, most of those options are already available directly in the context (right-click) menu anyway, but if you’re struggling with figuring out how to do something that you used a PDM option for in the past, that may help.

If you have some favorite PDM options that begin with letters rather than numbers, these are classified as user-defined PDM options (even though, ironically, some of them were provided by IBM). You can bring those into RDi as well—at least the ones that make sense in that environment. Any PDM options you have that result in using a green-screen display aren’t feasible to use in the graphical environment—and most of the IBM-supplied options fit into this category.

But if you’ve created some PDM options that simply run a CL command that doesn’t require a display screen, you can easily copy/paste those options into what RDi calls User Actions. Simply right-click on an object or member and choose User Actions > Work with User Actions. Then choose to create either a New Object action or a New Member action, depending on what type of list item you want to enable the user action to work with. Then give your Action a name and paste the command from your PDM User Defined option—complete with all the special substitution variables that may be included. You can specify several other details about your user action as well. When it’s done, you can right-click on the appropriate type of item in Remote Systems or in an Object Table and choose User Actions and then select your user action in the list.

If you have a more generic action such that it doesn’t really matter whether you’ve right-clicked on a member or an object, then you’ll need to create two identical User Actions—a Member action and an Object action. We use a generic User Action to replace our library lists to switch from one environment to another. It provides an easy way to call the CL program that does all the work for us.

Help With External Descriptions

Want to get a list of fields/columns in a file/table? Well, if the file is declared in your RPGLE program, you can see them in the Outline View. But what if the file isn’t in your Outline or perhaps the old-style six-character names are just not quite enough for you to find what you’re looking for?

This brings us back to the “Show in Table” option we used earlier to create our Object Table. This time, right-click on a file object and choose “Show in Table > Fields.” Another view called the Field Table will appear, probably near where your Object Table was before. This time it contains field names, types, lengths, text and alias.

Putting It All Together

So let’s put some of our suggestions into practice in an example. Perhaps you need to see the details (including text) of field definitions in an external data file called EMPMAST. Let’s make the bold assumption that the library for that file is already in your library list in Remote Systems—because if it weren’t, you’d probably have problems with things like your Outline view not populating properly. Here’s how we would do that:

  1. Using your Library List filter or another filter that you may have that contains the library where the file is located, locate and expand the library.
  2. Right-click on the library name and select Expand to > Data Files. (If this library only contains data files or is a relatively small library, this step may not be necessary.)
  3. Begin keying some or all of the name: EMPMAST. You should then be positioned at or near the file you want.
  4. Right-click and select Show in Table > Fields.
  5. If needed to see all the information, double-click on the Field Table view to put it into full screen mode. There you have all the details you might need about the fields in that file.
  6. At some point, remember to right-click on the library again and select Expand to > All.

Hopefully we’ve helped you find a few ways to re-map your PDM-experienced brain to work more effectively with RDi in the future.

Jon Paris is a technical editor with IBM Systems Magazine and co-owner of Partner400.

Susan Gantner is a technical editor with IBM Systems Magazine and co-owner of Partner400.



Like what you just read? To receive technical tips and articles directly in your inbox twice per month, sign up for the EXTRA e-newsletter here.


comments powered by Disqus

Advertisement

Advertisement

2018 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Getting Started With RDP 8, Part 2

Obtaining and installing the new Rational Developer for Power

Getting Started With RDP 8, Part 1

Obtaining and installing the new Rational Developer for Power

Less Talk, More Action

Rich UI enhancements put the B in RBD 8, Part 2

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters
not mf or hp