RPG Enhancements for i5/OS V6R1 Revealed
October 15, 2007 Dan Burger
Early in 2008, we’ll be seeing another upgrade to the i5/OS operating system, V6R1. IBM previewed some of its features in the upcoming software. Speculation regarding what will be in V6R1 is already at least knee-deep, and you can expect it to get much deeper in the final months of 2007. Those with greatest curiosity are generally the RPG programmers. And for them, IBM has nailed down exactly what a few new features will be. The source of this information is George Farr, IBM’s worldwide product line manager for WebSphere Development Studio, WebSphere Development Studio Client, and the RPG compilers for the System i. In his keynote address at the RPG & DB2 Summit put on by System i Developer, Farr turned over three of the V6R1 cards that IBM had been holding close to its vest. The RPG-oriented conference was held in Minneapolis, Minnesota, in early October. Here’s what you can expect to see: local file support for subprocedures, increased size limits for character fields, and multithreading capability when developing programs. If you’re not building applications for the Internet, these enhancements are probably less exciting than your new wringer washing machine or high fidelity phonograph. Those of you who know a thing or two about ILE RPG, Web services, and Internet programming should find this of greater interest. As more people become familiar with ILE, the support for local files and subprocedures will become a bigger benefit. Subprocedures make RPG code easier to write, easier to maintain, and easier to reuse. Farr told this RPG-savvy crowd that “by defining an F-spec after beginning a subprocedure, that file becomes local to the subprocedure.” That obvious shortcut drew a round of applause. Most RPG programmers who are writing new code use subprocedures to externalize database processing. Increasing the size limits for character fields will come into play when handling XML documents. I checked in with Paul Tuohy, an RPG expert and one of the session leaders at the RPG & DB2 Summit, to get his read on this benefit. He told me the capability to import XML directly into fields using qualified data structures in an RPG program in one operation was introduced in V5R4, but that most standard-sized XML documents won’t fit in the 64 KB restriction that existed. “There are quite a few people dealing with 16 MB XML documents,” Tuohy says. “With V6R1, it will be a one-step operation to import a 16 MB document.” As a way of handling the larger and more common document size, Tuohy says people are using third-party solutions to avoid the complexity of coding them directly into applications. After upgrading to V6R1, the third-party solutions won’t be necessary for this task. The increased size limits are a result of the way people are writing RPG now, he says. “Once people start to dabble in ILE, the mentality becomes more of a PC mentality, which is to load everything into memory, manipulate it, and then write it out again.” To illustrate this by example, Tuohy compares it to the typical way of writing an order entry application. He describes that as “a records-based procedure with an order header, the order details, the subfiles, and all that process. Doing that now involves defining a user space in QTEMP and having massive data structure arrays, and when the user confirms the order it gets written out to the database. In SOA or Web services, when an XML request come in, the RPG program generates an XML document, which it can do in a 16 MB package and sends it back to the requester.” The support for multiple threads in V6R1 was noted by Farr as stemming from bottlenecks that sometimes occur in RPG serialized threads. This update positions RPG business logic to be easily called from the Web without risk of corrupting data. In addition, developers retain the option of selecting specific procedures to be serialized. RELATED STORIES EGL: The Future of Programming for the System i? IBM Previews i5/OS V6R1, Due in 2008 IBM Upgrades High-End System i Server with Power6 Performance of Function Subprocedures Parameter Passing and Performance Call RPG Subprocedures from CL Subprocedures: Better than Subroutines
|