Guru: RDi V9.6, Part 8 – Better Ways To Copy Members, Manage LIBLs, and Find Preferences
May 18, 2020 Susan Gantner
If my crystal ball had told me just how many RDi V9.6 fix packs there would be and, more importantly, how many great new features would be added, I might have thought differently about starting a numbered series! Looks like I may well make it into double digits. But I’m not complaining. RDi has always been a great tool, and the pace of significant new functionality added since late 2017, when V9.6 first appeared, has reached new heights.
This tip covers some of the features added in V22.214.171.124. Yes, I still have some catching up to do since 126.96.36.199 recently hit the streets. If you haven’t updated your copy of RDi recently, it’s a good time to do it and experience the new features available to you. Perhaps the most significant feature in V188.8.131.52 — refactoring RPG logic into procedures — I’ll cover in a later tip. In this tip, I want to describe some of the smaller, perhaps more easily overlooked, goodies. None of these are doing things we couldn’t do in RDi before, but all of them provide better ways of doing them.
Copying Source Members
If you’re thinking you’ve already read about the streamlined method for copying multiple members using the PDM style option 3 in the Object Table, you’re right. I covered that back in January as one of my favorite enhancements. However, I included a warning at that time — you need to carefully review the target location because it defaults to the location of your most recent copy. I had copied things to the wrong place quite a few times before I realized that originally it looked a lot look a lot like the old PDM option 3, but the default target location was very different.
But that warning is now just so V184.108.40.206! With V220.127.116.11, some small changes to the dialog and to the default behavior have resulted in some big improvements. You can see the new dialog in Figure 1, followed by a discussion of the changes.
Here’s what’s different. First, the target location is clearly labeled. More significantly, the default behavior now mimics PDM’s (more on this later) as much as is feasible, i.e., it defaults to the current location of the members (mostly). The members being copied in Figure 1 were selected from a list of members in the file identified in the dialog. In 18.104.22.168, it would have shown whatever source file and library I had used previously as a target. For those occasions where you’re doing several separate copy actions to the same location, you can still get the old behavior by selecting the box to “Recall previous target” so that you don’t need to re-type the location.
I mentioned that the default target location will be the members’ current location, as was true with PDM. But of course RDi’s Object Table is far more flexible than PDM’s lists, which could only contain members from one source file at a time. So if you’re working with a more complex lists of members perhaps containing entries from multiple files and/or libraries, you need to be aware that it still only suggests one target source file and library.
Manage Library Lists
There has always been confusion about managing library lists in RDi. This relates to both setting up the default library list for your RDi connection and changing your library list on the fly. Both were, of course, always doable, but it was an area that generated many questions, especially from new RDi users. Now we have a new Library List view to help make both kinds of library list management a little easier.
First, you will probably need to open the new view. Do this the same way you can open any view — using the Window menu option Show View. Library list is not likely appear on the first list of views, so select Other . . . . Then, in the search box at the top of the resulting dialog key the name of the view you want to open — Library List, in this case. By the time you enter three or four letters, you will likely see the Library List view. You can either press Enter or OK to open it, or double click on Library list entry. That will add the new view to your perspective, most likely under your editor window where Error List view lives. It will look something like the one in Figure 2.
Here you can see the current library list for your connection. If you use multiple connections, you can choose the connection from the dropdown box. Note that this contains all the libraries in your RDi job’s library list, not just the user libraries. In other words, it reflects what you would get in a green-screen job from DSPLIBL vs EDTLIBL. And it’s the same list you can also see from the Library List filter in Remote Systems.
Of course, you can’t change the contents of the system portion of your list. But you can change your current library, add more user libraries to the list, and move a user library up or down in the list. All of these actions can still be done from the filter in Remote Systems and I’m still using this older method to make my own library list changes. But for those who have trouble managing their library lists — or for those who may have started using Object Table for more interactions and don’t use Remote Systems any more — this new view provides another approach.
Note that the changes you make using this dialog apply only to the currently connected session/job — not to your default RDi library list. However, you may have noticed the settings icon next to the connection name. This is a quick way to get to the dialogs that will let you change your default RDi library list. You may need to click on “Subsystems” in the left pane to see the dialog where you can make changes to your default library list. I wrote about using this dialog in an earlier tip. It was so long ago, the product was called WDSC! The dialog has changed a bit since then but the basics are still the same if you’re having trouble understanding it.
By the way, while you’re looking at the preferences for subsystems that I mentioned above, you may be interested to note that in addition to the “Objects” tab where you can adjust your default library list, you also have a “Commands” tab. This is where you can set your defaults for things like where compiled objects go, replace yes or no, job description for batch jobs and more — much like PDM’s F18 screen. This is another RDi control feature that can be tough to find sometimes.
Where Is That RDi Preference?
It’s great that RDi and the underlying Eclipse tool have so many options that you can customize. It’s great, that is, until you have to try to locate the preference that you want to change! Then the sheer volume of preferences is often overwhelming. Using the search box at the top of the Preferences page can sometimes help. However, prior to 22.214.171.124, there were many preferences that the search mechanism never seemed to find for me.
The most common one I always had trouble finding was the “Compile in batch” option — I normally suggest that people switch their compiles away from batch for simplicity. But I could never remember how to tell someone to find that preference page. Searching for “compile” or “batch” never found it because the words “compile” and “batch” only appear in the right-hand pane of the Preferences page and those words weren’t in the search index.
Now that the preference search index includes both sides of the Preferences dialog, I can search for “batch” or “compile” and it’s not hard at all to find “Command Execution” page under IBM i which contains the box to turn off (or on) compile in batch. Of course, that’s just one example of a preference that will be much easier locate from now on. If you’ve given up on searching for preferences in the past because it was too hard to find anything, give it another try.
In my next tip in this seemingly never-ending V9.6 series, I’ll cover a powerful new refactoring option that takes an existing block of logic and turns it into a procedure.
Susan Gantner, an IBM Champion and co-author of the popular Redbook, Who Knew You Could Do That with RPG IV, is one of the top speakers/writers/trainers on IBM i development topics. She is a partner at Partner400 and System i Developer, and she hosts the RPG & DB2 Summit twice per year with partners Jon Paris and Paul Tuohy.