What’s Wrong With Modern RPG?
February 27, 2017 Dan Burger
IBM continues to enhance RPG. If it wasn’t being improved on a regular basis, there would be cause for concern, but some people find cause for concern in everything. Satisfaction is on the other side of the fence, even after they’ve crossed the fence. That’s not an endorsement for “If you don’t have anything nice to say, don’t say anything at all.” There’s always room for constructive criticism and honest assessments of the circumstances.
Three enhancements are noted:
- Nested data structures in free-form declarations only;
- %MAX and %MIN built-in functions;
- And ALIGN(*FULL) to cause the size of a data structure to be a multiple of its alignment.
What’s wrong with modern RPG? Overall the enhancements during the past three years look pretty good.
These aren’t the most exciting or impactful RPG enhancements, but with TRs on a bi-annual basis, there won’t be fireworks at every refresh. It is noted, however, that each enhancement was the result of a request for enhancement (RFE). If you haven’t been to the IBM RFE Community website, put it on your to-do list. You can make your own request, or vote on requests that are posted.
Nested data structures should receive the biggest applause from the RPG programming community. Those who do modern programming will probably make use of this enhancement right away. I asked a couple of RPG experts – Jon Paris and Scott Klement – what they thought.
“For me, the new nested data structure (DS) support is a godsend. Nested DS became possible back in V5 but were awkward to code. The new way of nesting DS was not possible until the free-form syntax came in. We (Jon’s partner, Susan Gantner, is the reason ‘me’ becomes ‘we’ in Jon’s response) use nested DS a lot, particularly for XML processing using the built-in XML-INTO. For that, nested DS are essential.”
Paris says the nested DS topic will be included in sessions he presents on advanced data structures, processing XML, and free-form RPG.
“It was a mental barrier to people coming from other languages who are used to directly coding the structures they want to use. Now they can,” he says. This is an indicator that RPG is growing up and becoming a more fully-formed language.”
Klement says RPG support for nested data structure will save considerable time when he is coding. He uses nested data structures every day, but only rarely uses XML. (For his Web development work, JSON has replaced XML.) There are many uses, he says.
Like Paris, Klement frequently presents sessions at IBM i technical conferences and local user group meetings.
“Last year, I put together a speaking session on what’s new in RPG, and people were really amazed. Many came to the session thinking there wasn’t much new, but when I went down the list showing the enhancements made over the past five years, they were blown away.
“Many people are used to the old way, when IBM didn’t give us new features, except when a new OS was released. In that circumstance, they’d get a ‘big bang’ of all the new features at once. Now, they get the features one-by-one, spread out over time. So, it seems small until you step back and look at everything that happened over a longer period of time.
“You also have to factor in the DB2 changes. Even though they are not specific to RPG, all RPGers use DB2 and can take advantage of its new functionality, too.”
Jim Buck is another RPG expert who is a text book author and has taught RPG at the college level for more than 20 years. He adds the recent enhancements to Access Client Solutions and the development reorganization that brought RDi back to Rochester as positive steps made by IBM.
“IBM keeps moving the database forward, keeps moving the language forward. They’ve done more in the last three years than they did in the previous 10 years,” Buck says.
Buck and Paris are current IBM Power Systems Champions. Klement is a past member of the Champions club.
It’s clear that as RPG and DB2 are continually enhanced and become modernized, they become more like other languages and databases. At the other end of the scale there are those who avoid modernization and put themselves and their organizations at risk. IT Jungle‘s senior technical editor Ted Holt believes the innovation and customization that was once the advantage of RPG and DB2 is now a part of history.
“Everything’s headed toward commoditization,” Holt says. “A computer is a computer is a computer. They all use the same user interface – a web browser. They all use the same database interface – SQL. They all use the same programming languages – who knows what that will turn out to be, but whatever, it will be an “open” language.
“IBM is headed in that direction as fast as it can go. The changes to RPG move it in the direction of being more like other languages. I believe that eventually we’ll see code from many languages migrated into a language that may not have been invented yet. Old RPG is not going to migrate, or at least not easily.
“Those shops that want to stay with old versions of RPG will see their custom apps dumped and replaced with packages. How do I know? Because it’s already happening. Nobody wants a green-screen interface. After all, they wouldn’t have any use for a green-screen Web browser if one was available. Shops that still write green-screen apps are killing the platform by making it obsolete.”