What is Free-Format RPG on IBM i?
Free-format RPG is a modern syntax for RPG IV that makes IBM i applications easier to read, maintain, refactor, and extend. For many IBM i shops, converting fixed-format RPG to free-format is a practical first step in application modernization because it improves maintainability without requiring a platform migration.
For decades, IBM i has earned its reputation as the workhorse platform that just keeps running. But the applications sitting on top of it often tell a different story: thousands of lines of fixed-format RPG, written by developers who retired years ago, held together by institutional knowledge that’s walking out the door with every retirement party.
The good news is that you don’t need to rip and replace your platform to fix this. You need to modernize your code, starting with converting fixed-format RPG to free-format. That’s the work Fresche Solutions does. With more than 40 years of IBM i expertise and over 2,200 organizations served, Fresche helps organizations like yours fix their applications without touching their platform or leaving IBM i.
The Real Problem Isn’t IBM i, It’s the Code Sitting on It
When leadership starts talking about “modernization,” the conversation often jumps straight to migration: move off IBM i, chase the cloud, replace the platform. But that’s often the wrong starting point. IBM i remains one of the most secure, stable, and cost-effective platforms for running mission-critical business applications. The actual pain points live in the application layer: hard-to-read code, difficult maintenance, and a shrinking pool of developers willing to work in it.
Fixed-format RPG (RPG III and early RPG IV) is a big part of that pain.
Rigid column positions, cryptic op-codes, and a syntax that looks foreign to any developer trained in the last fifteen years all make it hard to attract and retain talent. Still, staying the course on IBM i is a great option worth considering: if the platform is supporting your business the way it needs to, there’s no reason to migrate off it. The better move is modernizing what runs on top, converting fixed-format RPG to free-format and improving the user experience, rather than replacing the platform itself.
Enter Free-Format RPG
Free-format RPG ((fully free RPG IV, available since IBM i 7.1 and significantly expanded in later releases) strips away the column-dependent structure of legacy RPG and replaces it with clean, readable, modern syntax. It looks and feels far closer to languages like Java, C#, or Python, which matters enormously when you’re trying to convince a 26-year-old developer to work on your core business systems instead of walking away.
But free-format conversion alone is only part of the story. Converting poorly structured fixed-format code to free-format without refactoring can produce code that’s more readable on the surface but just as difficult to maintain underneath. Pairing conversion with real RPG refactoring, improving architecture, encapsulating business logic, modernizing database access patterns, and building in the ability to test, is what actually turns a maintenance liability into a modern, manageable application.
IBM i RPG Modernization: Key Benefits of Free-Format Conversion
Converting fixed-format RPG to free-format pays off immediately:
- Readability – Code reads top to bottom like modern programming languages, not left to right in fixed columns.
- Maintainability – Structured constructs (DOW, FOR, MONITOR, built-in functions) replace cryptic op-codes, making logic easier to trace and debug.
- Better Architecture – Refactoring alongside conversion improves encapsulation and separation of concerns, producing code that is genuinely easier to change, not just easier to read.
- Testability – Modernized code structures make unit testing practical for the first time in many shops, reducing risk for future changes and larger modernization efforts down the road.
- Talent Attraction – Developers can actually learn free-format RPG in weeks, not years, lowering the barrier for new hires and existing staff cross-training from other languages.
- Easier Integration – Free-format RPG plays much more naturally with modern tooling, APIs, version control systems, and CI/CD pipelines.
- Reduced Technical Debt – Every fixed-format program you convert and refactor is one less program that requires a dwindling pool of specialists to maintain.
Fresche Tools Built to Modernize RPG on IBM i
Fresche offers a full suite of tools purpose-built for this exact journey, each addressing a different stage of the modernization path. Together, these tools let organizations move from “we don’t fully understand our own applications” to “we have clean, modern, well-documented RPG” without ever leaving IBM i.
X-Analysis AI
Before you convert a single line of code, you need to understand what you actually have. X-Analysis AI provides deep static analysis across RPG, CL, and Db2 dependencies, giving teams a clear map of the application landscape and reducing the risk of surprises mid-project. X-Analysis AI also integrates with IDE-based code assistants and refactoring solutions, such as IBM Bob. Developers can use X-Analysis AI, our deterministic solution, to understand their applications first, then selectively regenerate code to modern languages, like free-format RPG using generative AI.
See how X-Analysis AI maps your applications
X-Elevate
For teams building new capabilities, X-Elevate is a template-driven development tool that generates modular, free-form RPG applications and APIs. Rather than simply converting old code, it helps developers build fresh, multi-layer applications, complete with RESTful APIs that expose Db2 files to web and mobile front ends, while working directly inside RDi.
X-Modernize AI
For large-scale legacy conversion, X-Modernize AI is Fresche’s AI-powered modernization factory. It automates the transformation of legacy RPG (and COBOL) into modern, cloud-ready code, including RPG to Java conversion and database modernization from DDS to DDL, all while preserving the original business logic that took decades to refine.
Modernization as a Service
For organizations that want a flexible, budget-friendly path, Fresche’s subscription-based Modernization as a Service delivers ongoing code transformation and web UI modernization at a pace and cost that fits the business, rather than forcing a single disruptive project. This model also serves as a natural entry point for incremental RPG modernization, allowing organizations to prioritize their most critical programs and expand scope over time without taking on large upfront risk.
Learn how Fresche’s Modernization as a Service works.
Rebadge365
Modernizing code is only half the equation. Rebadge365 addresses the talent side, helping organizations retain and transition critical IBM i knowledge as veteran RPG developers retire.
Modernize the Code. Keep the Platform.
This is the part that gets lost in a lot of modernization conversations: converting RPG to free-format doesn’t require moving off IBM i. It’s precisely the opposite pitch. This kind of IBM i application modernization lets organizations:
- Stay on the platform they trust: IBM i’s reliability, security, and total cost of ownership advantages remain untouched.
- Preserve business logic: Decades of accumulated business rules, edge cases, and institutional knowledge encoded in RPG stay exactly where they are, just in a more legible and maintainable form.
- Modernize incrementally: Conversion and refactoring can happen program by program, module by module, starting with the programs that are most business-critical or most painful to maintain, rather than as a risky big-bang rewrite.
- De-risk the transformation: Automated or semi-automated conversion tooling can transform fixed-format source into free-format equivalents while preserving tested, working logic, rather than starting from a blank page.
Your Fixed Format RPG Conversion Roadmap
Fresche typically starts new engagements with a free, no-obligation assessment, evaluating existing applications and outlining a tailored roadmap with scope, timeline, and cost ranges before any commitment is made. From there, a modernization path generally looks like this:
- Assessment
Inventory existing RPG programs, identify dependencies, and prioritize based on business criticality and maintenance pain. - Conversion and Refactoring
Use automated tooling to transform fixed-format RPG (and often embedded SQL, CL, and DDS) into clean, structured free-format RPG, combined with targeted refactoring to improve architecture and testability. - Validation and Testing
Regression test converted programs against existing behavior to confirm functional equivalence, and introduce unit testing practices for modernized code to reduce risk for future changes. - Enablement
Layer in modern development practices: source control, structured programming standards, and possibly a modern IDE experience. - Iterate
Expand modernization to APIs, web-enablement, or UI layers once the underlying code is clean and maintainable, all while IBM i keeps doing what it does best.
That roadmap is the mechanics. Here’s why it’s worth doing.
Convert Fixed Format RPG to Free Format: Start Here
Modernization doesn’t have to mean abandoning the platform that has reliably run your business for decades. Converting fixed-format RPG to free-format is a meaningful starting point, and the real payoff comes from combining that conversion with refactoring, improved architecture, and modern testing practices.
The result is readable, maintainable applications that attract developer talent and carry less long-term risk, all without leaving IBM i.
Not sure where to start? Talk to Fresche’s RPG modernization team for a free assessment and get a clear picture of what modernizing your code looks like, no commitment required.
Upcoming Blog Series:
This is the first installment in our ongoing IBM i RPG modernization blog series. Next up, we take a deeper look at the benefits of converting fixed-format RPG to free-format, including what changes, what improves, and why it matters for the developers and organizations who depend on these applications every day. Stay tuned.