Today’s
IBM i 25 chapter begins by musing about the meaning of RPG’s name. In one of
our earliest
blog posts back in July 2007, we blogged about the name of the RPG language
and whether it should have a new one to match its new personality. We had suggested
“Borg” since RPG seems so good at assimilating
the best features from other languages. Many of you offered alternative
suggestions.
In reading today’s anniversary chapter, Susan learned something new—although Jon claims he knew it long ago. When RPG IV was introduced, the name “RPG” was officially declared to be no longer an acronym—or, more correctly as Scott Klement pointed out recently, an initialism. For those who didn’t realize this, to be an acronym, apparently it must be pronounceable as a word, such as NATO. If it is simply spelt out, as RPG is, it’s technically an initialism.
While the letters RPG may not officially stand for anything any more, RPG, the language, means a great deal to many thousands of programmers around the world and the users of their rock-solid, efficient, modern business applications.
In many ways it’s a good thing that RPG no longer stands for “Report Program Generator” because it has been many, many years since RPG’s primary function was reporting. It has evolved radically over the years.
If the picture that comes to your mind when you think of RPG is of columnar logic with multiple conditioning indicators and nary a hint of SQL, it’s time to wake up, Sleeping Beauty—you’ve missed a lot in the last 25 years. IBM i’s modern RPG IV is barely recognizable as a relative of the AS/400’s original RPG/400.
Today’s RPG logic is written in free format. It also utilizes libraries of homegrown, open-source and third-party functions in addition to RPG’s own library of more than 70 BIFs (built-in-functions). As a result, what would have been dozens of lines of indicator-laden, columnar “old-style” RPG are replaced by simple, powerful expressions. And RPG’s data access has “grown up” too. Support for a huge variety of native data types and a deeper level of integration with SQL than is seen in almost any other language makes RPG a natural partner for IBM i’s integrated DB2 database.
Still think that RPG = Green Screen? Think again. Many shops are running interactive Web and mobile applications with logic powered by RPG. Or if you prefer, RPG code can easily provide the business logic underpinnings of Web services, stored procedures and other services to applications written in PHP, Java, Python, Ruby, .NET, etc.
Inevitably there are things that RPG doesn’t understand natively and that IBM cannot add to the language in a meaningful timeframe. The pace of change in today’s IT world is just too fast. That’s why Open Access was recently added to the language. It allows for the development of drivers to add new functionality while maintaining RPG’s powerful data marshaling capabilities. For example, you can write a driver to call a currency conversion Web service from RPG, allowing any RPG program to treat access to real-time currency conversion data as if it were a huge database in the sky. Simply set the key values for the currencies involved and issue a CHAIN operation. The conversion rate is returned as if it were being retrieved from a database column.
In our next EXTRA article, due out in the next couple of weeks, we’ll take a look back at 25 years of RPG. We’ll post the link in the comments section here when it’s available, so check back if we’ve piqued your interest. Or follow us on Twitter @JonParis or @SusanGantner.
And don’t forget to join in the celebration with all 25 chapters leading up to IBM i’s 25th birthday at http://bit.ly/ibmi25.
In the meantime, it seems a shame to waste a perfectly good initialism as RPG. Maybe we could unofficially assign one—or a few. How about Renegade Programming Gurus? Robust Programming Genus? Real Problems Gutted?
You say: "Today’s RPG logic is written in free format" Why not an IBM command, a kind of CVTRPGSRC able to convert at different levels? RPGIII into RPGIV and/or free form?
I think that clients have millions lines of code to maintain on long term.
When you say: "Simply set the key values for the currencies involved and issue a CHAIN operation." This is great!!! a real improvement regarding existing RPG applications.
Posted by: Jean Mikhaleff | May 16, 2013 at 01:14 AM
...and RPG on IBM i automatically connects to the *LOCAL database. Wouldn't that be nice to have on other platforms ?
Posted by: Christopher Burns, Sr. | May 16, 2013 at 07:06 AM
Right.
Posted by: Jean Mikhaleff | May 16, 2013 at 08:08 AM
RPG = Robust Programming Guidelines, you can do anything you want.
Posted by: SKip Meyn | May 22, 2013 at 03:38 PM
RPG is actually over 50 years old, it started back in the late 50's - early 60's for the IBM Mainframes (1401's I think) and then on through the sys360's, etc, and then became RPGII for the system 3's in the late 60's
Posted by: John Clayton | May 22, 2013 at 04:20 PM
A great walk down memory lane and a superb reminder how far RPG has come since our early Shelly-Cashman introductions to the language. History will one day record that the Open Access API is second only to the RISC processor upgrades as the most important IBM has done for the IBM i platform.
Does anyone remember Carson Soule's Revenge of the Indicators COMMON presentation like I do? Holy cow. He predated real structure but introduced so much so quickly.
Great post. rp
Posted by: roger pence | May 22, 2013 at 09:11 PM