Thoroughly Modern: A Swiss Army Knife For IBM i Developers
December 5, 2022 Robert Arce
Our strength as developers and programmers lies not only in the code we write, but also in the tools we choose to surround ourselves with. The right tools are often the determining factor in how productive, efficient and accurate we can be – especially when working with large applications that we didn’t even write.
Long gone are the days of just managing a handful of programs, technologies, languages or databases, and relying on tribal knowledge to make critical business decisions isn’t just risky, it’s irresponsible. Especially when more and more experienced IBM i (AS/400) developers are changing jobs or retiring – taking the tribal knowledge with them.
I have been helping companies solve the IBM i resource/knowledge transfer issue using X-Analysis for over seven years, both by implementing software solutions and providing skills and resources to support customers that need help managing their IBM i environments.
As a 30-year IBM i developer, architect, modernization and database expert with Fresche Solutions, I have seen it all. Everything from organizations that have just “run” their IBM i systems for years without any IT staff (which is both scary and impressive, but mostly scary), through to large teams supporting millions of lines of code and thousands of programs. The one consistent theme is that nothing is consistent. Even today, most IT groups have little to no system documentation and applications have often been built by many hands over many years, making them difficult to manage and near impossible to onboard new teams and skills. But it doesn’t have to be like this.
Application Insights At Your Fingertips – Literally!
Some months back I attended COMMON POWERUp 2022 in New Orleans and ran into several Fresche customers that use X-Analysis. Their stories are really what inspired me to put this article together. A few clients shared that they changed companies but brought Fresche’s X-Analysis product with them, which helped them ramp up, understand the new applications and environment and become a contributing member of the IT team in just weeks. Actually, using the insights and forensic data that they gathered with X-Analysis, they shared that this also helped them to quickly earn the trust and respect of other IT members who have been there for many years and know the applications well. Once you know how the application is built, what it interfaces with, the impact of your changes and how and where those changes need to be applied, your bases are covered.
So why do IT leaders and IBM i developers who use X-Analysis say they never want to maintain IBM i environments without it?
Simple. No one knows every detail of every program that’s in their environment. Knowledge transfer, data that gets shared, assumptions that get made and business decisions taken can be inaccurate and even disputed internally causing uncertainties and even delays to critical projects. X-Analysis removes the guesswork by providing actual metrics and details about applications (size, complexity, relationships, usage, etc.) that gets everyone on the same page.
X-Analysis changes the way developers work by serving up data in a visual format that makes it more intuitive and reduces the manual effort required to complete tasks. The insight allows them to make decisions and implement changes faster, saving them time and freeing them up to work on more valuable projects.
How exactly does X-Analysis work?
X-Analysis builds a very detailed repository over an entire application or entire system. The repository maintains all information about application objects, their relationships and all necessary information to obtain detailed information from each object across the entire system.
Many years of ongoing development over thousands of OS/400 and IBM i applications written in all variants of RPG, CA 2E (Synon), COBOL, and CL, has produced an unmatched capability to extract everything about an application from objects right down to individual variables. Even better, the repository and documentation are built automatically based on the data sources provided. Documentation is accessible anytime and is automatically updated with every change that is made – ensuring your documentation is always accurate and up to date.
X-Analysis Simplifies The Task
Seemingly straightforward tasks can be much more time consuming and cumbersome than they seem on the surface. X-Analysis is designed and optimized to make the design recovery process as straightforward as possible. Using a single command, it initially collects all object-related information, but then parses every source member in the specified system and every source line, mapping the contextual information of each variable in the system. A certain amount of logical abstraction processing then takes place while building the repository to account for some of the idiosyncrasies typical in an RPG application. This includes constructs such as variable program calls, file overrides, prefixing and renaming in RPG. The repository then presents a map of how the entire application functions right down to individual variables.
Using X-Analysis, you can completely document a complex, decades old IBM i (AS/400) application using modern diagramming standards, entity relationship diagrams, system flow diagrams, and structure charts.
From the point of view of the user of X-Analysis, this process of building the cross-reference repository and deriving the models happens automatically. They are created as part of the installation process – although it can be triggered again later on if required.
A typical IBM i application is likely to consist of a mix of RPG programs, DDS/DDL files and members for display files, database files and logical views. Newer systems may have these artifacts interspersed with SQL scripts, but the sum of knowledge in that system, and how it works and interacts among its various elements is contained within those source files and compiled objects. The issue for most IT organizations is retrieving that knowledge efficiently.
To understand and fully appreciate the problems X-Analysis solves, simply consider the process you would have to undertake if you wanted to discover how a system unfamiliar to you operates or how to make changes to it.
Sample Use Case: Adding Email & Phone Number To Detail Screen
Let’s use as a simple example part of an application where you have a customer details screen — but no dedicated place for an email address and mobile phone numbers. The system has adapted itself to the Internet age as many IBM i applications have done by making use of .extra. and .notes. ad-hoc fields.
The system has evolved, but it is a time-consuming task to retrieve these email and cell phone details for use in a marketing campaign.
To update the system, you would probably start by looking at the program and the display files that handle the display and maintenance of the customer information. From that initial inspection you would discover the database tables/files involved.
From a simplistic point of view, you now have the necessary information to make the changes. And, in reality, they are probably not that difficult changes to make. You simply need to add new fields for email and mobile phone to the database tables or rename the existing ones then modify the program and display files accordingly.
However, you are probably thinking: What about the rest of the system? What else uses that table? Is the display file used anywhere else? So, the change has a larger ripple effect than would first appear. These are just a few of the questions we have to answer when implementing such system changes.
- What is the scope and impact of the change? How many programs and tables are affected?
- How do we handle database changes? Do we add new fields or just rename the fields and preserve the status quo? Do we know if those fields were only used for email and mobile phone data?
- How do we preserve database integrity? Fields destined for ad-hoc data like ‘extra information’ and ‘notes’ are unlikely to have any validation or to be even required. So, if migrating the existing values to new fields, we can’t simply copy it over. Some cleansing will be required.
The process of gaining the knowledge to answer these questions may not be all that straightforward, particularly if the systems are complex or the people trying to answer them are new to the application, system or platform.
To assess the scope and impact of the change, you need to find out which programs use the files/tables affected. This can be a very laborious effort as you need to:
- Go through all source files in PDM
- option 25 to searching
- then F13 to repeat
- press Enter
- type in your search term ✔ review results …
And that’s just the first inquiry! Depending on the complexity and history of your systems, you may have doubts that you were looking at all of the source or the latest version. With just a few clicks, X-Analysis shows you which programs are in use, which ones need to be changed and then you can manage and even carry out the changes across the entire application from within the product.
Understanding Design And Function More Easily
To better understand an application’s structure and general function, an abstraction of the source code combined with object-to-object relational information is required. A few simple but rich types of color-coded, graphical diagrams can reveal the data flow and architecture of individual objects or parts of an entire system.
This is combined with automatically generated descriptions in English language syntax or pseudo code that appear either in the diagrams or while browsing the source code. The drill-down, go-anywhere-from-anywhere, interactive nature of these interfaces in the X-Analysis client provides a unique approach to information assimilation, allowing an analyst or business stakeholders to gather high-level or very detailed information in a way that they can understand it. This instantly makes it easy to share documentation between IT and business stakeholders.
Here is a brief description of some of these diagrammatic constructs and views:
- A Structure Chart Diagram (SCD) display gives a graphic representation of how the control passes from one program to another program within the application. This follows the call structure down the complete stack. The diagram also reveals data input objects and also automatically derives a summarized description of each of the objects in the diagram. Color-coding also shows important functional aspects such as updates, prints, and displays, which help users to zone in on commonly, sought after details.
- A Data Flow Diagram (DFD) is a graphical representation of where a program/object is used, showing the files and programs accessed by the subject/object. It is color-coded and shows both flow of data at a high object level and contextual information about the specific variables/parameters passed between objects.
- A Program Structure Chart graphically displays the sequence of calls in the program. The call could be to execute a subroutine/program/module/service program.
- The Overview Structure Chart gives a snapshot of an application. It displays all the entry points to the application, and then the structure chart for each of these entry points.
I have just scratched the surface with what can be accomplished with X-Analysis. Automated field resizing and testing are two additional key areas where organizations are seeing tremendous value. If you are responsible for and/or manage IBM i applications, handle IBM i onboarding/training for new resources then I highly recommend you watch the X-Analysis demo or sign up for a free trial and learn firsthand how it can help you improve productivity and application understanding. You can also connect with us by sending an email to firstname.lastname@example.org.
Robert Arce is an IT strategist and IBM i subject matter expert and client advisor at Fresche Solutions.
This content is sponsored by Fresche Solutions.