Paul Tuohy, IBM Champion and author of “Re-engineering RPG Legacy Applications” and “The Programmer's Guide to iSeries Navigator,” is a prominent consultant and educator for application modernization and development technologies on the IBM Midrange. He currently holds positions as CEO of ComCon, a consultancy firm based in Dublin, Ireland, and as partner at System i Developer, the organizers of the RPG & DB2 Summit conference. Previously, he worked as IT Manager for Kodak Ireland Ltd. and Technical Director of Precision Software Ltd. In addition to hosting and speaking at the RPG & DB2 Summit, Paul has been an award-winning speaker at COMMON, COMMON Europe Congress and other conferences throughout the world. His articles frequently appear in The Four Hundred and other leading IBM i publications.
September 5, 2018 Paul Tuohy
Author’s Note: The contents of this article were originally published as two separate articles – Handling Constraint Violations in RPG and Handling Constraints Revisited. The content of the article has been updated for free form RPG and some of the coding enhancements that have been introduced, into RPG, since 2009.
Constraints have been around for a long time but apparently have not quite made it into every programmer’s tool kit. This is partly explained by the fact that implementing constraints in an existing application can be tricky, but it doesn’t explain why constraints are not used extensively in new …Read more
August 29, 2018 Paul Tuohy
Author’s Note: This article was originally published in October 2009. Since then, I have worked on many modernization projects with many clients and, in every one of those projects, we have used some form of the contents of this (and the following) article. The content of the article has been updated for free-form RPG and some of the coding enhancements that have been introduced, into RPG, since 2009. The original articles also showed examples of direct calls to RPG subprocedures from PHP. Given that we now have many languages (Node.js, Python etc.) that interact with RPG, I changed the mechanism …Read more
August 1, 2018 Paul Tuohy
Author’s Note: This article was originally published in October 2009. Since then I have worked on many modernization projects with many clients and, in every one of those projects, we have used some form of the contents of this (and the following) article. The content of the article has been updated for free form RPG and some of the coding enhancements that have been introduced, into RPG, since the original publication of this piece.
When we look at modernizing applications (or writing new applications) one of the basic principles is to tier the application — i.e., separate the interface — …Read more
March 19, 2018 Paul Tuohy
Today many RPG programmers are tasked with having to modernize existing programs. These programs often have long and varied history. They may be RPG IV programs or they may be RPG IV programs that were originally RPG II or RPG III programs, or any permutation or combination you can imagine. There are tools available to help us convert from fixed-form RPG to free-form RPG and, within RDi, we have options to help us reformat code and refactor variable names. But these tools can only go so far. We finally reach the point where we have to put fingers to the …Read more
December 4, 2017 Paul Tuohy
I would like to share a technique I use for dealing with lists in an RPG unit test program. According to Wikipedia, “. . . unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures, are tested to determine whether they are fit for use.”
In the world of modern RPG, this translates to writing “test” programs to test a specific piece of code. For example, when I write a subprocedure, I will write a test program that …Read more
November 13, 2017 Paul Tuohy
While visiting a client recently, I was shown how they were using a multi-row FETCH into a multiple-occurrence data structure to retrieve large sets of data. When I asked why they were not using a data structure array instead, I was referred to an IT Jungle article in which Ted Holt answered a question on whether it was faster to perform a row-at-a-time FETCH or a multi-row FETCH when using embedded SQL.
Ted provided a comparison between a row-at-a-time FETCH, a multi-row FETCH into a data structure array, and a multi-row FETCH into a multiple-occurrence data structure. At the end …Read more