ARCAD Converter Turns Old RPG into Modern RPG
October 15, 2013 Dan Burger
There’s a world of difference between old RPG and modern RPG. For one thing, if your code is written in RPG III or an earlier version, almost no one except for veteran RPG programmers can make much sense of it. And because all modern codes are modular, the old stuff doesn’t mix well with the new. That, in a nut shell, is why ARCAD Software, in conjunction with IBM Rational, created its RPG converter tool for migrating legacy RPG to free form RPG.
The capability to use free-form-style coding is an important modernization language feature that boosts productivity, lessens the burden of maintaining applications, and is expected to provide relief in the troublesome area of RPG skills acquisition. ARCAD’s free-form RPG Converter supports conversion of individual modules in a statement-by-statement fashion under the control of the user, or as a bulk operation on many modules at once.
The RPG converter is a key component in the IBM i 7.1 Technology Refresh 7 (TR7) that was announced last week. It becomes generally available November 15.
TR7 is catching the attention of RPG programmers as it is another step toward modernizing the RPG language. A change in syntax that leaves behind the fixed, columnar format is the most important enhancement. It makes RPG easier to code, easier to read, and easier to learn. ARCAD’s converter will update traditional-style RPG code into the new syntax.
Charles Guarino, president of Central Park Data Systems, and a COMMON subject matter expert on programming and application development, is one of the few people outside of the ARCAD and Rational development teams to get a look at the converter.
“Once a shop makes the decision to modernize, I can’t imagine not using a tool,” Guarino says. His list of reasons includes: saving time and money compared to rewriting code; developing a consistency of code that makes it easier to maintain by fewer developers, including some who aren’t necessarily RPGers; and the tool’s capability to clean up code.
The automatic conversion of the code (ARCAD says it is 99.95 percent) will be far less expensive than having experienced developers working on modernizing code, Guarino says. “You will never be able to compete with a tool that converts a program in minutes,” he says. “And having the new free-format specs in a consistent manner greatly improves the cost of maintaining these programs. Because the conversion tool generates compile-ready code, it provides an excellent starting point to learn how the new specifications are to be properly written. The value proposition only increases as the breadth of native syntax becomes more available to developers.
“One very nice feature of the tool is the refactoring and removal of the GOTO statements,” Guarino says. “I have seen many programs with GOTOs and, as a general rule, you don’t try to remove just one or two of them. However, an automated tool that makes quick work of it is a different story.
“It also cleans up the code,” he continues. “And I’m not even having the structured versus unstructured argument here. Having GOTO and TAG statements interspersed between true free-form code–accompanied by /end-free and /free statements–makes programs even more difficult to maintain. Completely removing the need to drop back and forth from columnar format to free format makes code more readable, thus reducing the risk for introducing errors.”
TR7 includes a new compiler that is capable of understanding a mix of RPG styles. For instance, it recompiles code that is a mix of RPG III, RPG IV, and free form RPG, which prepares it so the ARCAD converter can complete the program conversion to RPG free form.
That final step, in tests conducted by ARCAD showed a 99.95 percent conversion rate after one million lines of code that started out as 20-plus-year old RPG III.
That’s not a guarantee that all programs will have such a high conversion rate, but the amount of problematic code that will reduce that conversion rate is expected to be small.
For IBM i shops that lack the technical expertise for moving programs into free form RPG, there will be–in all likelihood–consultants and services-oriented companies that become familiar with doing this conversion on a for-hire basis.
“I see companies managing this process in phases and not making it a project that draws a line in the sand for completion like we had for Y2K,” says Floyd DelMuro, vice president of ARCAD in the Americas. “If companies have the technical staff they will do it in-house. There will probably be a phased-in approach to reduce risk and to take care of priority projects like mobile computing, for instance.”
The cost of the ARCAD converter is based on a per-thousand of programs converted basis. The entry cost is $5,000 for first 1,000 programs. Going beyond 1,000 programs brings an up-charge of $5,000, as will each incremental 1,000 programs. The price does not include support or services.
The RPG IV compiler will be generally available with TR7 November 15. The converter, which depends on the compiler, will become GA then as well. IBM i 7.1 is a requirement for these products.
ARCAD is hosting a webinar October 29 featuring its new conversion product. Registration for that event, which begins at noon Eastern Time, is available at this website.