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.
That brings us to the RPG enhancements in the recently announced Technology Refresh identified as IBM i 7.2 TR 6 and IBM i 7.3 TR 2.
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.”
RELATED STORIES
IBM i TRs Bring New Open Source Data Transfer Tools
SQL And Database Shine As Next Tech Refresh Approaches
What’s New In Access Client Solutions
IBM Gives The Midrange A Valentine’s Day (Processor) Card
RPG Website Resurrected. Is the Language Next?
RPG Open Source Horse Pulls IBM i Community Plow
Free Form RPG Scores IBM i Innovation Award
We Can Just Barely See RPG In i 7.3
DB2 Enhancements, Free Form RPG, Modernization Top Rowe’s ‘Big Hits’ List
Excellent assessments by all four of the experts. Message to companies stuck in old ways: move forward or watch your competition zoom past you.
What language will live on the IBM i in future when only old applications coded in RPG and no new programmers will code in RPG?
The RPG base is vanishing – what will be used on IBM i after RPG?
All RPG applications are candidates for substitution – what new developmentes in RPG we can expect in that situation IBM knows?
The number of Websites in the internet which treat RPG themes can´t be compared with other languages or frameworks… there is no more development.
#1. Mind-share
#2. The average dev-on-the-street can’t install RPG on his laptop and start coding with it.
Just out of curiosity, and don’t think that i am poo-pooing on anything, but hasn’t nested data structured been a thing for sometime. You just couldn’t declare them, like you can now, but you could using likeds(). We’ve been doing it for years. I guess I’m very shocked at the excitement of this, when it’s been there all along.
I had asked for this 16 years ago (and am still asking) for it. RPG should have a sub-compiler which should only allow free format, and then rename it as something like PL/i or RPG for i.
1. The smaller advantage would be the ability to brag that we program in a modern language that is more powerful than any language on IBM i.
2. The bigger advantage would be for shops to restrict new development in the new compiler only.
When RPG is not my grandfather’s RPG (that had indicators and cycle and fixed format), then why call it RPG? IBM i has more reason to be called AS/400 (when people program in green screen), then RPG being called RPG.