Utility Advances RPG Conversion
As the AS/400 continues along the path of becoming an increasingly complex and interactive system, the development languages that pave the way are required to progress in order to accommodate this complexity. One concrete example of this progression is the transformation of RPG III and RPG/400 to ILE RPG, also known as RPG IV.
Recognizing the difficulty inherent in performing a language transformation, while also providing incentive for such a move, Linoma Software now offers its CVTILERPG conversion utility. CVTILERPG is designed to build upon the existing Integrated Language Environment (ILE) RPG compiler and provide a number of features not available with IBM's basic RPG conversion tool.
"Some people are just waiting for the right tool to help them convert to RPG IV," says Jeff Petermann, director of sales for Linoma Software, an Omaha, Neb.-based division of Connections 2000 Inc. "CVTILERPG is a conversion utility that goes beyond the AS/400's conversion command, which doesn't truly convert code to RPG IV format but instead allows code to function in an RPG IV world. Programmers then have to go back in and update the code manually at a later time."
While a move to RPG IV can provide a number of benefits, it is a daunting transition for companies with large quantities of RPG III legacy code that must be converted, says Bob Luebbe, president of Linoma Software and author of CVTILERPG. Luebbe also points out, however, that users want to stay current with new versions of their programming language. "In continuing to stay with RPG, they're going to continue to fall behind, as IBM continues to enhance RPG IV."
RPG IV also eliminates many of RPG III's limitations, according to Luebbe. "You used to only be able to have 50 files in an RPG III program," he says. "With RPG IV, the programmer can allow for an unlimited number of files--which can include customer files, order entry files, plus an unlimited number of other files where data is stored. In RPG III, there are also limitations on the lengths of field names. Used to be only six character field names in RPG III. RPG IV continues to allow larger field names all the time."
Migration to RPG IV also becomes a practical matter as the current millennium draws to a close. "RPG IV is a great language to convert to for Y2K conversions, because the language allows for better date and time manipulation than RPG III," Luebbe says. "What may have taken 100 lines of code to do in RPG III, you can now do in maybe one line with RPG IV. We've sold our product to a lot of folks doing Y2K conversion because they want to take advantage of the date and time manipulation features."
Despite the prevalence of visual languages and Java's increasing popularity, Luebbe indicates there is still a strong demand for RPG. "Most people have pretty much made up their mind to migrate from RPG III to RPG IV, rather than skip from RPG to a newer language like Java," he says. "For one, the learning curve is much shorter."
One analyst who agrees with Luebbe's assessment of RPG's health is James Sinur, VP and research director for application development with Gartner Group (Stamford, Conn.). "RPG is a perfectly structured language that doesn't require a sophisticated parser," he says, adding, "It's the perfect language for moving from one version to another."
According to Sinur, programmers must consider several aspects when performing code conversion. The first is to "make sure you have a good test bed, because you need a benchmark," he says. "It's the only way to determine whether you've had a successful conversion." In addition, reference sites must be checked to make sure the new code works. Developers should also "do a pilot with one of the dirtiest pieces of code you've got," he adds.
The latest version of CVTILERPG, 1.42, is designed to take advantage of all ILE RPG IV features when converting RPG III and RPG/400 source code, according to Luebbe. Standard features always performed by CVTILERPG include conversion of: IFxx, DOxx, WHxx, ANDxx and ORxx operations to use the free form expression area; SETON, SETOF and COMP operations to the EVAL operation; END operations to their corresponding ENDxx operations (i.e. END becomes ENDIF); and the constant of '1' to *ON and '0' to *OFF in indicator operations. The utility also generates a summary report of converted member(s), with any exception messages.
There are a number of optional features than can be turned on or off during the conversion process. "Our product lets you control how many of the new RPG IV features you want to take advantage of," Luebbe says. Programmers can later update code that has already been converted.
Though Gartner's Sinur says his client base does not like dealing with invasive procedures like language-to-language conversions, he agrees that RPG is "much more simplistic than parsing C, C++, Java, Assembler and even Cobol." Sinur adds that Cobol to Cobol is the most common form of code conversion, and that conversion of Cobol to Java has taken off as of late. "Even more common than language-to-language conversion is GUI-wrapping," he says, as his clients "like approaches that don't tweak the code much."