Today, I’m diving into the fun world of legacy code modernization from the old AS400 style RPG to the new free-format IBM i Style RPG.
Why modernize legacy source code?
Modernizing old RPG code from AS400’s column-based style to IBM i’s free-format style is a blast for a few reasons:
- Liberation from Rigidity: The old column-based RPG (like RPG III or IV) feels like coding on graph paper—every character had to be in the right column, or it was chaos. Free-format RPG ditches that for a clean, flexible syntax that feels like writing modern code. It’s like trading a typewriter for a sleek IDE!
- Readability Boost: Free-format code is easier to read and maintain. No more squinting at cryptic, tightly packed lines. You get to use meaningful variable names, indentations, and a structure that makes logic flow like a story. It’s satisfying to turn spaghetti code into something elegant.
- Power of Modern Tools: Free-format RPG plays nicely with modern IBM i tools like Visual Studio Code, RDi, and extensions like the one you mentioned. Automating the upgrade process feels like wielding a magic wand—watching clunky old code transform with a few clicks is pure nerd joy.
- Future-Proofing Feels Good: Upgrading to free-format isn’t just cosmetic; it makes your codebase ready for new integrations, APIs, and developers who’d run screaming from fixed-format RPG. Knowing you’re breathing new life into legacy systems is a coder’s high.
- Puzzle-Solving Thrill: Refactoring old code is like solving a puzzle. You untangle decades-old logic, optimize it, and sometimes uncover quirky “why did they do that?” moments. The mix of detective work and creativity is addictively fun.
It’s the thrill of turning something outdated into a modern masterpiece while keeping the heart of the business running—pure programmer catnip!
Can we do modernize old RPG automatically?
So come with me while I play with the three Visual Studio Code extensions that can help you (and me) upgrade old AS400-style RPG code to modern free-format RPG: RPGLE FREE, Cozzi RPG Converter, and the pricey commercial option, ARCAD RPG.
First up, RPGLE FREE is a free, open-source extension that’s perfect for converting fixed-format RPGLE to free-format. It’s lightweight, comes with the IBM i Code bundle so it’s easy to set up, and great for developers starting their modernization journey. The syntax highlighting and basic conversion features make it a solid choice for small projects or those on a budget.
Next, Bob Cozzi RPG Converter offers another free tool and its the new kids on the block. It automates the conversion process with a focus on accuracy, handling complex code structures and could quickly evolve to be better than RPGLE FREE.
Then there’s ARCAD RPG, the big player with a price tag to match. This commercial tool shines with its supposedly “single-click” conversion, supporting bulk modernization and advertising a near-100% success rates. It’s packed with extras like visual code comparison and compatibility with IBM i 7.1+, making it ideal for enterprise-level projects. The catch? It’s pricey, you cannot simply download and try it – but at least the first 10 conversions are free to test.
In the video, I walk through a real world RPG400 conversion and show how these extensions simplify the transition, though it might lack some advanced features for larger-scale upgrades.
Let’s break it down!
So, which is best? For hobbyists or small teams, RPGLE FREE is a fantastic starting point—free and functional. Cozzi RPG Converter steps it up for more complex conversions without breaking the bank. But if cost isn’t an option and you’re tackling a massive legacy codebase and need pro-level reliability, ARCAD RPG might be worth the investment, despite the cost.
Want to see how each extension works?
You can look at each of the converters results in the RPG Modernization lessons:




