Guru: RDi 9.6, Part 11 – New Features for Experienced RDi Users
September 20, 2021 Susan Gantner
Just when you thought my multi-part series on V9.6 of RDi was surely finished, it’s back! It seems like the song that never ends. Happily, though, since more new features have been added to RDi, many of which are the direct result of RFEs (a.k.a. Requests for Enhancement) from RDi users like you and me.
We’ve waited longer than usual for release 9.6.0.11, but it’s available now. I’ll cover the enhancements in this release in a couple of tips. This first tip will target mostly experienced RDi users. The next one will focus on some of the enhancements to ease the transition for the “new-to-RDi” users out there.
Of course, perhaps the most important feature in this release is the support for new RPG language features. I rarely even mention the fact that RDi supports the latest in RPG because there has always been little, if any, lag between new RPG features becoming available and their support in RDi. This year has been a bit different in that respect because we didn’t get a new release of RDi at the same time as the RPG update back in April. So if you have tried your hand at using %Split or %Upper or %Lower, you had to put up with annoying syntax error reporting, although, of course, your code would still compile. With 9.6.0.11, you can use not only the enhancements from spring but also more recent RPG enhancements from the September announcement.
Lock or No Lock?
After you install 9.6.0.11, the first change you’re likely to notice is the new icon on the member tabs in the editor to show whether a member is locked. In an earlier release of 9.6, a new icon was used for members open for browse. However, even if a member is open for edit, there are occasions when there may not be a current lock on that member. For example, the connection may have been lost to the host server job since the member was opened or the member was left open when closing RDi. Now the tab icon will make it clear whether or not RDi has a lock on a file. Figure 1 shows an example of three different styles of tab icons — a member open for edit but not currently locked, one open for browse, and one open for edit with a current lock.
In addition to the new lock icon, a new preference has been added to enable “Lock remote members on startup.” This one is not set on by default. You can find it on the Remote Systems LPEX Editor preference page. (Filter for “lock” in the preferences dialog to find it quickly). With the preference set, RDi will always try to get a lock on any members already open in the editor when starting up RDi. It also works if you’ve simply lost the host connection and subsequently re-connect.
Outline: Better Than Ever
If you’ve followed my RDi tips in the past, you know I’m a fan of RDI’s Outline view, particularly when editing RPGLE members. A couple of enhancements have been made there.
First, the cross-reference information for files and record formats now shows more than just the line where the reference is. There is now an indication of the operation on that line, such as READ, OPEN, %EOF, EXFMT, etc.
Also in Outline, exported procedures (i.e., those with the EXPORT keyword) show a slightly different icon to distinguish them from internal procedures.
Figure 2 illustrates some of these Outline enhancements.
The last, and perhaps most significant Outline enhancement, especially for CL coders, is that the CL Outline is now actually useful!
Before this release, the info in Outline for CL code was sparse, to put it politely! Now, a CL program’s outline contains many of the features we rely on with RPG code. Parameters and other variables are not only listed with their definitions, there’s also a live cross-reference identifying the lines of code where the item is used with an indication of whether its value is modified, just like in the RPG Outline.
Since the data collected from the Outline is used to support some nice RPG editor features such as hover help and code navigation, I’ve got my fingers crossed that we may someday see some of those features in the CL editor as well. They aren’t there yet, but these Outline enhancements are a boon to CL coders in the meantime.
There is a preference that must be set in order to see the enhanced CL outline. I believe it is set on by default, but just in case you don’t see these new features, filter your preferences dialog to look for “outline” and click on the page IBM i Parser > CL. Make sure you have selected “Update the Outline view when text is changed in the editor”. After setting that preference, you may also need to refresh your Outline to find the new treasure trove that is the new CL Outline. Figure 3 shows some of these features for CL, with the button to refresh the Outline after turning on the preference highlighted.
As if that weren’t enough good news for CL coders, the performance of CL prompting has also been enhanced. While in my experience, anyway, it’s still not “green screen prompt” speed but noticeably faster than in earlier releases.
RPG Copy Members
Going back to RPG enhancements, some long-requested features have been added to improve the ability to see and/or edit code from /Copy and /Include files. You are hopefully familiar with the yellow hover text that appears when you hover the name of a variable or procedure, etc. It contains the name and definition and a link to navigate to the definition of that item. Now, we have very similar support when hovering over a copy/include statement. The contents of the member (or IFS file) will appear in the already familiar yellow box! The name of and a link to the copy file location is also included so that you can open the member for edit. Or, if you know you want to open the member, simply hold down the Ctl key (command on a Mac) and the copy statement itself becomes a link to open the member. These new options make browsing or editing code from a copy member a bit easier than the old method of using the context menu, although that still exists if you prefer it. Figure 4 illustrates the effect of hovering over a /copy statement.
Similarly, if the prototype for a procedure was defined in a copy member, the yellow hover box that appears when hovering over the procedure call itself has been enhanced to include the location and a link to open the copy/include member in addition to the procedure definition information that was there before.
RPG Refactoring
The refactoring option to Extract Constant also has some new features. First, you can now add a comment to be included on the line preceding the definition of the constant. Second, you can now refactor numeric constants — a feature that many of us have been waiting for ever since the original ability to refactor character constants was introduced!
Saving Search Results
Have you ever done a Remote Search (a.k.a. Find String. . .) in RDi and thought “I wish I could print or save the results of this search?” (Some of you may have the iSphere plug-in installed and if so you already have this option.) Now in the context menu in Remote Search (i.e., right click) you’ll find new options to either Print, Export to file, or Copy Results to your clipboard. If you’re like me, you may be tempted to look for this feature from the view menu of the Remote Search view, since that’s where the similar options appear in Object Table. The clipboard option has also been added to the print and export options previously available for Object Table.
More to Come. . .
There are more new/changed features in release 9.6.0.11 that I’ll cover next time. Those features are targeted primarily toward new RDi users to provide a smoother, faster startup experience. But you never know — some of us experienced RDi users may also find them useful.
RELATED STORIES
Guru: RDi V9.6, Part 10 – Debugger Enhancements
Guru: RDi V9.6, Part 9 – RDi Helps with Refactoring Code into Procedures
Guru: RDi V9.6, Part 8 – Better Ways To Copy Members, Manage LIBLs, and Find Preferences
Guru: RDi V9.6 Part 7 – Zoom in, Know Where You Are, Refactor Constants and More
Guru: RDi V9.6, Part 6 – The New Object Table Gets Even Better
Guru: Ready Or Not! Part 5 Of Big Changes In RDi V9.6, Edit/Browse Toggle, PDM Perspective, More