Legacy System Integration: IBM i RPG Pilot Playbook

  • July 31, 2026
  • Ty Woods
  • 12 min read

Start with a strangler-fig pilot: route traffic through an API facade, extract one low-coupling module over several weeks with behavioral tests as your safety net, then expand wave by wave. That sequencing keeps production stable while you build momentum and evidence for the next funding conversation.

Your immediate next steps:

  • Trigger discovery first. Run an automated dependency map of your RPG source libraries before any architecture decisions. AS/Forward from Golden Path Digital parses IBM i RPG codebases and surfaces call stacks, dead code, and data file dependencies in a fraction of the time a manual audit takes.
  • Pick one pilot slice. Select a module with clear interfaces, low coupling, and high business visibility. Payroll calculation engines and order-entry APIs are common starting points.
  • Generate behavioral tests against the legacy system now, before touching a line of code. Those tests become your authority baseline for the entire program.

Pro Tip: QuantaPath AI can accelerate test scaffolding and workflow automation once your dependency map is in place. Never apply AI to code you haven’t mapped first.

Table of Contents

Why phased modernization beats a big-bang rewrite for IBM i systems

The evidence is consistent: incremental integration outperforms full rewrites on risk, cost, and time-to-value for enterprise IBM i environments. Big-bang rewrites routinely stall because they require freezing business logic in a specification document, then rebuilding it from memory. RPG programs that have run for 20 years carry embedded business rules that no specification captures completely.

Phased integration sidesteps that problem. You keep the legacy system authoritative while you extract, test, and validate one slice at a time. The strangler-fig pattern makes each wave reversible: if a module fails validation, you re-route traffic back to the legacy path without a production incident.

Common big-bang failure modes to avoid:

  • Data inconsistency between partially migrated tables and legacy files
  • Lost business knowledge when the original developers are no longer available
  • Scope creep that extends timelines past organizational patience
  • No rollback path once the legacy system is decommissioned

Pro Tip: Define exit criteria and rollback triggers before any code changes. “We’ll cut over when we’re confident” is not a criterion. “Mismatch rate below 0.1% over 72 hours of parallel run” is.

What integration patterns should you evaluate for legacy systems?

Four patterns cover the vast majority of IBM i modernization scenarios. Choosing the wrong one for a given subsystem is the most expensive early mistake a team can make.

Infographic comparing legacy integration patterns with timelines and use cases

Pattern Best When Typical Timeline Primary Deliverable
API wrapping Module has stable interfaces; business logic stays on IBM i a few weeks REST/JSON facade over RPG program calls
Strangler fig extraction Module is high-value, low-coupling, well-understood several weeks per wave Extracted service with behavioral test suite
Rehost / lift-and-shift Compliance or infrastructure driver; no logic change needed a few weeks Same code, new platform
Rewrite / rebuild Module is small, well-specified, and the legacy version is unmaintainable multiple weeks Net-new service with full test coverage

Change data capture (CDC), often implemented with Kafka-based streaming, is frequently layered on top of the strangler-fig pattern to sync legacy databases with modern data stores while writes remain on the legacy DB. That combination lets modern consumers read from a replicated store without touching the IBM i write path.

Decision checklist before selecting a pattern:

  • How tightly coupled is this module to adjacent RPG programs?
  • Does it own its data, or does it share physical files with other programs?
  • Is the interface stable enough to wrap, or does it change frequently?
  • What is the read/write ratio, and who is the authoritative writer?

IBM i / RPG checks you must complete before touching code

Discovery for IBM i is not a generic audit. RPG programs interact with the system in ways that have no direct analog in modern architectures: physical and logical files, data queues, activation groups, spool files, and job schedulers all carry integration dependencies that a surface-level review misses.

Person reviewing RPG source library inventory at desk

Artifacts to collect before your pilot:

Artifact Why It Matters
Source library inventory Confirms source-to-object parity; flags programs with no source
Call stack maps Reveals hidden dependencies between programs
DDS / DDL file specs Documents physical file layouts and key structures
Job scheduler entries Identifies batch flows that must be replicated or rerouted
Spool file usage Surfaces output dependencies that break silently post-migration
Compile and test environment Confirms you can rebuild and validate before touching production

RPG code analysis with AS/Forward automates the call-stack mapping and dead-code detection that would otherwise take weeks of manual review. The output feeds directly into your behavioral test plan and extraction sequencing.

Pro Tip: Run an automated dead-code pass before scoping your pilot. Programs with zero callers and no scheduler entries are safe candidates for decommission, not migration, which shrinks your blast radius immediately.

How do behavioral tests prove your integration is safe?

Behavioral tests generated against the legacy system are the single most reliable verification step in any modernization program. They capture what the system actually does, not what the documentation says it does.

  1. Generate characterization tests against the live legacy program. Feed it production-representative inputs and record every output, including edge cases, rounding behaviors, and error codes.
  2. Require the modernized slice to pass the same test suite before it is considered a candidate for cutover. The legacy system is the authority; the new implementation must match it.
  3. Run parallel or dark-launch traffic once the test suite passes. Parallel runs convert “we think it’s equivalent” into a measured mismatch rate.
  4. Set a concrete mismatch threshold as your cutover gate. A number like “fewer than 5 mismatches per 10,000 transactions over 48 hours” is a decision, not a guess.

AI tools can accelerate test generation and candidate code translation, but AI translation accuracy for legacy-to-modern code runs at roughly 70–80%. The remaining 20–30% of edge-case business logic requires human review. QuantaPath AI is most valuable in the scaffolding phase; engineers must own the validation gate.

Pro Tip: Set your error budget before the parallel run starts. If you define “acceptable” after you see the numbers, you’re rationalizing, not governing.

Governance controls that prevent integration sprawl

Governance is an early deliverable, not a cleanup task. Without it, each wave adds point-to-point integrations that compound into a maintenance liability that costs more than the original modernization.

  1. Assign an integration owner for every service boundary. Ownership means accountability for SLOs, not just code.
  2. Maintain an integration registry. Every API contract, routing rule, and facade endpoint gets documented before it goes to production.
  3. Define SLOs for the routing layer at the start of the program. Latency, error rate, and availability targets for the facade prevent silent degradation.
  4. Establish change-control rules for API contracts. Breaking changes require a deprecation window, not a hotfix.

Security and audit checklist:

  • Rotate secrets and service account credentials on a defined schedule
  • Log every call through the facade with enough context to reconstruct a transaction
  • Enforce data quality gates at the integration boundary, not downstream

The most common sequencing mistake, confirmed by best-practice guidance, is choosing a technology before defining business outcomes. Lock the governance model and the outcome metrics first.

What does a realistic IBM i pilot timeline and budget look like?

An API-wrap pilot for a single module typically completes in 4–6 weeks, with a full portfolio migration running 12–24 months across sequential waves.

Phase Duration Key Milestone
Discovery and dependency mapping Weeks 1–2 Dependency map, dead-code report, pilot module selected
API wrapper build and behavioral tests Weeks 3–5 Facade live in staging; test suite passing
Parallel run and cutover decision Week 6 Mismatch rate at or below threshold; cutover approved
Wave 2 scoping Weeks 9–10 Next module selected; ROI from Wave 1 documented

Primary cost drivers:

  • Discovery effort (manual vs. automated; AS/Forward reduces this significantly)
  • Test automation build-out for characterization and contract tests
  • Dual-run hosting costs during the parallel run window
  • Data migration tooling if physical files require format conversion
  • Staffing: RPG-fluent engineers are scarce, and their time is the most constrained resource

For teams planning integrations that touch downstream operations systems, reviewing work order software options can clarify what modern integration targets look like on the receiving end.

How Golden Path Digital supports your legacy system integration pilot

Golden Path Digital’s tooling is purpose-built for the IBM i / RPG modernization sequence described in this article. The products map directly to pilot tasks.

Capability Product Pilot Task
RPG source parsing and call-stack mapping AS/Forward Discovery, dependency map, dead-code report
Behavioral test generation support QuantaPath AI Characterization test scaffolding
CRM and workflow automation QuantaPath AI Post-migration process automation
Laravel framework upgrade automation Laravel Ascend Modernizing Laravel-based integration layers

A typical pilot engagement includes:

  • Artifact collection and source library inventory
  • AS/Forward analysis producing a full dependency map and dead-code report
  • Behavioral test pack covering the pilot module’s production input/output pairs
  • Live parallel run with mismatch tracking and a documented cutover decision

The IBM i modernization assessment is the natural starting point for teams that need a scoped discovery before committing to a full pilot.

Key Takeaways

Phased legacy system integration with behavioral tests and dependency mapping is the lowest-risk path for IBM i RPG modernization, delivering a first API-wrap win in 4–6 weeks and a full portfolio migration in 12–24 months.

Point Details
Map before you move Run automated RPG dependency mapping before selecting any integration pattern or pilot module.
Strangler-fig first An API-wrap pilot delivers measurable integration value in 4–6 weeks with a reversible routing layer.
Behavioral tests are the authority Generate characterization tests against the live legacy system before touching a single line of code.
Governance from day one An integration registry and SLOs for the routing layer prevent sprawl that compounds across every wave.
Golden Path Digital AS/Forward and QuantaPath AI accelerate discovery, test scaffolding, and automation for IBM i pilots.

What the pilots that succeed actually have in common

The teams that move through IBM i modernization on a schedule, rather than on a prayer, share one habit: they interview the operators before they read the code. The RPG programs that have run for decades were written by people who understood the business deeply. The source tells you what the program does; the operators tell you why it does it that way, and what breaks silently when you change it. That context is what behavioral tests capture and what a pure code analysis misses.

Exit criteria are the other differentiator. A concrete threshold like “fewer than 3 output mismatches per 10,000 parallel-run transactions over 48 hours” turns a cutover decision from a judgment call into a measurement. Teams without that definition spend weeks in committee. Teams with it cut over on Tuesday and start scoping Wave 2 on Wednesday.

Ready to scope your IBM i pilot?

Golden Path Digital gives IBM i teams a faster path from dependency map to working API facade, without the months of manual discovery that slow most programs down. AS/Forward parses your RPG source libraries and produces the call-stack maps and dead-code reports your architects need to scope a pilot with confidence. QuantaPath AI then accelerates test scaffolding and post-migration workflow automation, keeping your team focused on the decisions that require human judgment.

Golden Path Digital

The pilot scope is straightforward: artifact collection, AS/Forward analysis, a behavioral test pack for your chosen module, and a parallel run with documented cutover criteria. You leave with a dependency map, a working facade, and a funded case for Wave 2. Start with the IBM i RPG modernization framework to see exactly what the engagement covers, or go directly to the RPG code analysis tool to understand what AS/Forward surfaces in your codebase.

Useful sources

  • Strangler Fig Pattern (Microsoft Azure Architecture Center): The authoritative reference for incremental extraction with reversible routing. Read this before scoping any pilot wave.
  • Legacy System Modernization Playbook (BrotCode): Practical sequencing guidance covering CDC, timeline benchmarks, and data workstream design.
  • Behavioral Test Generation for Modernization (arXiv): Research backing for characterization tests as the verification baseline. Useful for teams building their testing governance policy.
  • Legacy System Integration Best Practices (r4.ai): Governance and outcome-first sequencing guidance; directly applicable to the integration registry and SLO framework.
  • RPG Modernization: Bridging IBM i to Modern Architecture (Golden Path Digital): IBM i–specific patterns and common pitfalls for architects planning extraction waves.
  • Legacy System Migration: A Practical Guide for IT Leaders (Golden Path Digital): Discovery, prioritization, and incremental migration tactics for IT leadership teams.

FAQ

What is the safest first step in legacy system integration for IBM i?

Run an automated dependency map of your RPG source libraries before making any architecture decisions. AS/Forward from Golden Path Digital produces call-stack maps and dead-code reports that scope your pilot safely.

How long does an IBM i API-wrap pilot typically take?

An API-wrap pilot for a single module typically completes in 4–6 weeks, with a full portfolio migration running 12–24 months across sequential waves.

What are behavioral tests and why do they matter for integrating legacy systems?

Behavioral tests capture what the legacy system actually does by recording production-representative inputs and outputs. The modernized component must pass the same tests before cutover, converting equivalence from an assumption into a measurement.

How do you prevent integration sprawl across a multi-wave modernization program?

Maintain an integration registry from day one, assign an owner to every service boundary, and define SLOs for the routing layer before the first wave goes live. Governance established early costs far less than governance retrofitted after sprawl has set in.

Where does AI help most in legacy system modernization?

AI tools like QuantaPath AI are most effective for test scaffolding, documentation generation, and candidate code translation. AI translation accuracy for legacy-to-modern code runs at roughly 70–80%, so human engineers must own the validation of edge-case business logic.