Free 30-minute AI & automation audit with a senior engineer. You keep the notes. Book yours

Software DevelopmentBackend Development 20 Nov 2026

IBM i (AS/400) Modernization Roadmap Without a Risky Rewrite

A step-by-step IBM i modernization roadmap: APIs over RPG and Db2 for i, React front ends, the strangler pattern, safe data access and testing, no rewrite.

You can modernize an IBM i (AS/400) system without rewriting it. The lower-risk roadmap keeps your RPG, COBOL and Db2 for i logic running, puts a governed REST API layer in front of it, replaces green screens with web front ends one journey at a time, and only retires backend code once something proven has replaced it.

That is the short answer. The rest of this article is the longer one: the phases we recommend, the integration options on IBM i, how to test a system nobody fully understands any more, and the mistakes that turn a modernization into a multi-year rewrite.

Why do IBM i rewrites fail so often?

Most IBM i systems are not broken. They run order entry, inventory, billing or policy administration reliably, often for decades, and the business rules inside them have been refined through thousands of small changes. That is exactly what makes a full rewrite dangerous:

  • The specification is the code. Edge cases, tax rules and customer exceptions live in RPG programs and CL scripts, not in documents. A rewrite has to rediscover all of them.
  • The business cannot pause. While the new system is built, the old one keeps changing. The target moves.
  • Big-bang cutovers concentrate risk. Data migration, retraining and new bugs all land on the same weekend.
  • The people who know the system are needed for both. Your IBM i team has to keep production running and explain it to the rewrite team at the same time.

The real problems are usually narrower: green screens that new staff struggle with, no API for web portals, mobile apps or partners, and a shrinking pool of people who can change the code. Those can be solved without replacing the backend.

What does a low-risk IBM i modernization roadmap look like?

We split the work into six phases. Each one delivers something users or systems can use, and each one can stop without leaving you worse off.

Phase 1: Discovery and inventory

Map what exists and what hurts:

  • Users, roles and the green-screen journeys they run most often.
  • Programs, service programs, CL jobs and the files or tables they touch.
  • Existing integrations: FTP drops, data queues, EDI, batch jobs.
  • Who on your team owns which part, and what they are worried about.

The output is a ranked list of journeys, scored by business value and technical risk. Pick a first journey that matters to users but does not touch your most fragile code.

Phase 2: Design the API layer with your IBM i team

Agree API contracts before writing code. The most important rule is to design coarse-grained, use-case-shaped APIs. One call such as GET /orders/{id}/summary should return what a screen needs, backed by one program call or one well-indexed query. A chatty design that makes ten small calls per screen will put load on the system and frustrate everyone.

Agree on connection pooling limits, caching rules, pagination, timeouts and which programs are safe to call concurrently.

Phase 3: Build the first journey end to end

Deliver one complete path: a React (or Angular) screen, a Java Spring Boot API, and a call into an existing IBM i program or query. Put it in front of real users. This phase proves the architecture, the security model, the deployment pipeline and the working relationship between your IBM i experts and the new team.

Phase 4: Strangle journey by journey

Apply the strangler pattern: new front ends and APIs gradually take over journeys while the green screens for those journeys are retired. Routing decides which users or functions go to the new path, so you can roll forward and back.

Users / partners / mobile apps
            |
     API gateway + auth (OAuth2 / JWT)
            |
   Java Spring Boot API layer  --- cache, rate limits, audit
            |
  ILE program calls | stored procedures | SQL views
            |
      RPG / COBOL / CL  +  Db2 for i   (unchanged system of record)

Each new API is reusable. The order lookup built for the staff portal also serves the customer portal and the mobile app.

Phase 5: Open up the data safely

Once APIs cover the main journeys, give reporting, analytics and AI projects a governed way to read data without querying production tables directly (see the data section below).

Phase 6: Retire or refactor backend code selectively

Only now consider replacing backend logic, and only where there is a clear reason: a module that changes constantly, a skill gap you cannot fill, or a vendor package going out of support. Because every caller now goes through the API layer, you can reimplement one program behind an unchanged contract and compare results before switching.

How do you connect modern apps to RPG and Db2 for i?

Integrate at the program and data layer. Do not screen-scrape: it breaks whenever a screen changes and hides errors.

Option How it works Good for Watch out for
JDBC with JTOpen (JT400) Java connects to Db2 for i over JDBC Reads, reporting views, simple writes Bypassing business rules that live in RPG
ILE program calls Java calls an RPG or COBOL program with parameters through the IBM Toolbox for Java Reusing existing business logic as-is Parameter layouts, error handling, job and library list setup
External stored procedures A Db2 for i procedure wraps an existing program, callable over SQL Clean contracts, one connection type for reads and logic Needs DDL and testing on the IBM i side
IBM Integrated Web Services (IWS) Exposes ILE programs as REST or SOAP services on the IBM i itself Teams that prefer to host services on IBM i Less flexibility for caching, auth and versioning
Data queues and messaging Asynchronous hand-off between IBM i jobs and external services Decoupled, high-volume or batch flows Monitoring and replay need to be built

A common and tidy approach is to wrap an existing RPG program as an external stored procedure, then call it from Spring:

CREATE OR REPLACE PROCEDURE ORDERLIB.GET_ORDER_STATUS (
  IN  ORDER_NO CHAR(10),
  OUT STATUS   CHAR(2)
)
  LANGUAGE RPGLE
  EXTERNAL NAME 'ORDERLIB/ORDSTSR'
  PARAMETER STYLE GENERAL;
SimpleJdbcCall call = new SimpleJdbcCall(jdbcTemplate)
    .withSchemaName("ORDERLIB")
    .withProcedureName("GET_ORDER_STATUS");

Map<String, Object> out = call.execute(Map.of("ORDER_NO", orderNo));
String status = (String) out.get("STATUS");

The RPG program does not change. The API layer adds validation, authentication, caching, logging and a documented OpenAPI contract on top.

What about the front end?

Replace 5250 screens with React or Angular applications designed around tasks, not around the old screen layout. Some practical points:

  • Do not copy the green screen. A five-screen sequence often becomes one form with inline validation. Sit with users before designing.
  • Keep keyboard speed. Power users who type fast on green screens will resist a mouse-only UI. Support keyboard shortcuts and sensible tab order.
  • Validate early on the client and authoritatively on the server. The IBM i program stays the final judge of business rules.
  • Plan for mixed operation. For months, some staff will use new screens and others old ones. Both must see the same data immediately, which is natural when both call the same backend.

How should you handle data access and reporting?

Direct queries from many new applications against production Db2 for i tables are a common cause of performance problems and accidental coupling. Better options:

  • SQL views over legacy physical files, with clear column names, give new consumers a stable interface even if the underlying file layout is old.
  • Read replicas or change data capture, driven from journaling, can stream changes to a separate analytics store so reporting never competes with transactions.
  • Field-level decisions on sensitive data. Decide which personal or financial fields leave the IBM i at all, and mask the rest.
  • Character encoding. IBM i data is often EBCDIC with specific CCSIDs. Test names, addresses and special characters early, especially for non-English data.

How do you test a legacy system nobody fully understands?

Testing is where modernization projects earn or lose trust.

  1. Characterization tests. Before changing anything, record what the current programs return for a wide set of real inputs. These tests describe current behavior, right or wrong, and protect it.
  2. Contract tests on every API. Each endpoint has a documented contract, and tests check it on every build.
  3. Parallel runs. When a new path replaces an old one, run both for a period and compare results automatically. Investigate every difference before switching.
  4. Performance tests against IBM i limits. Simulate peak load through the API layer and watch CPU, job counts and lock waits on the IBM i, with your operations team.
  5. User acceptance on real journeys, with the people who use the green screens today.

Common pitfalls

  • Starting with the most complex module “to prove the approach.” Start with something valuable but contained.
  • Building one API per screen field instead of per use case.
  • Leaving the IBM i team out of design decisions. They know where the risks are.
  • Skipping observability. The new layer needs monitoring, tracing and alerting from day one, ideally on a stack such as Prometheus and Grafana.
  • Treating security as a later phase. OAuth2, least-privilege service profiles on the IBM i and audit logging belong in the first journey.

From our projects

We want to be clear about what our proof looks like. Our IBM i modernization approach is built on the API and experience engineering we run in production on other platforms:

  • FlexySure, a digital insurance platform for East Africa, runs a React front end over idempotent claims and payment APIs with M-Pesa callback reconciliation. That is the same kind of API and experience layer an IBM i modernization needs. Only the system of record behind it differs.
  • BricksLedger runs parallel v1 and v2 API namespaces so the platform can change without breaking a live Android app, which is the versioning discipline a strangler approach depends on.
  • On Zylon, documented database optimization, connection-pool fixes and self-hosted Prometheus, Grafana and Loki observability keep a large production system healthy.

If your core does not run on IBM i but has the same problem, our broader application modernization work follows the same module-by-module approach.

How much does IBM i modernization cost?

We do not publish prices, because the drivers differ widely between estates:

  • How many journeys and screens you want to replace, and in what order.
  • Whether existing programs can be called cleanly or need small wrappers first.
  • The quality of documentation and the availability of your IBM i experts.
  • Security, audit and hosting requirements for the new layer.
  • Whether you need analytics or partner APIs in the same program of work.

A fixed-scope first journey gives you a real number for the rest, based on your own system.

If you would like a second opinion on your roadmap, we offer a free 30-minute review of your IBM i estate and the journeys that hurt most. Contact us to set it up. We are happy to sign an NDA before looking at system details.

FAQ

Do we need to rewrite RPG to modernize IBM i?

No. You can keep RPG, COBOL and CL logic in place and expose it through APIs, then modernize screens and integrations around it. Rewrite individual modules later only where there is a specific reason.

What is the strangler pattern in IBM i modernization?

It means replacing a system gradually. New APIs and front ends take over one journey at a time, routing sends users to the new path, and the old green screens for that journey are retired, while the backend keeps running.

Will a new API layer slow down our IBM i?

Not if it is designed for IBM i. Use coarse-grained APIs, connection pooling, caching and pagination agreed with your IBM i team, and load-test before go-live.

Can we move IBM i data to the cloud for analytics?

Yes. Change data capture driven from journaling, or scheduled extracts through SQL views, can feed a cloud warehouse while the IBM i remains the system of record. Decide which sensitive fields leave the system before you start.

How long does the first phase take?

It depends on the journey and how easy the underlying programs are to call. Pick a contained, valuable journey so the first release is small enough to ship, learn from and estimate the next phases with real data.

Free AI audit Let’s talk