You are currently on IBM Systems Media’s archival website. Click here to view our new website.

IBM i > DEVELOPER > RPG

RDi: New Developments with Developer Tools


Recently, IBM released Fix Pack 3 for RDi V9.5. Based on past experience, we initially assumed that it contained mostly bug fixes; we didn't rush to install it. Then we noticed folks on the WDSC-L mailing list at midrange.com (a great place to get advice on RDi, by the way) were commenting on new RDi features. We decided to take a closer look.

Turns out RDi development took a step in a rather interesting direction. They added access from within RDi to some features from the Access Client Solutions (ACS) tool set. For readers who haven’t looked at ACS tools, the tool set is a replacement for the older IBM i Access for Windows tools many of us used for a long time. There are many reasons to switch to ACS and this integration with RDi is just one. We’ll have more on that soon. We can only speculate that the RDi and the ACS development teams reporting through the same management structure in IBM are responsible for this marriage of functionality. Whatever the reason, we say “Hurray!” This is especially good news for embedded SQL users.

The two ACS tools integrated with V9.5.0.3 of RDi are “Run SQL Scripts" and "Printer Output". We’ll talk more about each of those features and some other enhancements in this fix pack below. One might have expected the 5250 feature of ACS to be included, but the RDi team had already added a fully integrated 5250 emulator to the tool set with the initial V9.5 release. Consequently it wouldn't have made a lot of sense to reinvent that wheel.

Run SQL Scripts

For us, the most exciting news is the integration of Run SQL Scripts. You access it by selecting "Launch Run SQL Scripts" from the Source menu. Any text currently highlighted in the source is automatically copied into the Run SQL Scripts window for you. So if you highlight your SQL code before invoking the function, you can avoid retyping or copy/paste. Since most of the SQL code embedded within RPG programs makes use of host variables, it’s necessary to edit the code to replace those before you can actually run it in Run SQL Scripts. Likewise, you’ll need to manually put the host variables back in if you make changes and want to copy and paste your new SQL into your program.

Those who haven’t tried Run SQL Scripts in ACS have a pleasant surprise in store when you use this new tool: your SQL is now color-coded—much like one expected of your code in the RDi editor. Now it’s easier to spot your syntax errors than with the old monochrome look!

We hear that Visual Explain will also be added to the ACS tooling. For us, that’s the last piece of the puzzle we need to dump the old IBM i Access. Since we can run ACS natively on our Macs, it will be a huge improvement. (Now if only IBM would let us run RDi natively on Mac.)

One oddity of the current support is that the menu option only appears for SQL RPG source members. Why it doesn't work for SQL COBOL members or SQL type source members is not clear. Hopefully it’s a short-term issue. After all, it doesn’t appear to be a problem with the editor only knowing how to parse SQL within RPG code because highlighted code seems to be copied blindly into the script widow, even if it is not valid SQL.

Printer Output

The Printer Output window activates by selecting "Launch Printer Output" from the Spooled Files subsystem in the Remote Systems Explorer (RSE) view. Note: it’s only available from the main Spooled Files entry; not from any spool filters that may be present, not even the predefined "My spooled files" entry. The ACS spool list is somewhat vanilla with few new options beyond the ability to sort the columns, but it does make it simpler to download groups of spool files compared to the native RDi Spooled Files subsystem.

More new/improved features

Another of our favorite features in this new fix pack is an extension to an existing feature—namely Show Block Nesting. Previously if you attempted to invoke this feature (via the context menu or shortcut Ctrl+Shift+O) and your cursor was not on a statement that represents the beginning or end of a block (e.g. If, Select, BegSR, EndIf, EndSL, EndSR, etc.) the request failed with the “Matching statement not found” message.

Now if you’re not on a begin or end statement, it displays block nesting for the entire current subroutine or procedure. In addition, it also helpfully shows the name of that routine in the editor message line, so you know exactly where you are in the universe. If you’re not in a subroutine or subprocedure, the old message behavior occurs. We’re thinking of opening an RFE (Request for Enhancement) to ask IBM to change this⎯as soon as we decide what we think the reasonable behavior should be in that case. (More on the RFE process below.) You can get more details (and a picture) on how this feature works on IBM's site. Note that Else statements within IF blocks are called out. This feature was added a while back⎯not with this latest fix pack⎯but many people seem to have missed it.

Another improvement for embedded SQL users comes with help support. The use of F1 on an embedded SQL statement now launches the DB2 for i SQL reference manual and positions to the SQL Statements page. Previously you just got help for a free-format RPG source line. The documentation for this fix pack indicates that this is just the first step in providing better help support for embedded SQL, so we’ll be on the lookout for even better support.

Another new feature that many of you may find useful is that UIM source is now color-coded. It’s a small but good thing, which comes directly from an RFE from an RDi user. The same applies to the Show Block Nesting support mentioned above and other improvements we haven’t covered here (see below for a link to the full list). It’s proof that the RDi crew listens! So, as we have preached before, tell IBM what new/improved features in RDi are important to you. You can not only add your own ideas for enhancements but more importantly, you can add your votes to existing suggestions out there to help IBM prioritize the requests. Read more about the RFE process and the important role you play in it here. For those who haven’t looked at RDi RFEs lately, note that the article points to changes made to the positioning of and/or searching for RFEs specifically for the RDi product.

Find a full list of new features and fixes here. We only covered ones that struck us as interesting. See what other new features or fixes catch your eye.

Several of the items are actually bug fixes. For us, the only one in that category that had been bugging us (pun intended) was that “filter selection” required a second click to show the results. We’re happy to see that one fixed since it’s a feature we frequently use.

While studying that list, you’ll see that some of the items are responses to RFEs. If you’re interested in seeing the details of the original RFE, search for them on the RFE page, and use the “Search by IDs” tab under the higher level “Search” tab. You’ll need to remove the letters in front of the RFE ID number, e.g., for RFE77454, search for 77454 under “Search by IDs.”

Looking forward to even more

Before we go, a quick shout-out to the RDi and ACS development teams. As you can tell, we love what you're doing, especially with this latest integration effort. Now that the RDi team is truly part of the Rochester team, we look forward to even more great things in the future. We would love to see you work even more closely together, concentrating your resources to do those things that only IBM can do.

For example, the Run SQL Scripts support would rock even more if, when used from the editor, it accepted host variables and allowed us to supply a value for that variable when running the script.

Perhaps we can predict your response already ... submit an RFE!

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.



Advertisement

Advertisement

2019 Solutions Edition

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

New and Improved XML-INTO

Namespace support makes the opcode a viable option

Authenticating on the Web

The finer points of OpenRPGUI, Part 1

The Microphone is Open

Add your voice: Should IBM i include open-source RPG tools?

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