It's 2008: RPG, now more than 40 years old, is still the dominant programming language in System i shops, despite a plethora of alternative 3GLs, many of which claim to possess benefits from more modern design. I have to ask: Why are we coding in 3GLs at all? What happened to 4GLs, CASE tools, application generators, and other high-powered alternatives to the old hand-coded methods?
I started my career many decades ago programming in Fortran, Basic, and RPG. Today, I still use RPG as much as I did almost 40 years ago, and Fortran and Basic are both going strong on other platforms. Although the language has evolved, the tools have evolved and, I like to think, my technique has evolved, we still code procedurally to transform inputs into outputs. And in spite of trying multiple alternative methods, most of our code is still written in RPG. There must be a reason either we are not as smart as we think, the alternatives are not as effective as their proponents proclaim, or RPG has some inherent advantage. Maybe all three possibilities are true.
In the early days, we used to think that if a 3GL (such as RPG) was better than a 2GL (such as assembly language), then surely a 4GL would be even better. In a 4GL (today sometimes called "domain-specific language"), a statement was supposed to do more, hiding the low-level details such as working variables, and operators in the language were supposed to map better to the problem domain. Although no 4GL ever became popular on a System i predecessor, the languages did keep their promise on other platforms. But, even though you could generally program faster in a 4GL, if a problem didn't fit the language or was too big, you hit the 4GL wall and suddenly the problem took significantly longer to program than it would have in a 3GL. Most shops concluded that the benefit of a 4GL did not outweigh the cost of having to drop back to a 3GL to solve the tough problems.
CASE tools and a related technology, application generators, have made much deeper inroads in the System i environment. Lansa, Cool:2E (formerly Synon/2E), and many others are still widely used. With them, the computer does some of the work a programmer would do in a 3GL. Typically, you use a proprietary language or tool to specify the program at a higher abstraction level than you usually would with a 3GL, and the tool then generates the application or programs, usually by creating 3GL programs. This approach has many advantages, including speed, consistency, choice of target 3GL, and even cross-platform deployment. You often use a model and/or a repository of information about the application that grows in utility as the application grows. CASE tools can be subject to the 4GL wall, but they often avoid it by allowing some visibility into the underlying 3GL.
But why haven't these tools displaced RPG? Reasons vary from shop to shop, but they usually include a high initial learning curve, higher costs over 3GL, and a lack of critical mass, which is a common problem because no CASE tool has ever dominated application development to the exclusion of 3GLs on any platform.
So my final question is why, given all the complaints about RPG, hasn't another 3GL ever replaced it? Many have tried. Early on, Cobol was a contender, and then came VB, C, and C++ on Intel platforms, and recently Java, PHP, and EGL (arguably a 4GL or generator). But in every case, they have failed to make significant inroads. One key reason, in my opinion, is that they just aren't better. Although C and C++ are wonderful languages for programming system routines or low-level, performance-sensitive routines, they're simply unsuitable for large business applications. VB had significant scaling problems, and Java, though fascinating in its object orientation, fails to deliver the productivity and performance that RPG programmers demand. The jury is still out on PHP, but my guess is that it will become a niche web language on IBM i. The fact is, the best 3GLs just aren't improved enough over RPG to justify changing.
The bottom line is that RPG is a great language. It has tight integration with the IBM i, excellent mapping onto the business application problem domain, critical mass of programmers and applications, and IBM's constant improvements, which all point to a strong future for this language. It's not that I don't want to see something better I do. But it won't happen in my career.
Carson A. Soule is a System iNEWS technical editor and the CEO of CAS Severn, Inc., an IBM Premier Business Partner, in Laurel, Maryland. He is a frequent speaker at conferences and seminars worldwide.