A Code Inspector For RPG
March 14, 2018 Alex Woodie
Programmers who are tasked with maintaining applications often spend 50 percent or more of their time just figuring out how programs work, taking away valuable time they could spend on other tasks. Now a company called i400hub.com is promoting a new tool called RPG/Code Inspector that helps programmers reclaim that lost time.
RPG/Code Inspector is a program comprehension tool created by longtime IBM i developer Steve Kilner that’s designed to help programmers discover what’s going on in their RPG applications quickly, without going line-by-line through the source code. The software automates several tasks for programmers, including:
- Analyzing and cross-referencing how changes to particular parts of a program will impact others.
- Creating models of program logic and workflows.
- Locating where specific functionality is implemented in the source code.
- And tracing logic paths that lead to particular source statements, or “backward program slicing.”
Kilner showed off RPG/Code Inspector features during a recent webinar hosted by i400hub.com, a firm that distributes IBM i software, sells IBM hardware, and provides IBM i recruitment services to clients in North America, Europe, and other parts of the world.
“You’ve probably done something like this manually, where basically you have to backtrack throughout the program and jump around through the source code,” Kilner says during a demonstration of RPG/Code Inspector’s data flow features. “It takes a lot of time. It also can be error prone.”
RPG/Code Inspector presents a Windows-based graphical user interface that allows developers to get answers to questions by hovering over icons on a screen and right-clicking with their mouse. They can use the tool to see what’s going on with the mainline code of the RPG program, when subroutines are updating, how procedures are running, and other important pieces of information.
The impact analysis part of the tool uses visual indicators, including red and green lights, to let the programmer know what will happen if she changes a particular field.
“I can right-click to say ‘Show impact analysis if this statement is changed or deleted,” Kilner said during the webinar. “Right away, down here in the window, I have some green things and have some red. The green is telling me these statements are related but probably not impacted . . . Here’s some red. Is this impacted? Well yeah . . . So right away it tells me all this code here is impacted if I change this field up here.”
The software’s core flow feature is useful for “showing you the bones of the program,” Kilner says, referring to the file operations, the input, the output, and any loops that the program executes. Kilner put this feature into action, showing the audience how an RPG application methodically goes through different stages, including performing I/O, executing loops, and doing various file reads and deletes.
“It’s flattening all this information across all the subroutines,” Kilner said. “So it’s pulling statements from nested subroutines and procedures . . . . It is flattening that across the entire program, so you can see the loops and the database operations all in fixed view.”
i400hub.com claims developers can boost their productivity significantly by using RPG/Code Inspector (although the claim of a 100 percent productivity boost probably should be taken with a grain of salt). Other benefits cited by the firm include shortening the learning curve for novice programmers and decreasing the number of errors introduced during maintenance activities.
Considering the number of legacy RPG programs still running in the world, not to mention the need to modernize RPG apps with additional functionality, it’s not hard to see how a programmer might want to have something like RPG/Code Inspector on their tool belt. More information can be found at the company’s website.