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

IBM i > DEVELOPER > RPG

Fun Times for RDi Users With V9.5 Enhancements


RDi fans have some new goodies to play with. Version 9.5 of Rational Developer for i is now available. It does require a re-install—not just an update. But for us, at least, that proved not to be too painful a process. So, let’s talk about what’s new in RDi V9.5.

Format Free Form

To us, the most significant new feature is the capability to format (or more accurately re-format) your free-form logic. What we’re talking about here is the matter of indentation of the code.

Let’s say, for example, you have a FOR or DOx loop that has a SELECT/WHEN block nested inside it and an IF/ELSE block nested inside that. Now you need to add another level of nesting with another IF/ELSE block that falls between the FOR/DOx and the SELECT block. One of the benefits of free-form logic is the capability to indent code to show the levels of nesting. This makes it easier for the next programmer coming along to follow the logic. Needless to say, this makes it critical that the indentation is accurate!

Even if we make the bold assumption that the original code was indented properly to begin with (sadly in our experience, this is often not the case), introducing a new level in the middle requires shifting a bunch of code around to get the indentation to correctly reflect the nesting levels. There are various ways to do this manually, of course, but it was often not done properly or at best was time-consuming to do and tended to be somewhat error-prone.

That’s why prior to V9.5, we were thrilled to find a plug-in that’s part of Linoma Software’s RPG Toolbox that reformats (re-indents) blocks of free-form code. We found it very useful—not only when we had to introduce new levels of nesting into the logic but even more so when we bump into code that the previous developer apparently couldn’t be bothered to indent properly to begin with. It’s also nice when initially writing some nested logic to not have to worry too much about indentation until the end, when you can ask the plug-in to indent it all for you.

So for us, this latest support is another option. We haven’t yet worked enough with IBM’s new RDi format option yet to determine which we prefer, but of course it’s great that those who don’t have access to the RPG Toolbox plug-in have this option available.

Of course, we’ll still want a tool to convert from fixed form to free form, such as the ones from Linoma Software, ARCAD Software or Craig Rutledge. The new formatter only works on code that is already in free format—including file and data declarations, etc.

The built-in formatter for RDi V9.5 can be used on a specific block of code or, if no block is selected, the entire member is formatted. The Crtl+Shift+F keyboard shortcut will invoke it or you can use menu options—either under the Source menu or via the right-click context menu under Source.

You do have a few options on how the formatting is done. These are controlled via preferences on a new Formatter preference page under ILE RPG parser preferences. There are options for how many spaces to indent and an option for whether or not you want WHEN/OTHER statements within a SELECT block indented. Take a look at the preference page to find a few others, including one about starting and end columns for the formatted code—a topic we’ll touch on a little later.

5250 Emulator

Nice as it is, the RPG formatter is not the only new toy. Another often-requested feature is there—a built-in 5250 emulator can now appear right inside your editor window. You can start this by right-clicking on either a connection name or the Objects subsystem and choose Host Connection Emulator. There are a few options that can be customized for the emulator but they aren’t controlled via the usual preferences. Instead, look for the “Host Properties” tab at the bottom of the emulator window. But don’t go looking for font and color controls there; they apparently aren’t available. Maybe someday.

We’ve never been huge fans of the idea of having a green screen in our RDi editor window. We prefer to hot key over to a separate emulation session when we need one rather than have an extra tab taking up space among our source tabs. If the session in that editor were fully integrated with the Remote Systems View somehow—such that we could right-click on a program with a display file and run it automatically in that emulator session, for example—that might be more interesting. But this one doesn’t currently do that.

New Open a Member Shortcut

One fairly small detail that may well go unnoticed is a nice usability feature. We’ve long had the capability to bring up an “Open a member” dialog for those occasions when we don’t want to go digging around in member lists to find the one to open. The shortcut for that was previously Ctrl+Shift+A. Somewhere around V8.5, that shortcut started to conflict with the Eclipse shortcut to Open a Plug-in Artifact (whatever one of those is). It wasn’t difficult to customize your workspace to do away with the conflict, but it was a little tedious and non-intuitive. As a result, many people never took the time to find out how to make the change and so missed out on making that shortcut work effectively. In V9.5, IBM created a new shortcut for “Open a member” which doesn’t conflict with anything else—Ctrl+Alt+Q. The old shortcut still works as it did before but for anyone who hasn’t already “fixed” it, Ctrl+Alt+Q is a much nicer option.

Split Line Flexibility

Another nice small feature shows up as a new option on the ILE RPG parser preference page. Before, the default Alt+S shortcut in the editor would split the line and put the right-hand end of the code on the next line—all the way to the left—causing the editor to immediately show a variety of error messages. Consequently, the code on the second line typically had to be shifted over a long way to get it where it made sense. There is now an option to change that behavior so that the code on the second line now starts in the column where it was before. This will still require some shifting of code but at least it doesn’t produce a syntax error right off the bat!

Drag and Drop Filters

The new release also offers the capability to more easily rearrange filters in the Remote Systems view. If you use a lot of filters, you have probably either learned to live with the sequence they appeared in or else you perhaps went through what can be a fairly laborious exercise to move a filter up or down in the list, one position at a time. If you only had a few filters to rearrange, it wasn’t so bad. On the other hand, if you only have a few filters you probably don’t care much what sequence they are in! With V9.5, you may now simply drag and drop filters to the location you want relative to the others.

Removal of 80-Column Restriction

Perhaps the most confusing new feature at the time of the V9.5 announcement was the removal of the 80-column restriction for RPG code. The editor now also supports RPG code that begins in column 1 and perhaps goes beyond column 80. Of course, at the time, we didn’t know about an RPG compiler that would accept RPG that is coded that way. This week, however, we now have the announcement of a future RPG compiler that will support that expanded code that RDi will let us enter.

More Little Goodies

A couple of features that were introduced in the last few releases were also improved. The Push-to-client feature can now handle Snippets and the Code Coverage tool’s analysis has been the beneficiary of a dramatic performance improvement.

We’re looking forward to exploring more about V9.5 as time goes on. There are often little goodies that don’t make the official announcement so as we discover these we’ll cover them in our blog.

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