Author: Craig Pelkie
Practically all AS/400 and iSeries programmers are aware of the Integrated Language Environment (ILE) series of programming languages, including RPG, COBOL, C and C++. However, many shops not only continue to use programs developed with earlier versions of RPG, such as RPG III and RPG/400, but also continue development with those obsolete versions. Unfortunately, the "if it ain't broke" philosophy that tolerates continued use of older tech-nologies is quite costly, in terms of maintenance and enhancement.
Many older RPG programs are difficult to maintain, even if the original programmer performs the maintenance. Problems include use of difficult to understand indicators, inadvertent modification of variables because of their global scope, and circuitous programming logic to accomplish basically simple tasks. The sheer number of lines of code often compounds maintaining old programs. Although having to work with 5,000 line monsters makes for some good "war stories", the reality is that most programmers dread having to confront maintenance tasks on old code.
Useful programs need enhancements and modifications. The problem with "old" RPG is that there is no clear guidance available from the language itself as to how best to add functionality. Most often, new functions are simply added as new subroutines, further bloating the program. Because the purpose, use and side effects of existing subroutines is often unclear, it is usually simpler to just add new code to the program, often duplicating code already in the program. Although enhancements provide added value, the very act of enhancing has further increased the maintenance burden.
ILE provides immediate benefits to the issues described above. For example, ILE RPG programs can be properly modularized, helping reduce maintenance to known locations in a program. Once code is written as procedures in service programs, it can be properly tested and debugged. Perhaps the most important benefit of modularization is that important routines can be readily reused with confidence, as the "side effects" of using the code are limited to a clearly defined procedure interface.
Enhancing an ILE RPG program is also simplified. It is easy to create additional well-defined procedures and incorporate the new functionality into the base program. Enhancement is no longer a contest between hope and experience, but can now be approach-ed and performed in a rational, well-defined manner.
Many shops are driven to start using ILE because the new, important system APIs require its use. For example, developing web applications with RPG requires ILE RPG. Programmers are often pleasantly surprised to find that using ILE RPG with APIs is not a radical departure from their current skill set. Being able to have small, early and frequent successes with ILE RPG is often enough to open the door to the new programming technologies.
If your shop is committed to using RPG on the iSeries, moving to ILE RPG is the only rational approach for continued development. You have all the benefits of using a familiar programming language, RPG, along with all the benefits and future development possibilities that IBM has worked hard to provide for the iSeries.
Craig Pelkie is Senior Technical Editor for Rochester Initiative. He is the author of the newly released RPG Subprocedures Workshop.