Bookmark and Share

Recent Posts

Is There Anything RPG in IBM i 7.3?

April 13, 2016

Surprise! The IBM i 7.3 announcement may seem to have arrived a little earlier than expected. The interval between 7.1 and 7.2 was four years so you may not have been expecting a new release just yet. But it was announced on Tuesday and will be available on Friday.

So for you RPG developers out there, the question is: What’s in 7.3 for me?

Of course, enhancements in the OS and certainly in the database affect us as developers, so for details on those, check out the blogs from Steve Will and Dawn May.

There is also a lot about open-source tools and languages in the 7.3 announcement and as developers on IBM i, those will certainly have some impact on us. Want to use Git for source control, even for your RPG code? Apparently you can with 7.3, as long as you don’t mind storing your code in the IFS rather than traditional source members. For more details on what happened with open source in this announcement, check out Tim Rowe’s blog.

But what about RPG, our bread and butter? Anything new there for 7.3?

Much of the publicity surrounding RPG in 7.3 will focus on things that were actually announced and delivered before 7.3, including free-format declarations and the removal of the 80-column source length restriction. So if you find yourself thinking “haven’t I heard this before?” you’re absolutely right. IBM's take is that because the free format RPG news broke between major release announcements, a whole lot of people missed it. So they are taking advantage of the fact that people pay more attention at major announcement time to highlight these features.

That is not to say that there are no new RPG features in 7.3, but they are relatively minor compared with some of the enhancements we've seen recently.

The first one is a long-awaited companion to the %SCAN Built-In-Function (BIF). %SCANR works in exactly the same way as %SCAN, but backwards!  In other words, the scan starts not from position 1 of the string, but rather from the last position.

The basic syntax is:

%SCANR( search argument : source string {: start position {: length}})

Notice in particular the optional length parameter which allows us to effectively search a substring of the source string. That particular feature has now also been added to %SCAN.

The second new feature provides additional support for handling null capable fields. This is courtesy of the new keyword NULLIND. This allows you to associate a specific named indicator with a null capable field. Now instead of having to test the status of a null-capable field by using the %NULLIND BIF you can simply test the status of the associated indicator - the result is cleaner easier to read code. Related support is also available for null capable data structures defined with the LIKEREC or EXTNAME keywords.  We'll provide more details of this in a future article for the IBM i EXTRA e-newsletter.

The third and final enhancement falls into the “who needs that?” category. Previously the maximum number of parameter on a bound call (i.e. a CALLP or subprocedure invocation) was 399. Apparently that just wasn't enough for some people and the new limit is now (wait for it) 16,382.

We have no idea why anyone would ever need that many parameters, and we'd fire anyone who even coded close to the old limit, but the OS support limits have been raised and RPG is simply surfacing the new capability.

That's all there is this time around, but it is worth noting one feature that Tim Rowe mentioned in his blog post—the Orion editor.  Orion is based on Eclipse technology and the initial release includes some support for RPG syntax checking. Because this is an open-source project, we might reasonably expect iSphere and other groups who have developed plugins for RDi to bring their technology to Orion. If they do, perhaps Orion may in time provide a home for those too cheap (or whose management is too cheap) to pay for RDi.

As noted earlier we'll be following up this blog post with an article explaining the new features and in particular the "State of nullness" in today's RPG.




Posted April 13, 2016 | Permalink

Post a Comment

Note: Comments are moderated and will not appear until approved

comments powered by Disqus