Back to Blog
February 4, 20268 min readModernizing IBM i

Modernizing IBM i (AS/400) Green Screens for the Modern Web Experience

R
Replay Team
Developer Advocates

The $3.6 trillion global technical debt isn't a theoretical problem—it’s a physical weight sitting in your data center, likely running on an IBM i (AS/400) system that your business depends on but no one fully understands. For decades, these systems have been the backbone of financial services, manufacturing, and logistics. But today, the "green screen" is no longer just a UI limitation; it is a talent bottleneck, an integration wall, and a primary driver of operational risk.

TL;DR: Modernizing IBM i systems fails when you attempt a "Big Bang" rewrite; the most efficient path is using Visual Reverse Engineering to extract business logic and UI components directly from user workflows, reducing modernization timelines from years to weeks.

The IBM i Modernization Trap: Why 70% of Rewrites Fail#

Most enterprise architects approach modernizing IBM i by attempting a total rewrite. They hire a team of consultants to perform "archaeology"—digging through millions of lines of undocumented RPG or COBOL code to understand business rules that were written before the current engineering team was born.

The statistics are grim: 70% of legacy rewrites fail or significantly exceed their timelines. The average enterprise rewrite takes 18 to 24 months, and by the time it’s finished, the business requirements have already shifted. Furthermore, 67% of these legacy systems lack any meaningful documentation, leaving developers to guess at the logic hidden within the 5250 protocol streams.

Manual modernization is a resource sink. On average, manually recreating a single legacy screen for the web takes 40 hours. When you multiply that by the hundreds or thousands of screens in a typical ERP or core banking system, the math simply doesn't work.

The Comparison: Three Paths to the Web#

ApproachTimelineRiskCostDocumentation
Big Bang Rewrite18-24 monthsHigh (70% fail)$$$$Manual / New
Screen Scraping3-6 monthsLow (Brittle)$$Non-existent
Strangler Fig12-18 monthsMedium$$$Partial
Replay (Visual Extraction)2-8 weeksLow$Automated & Visual

Beyond Screen Scraping: The Power of Visual Reverse Engineering#

For years, the only alternative to a rewrite was "screen scraping"—wrapping the 5250 stream in a web interface. This is a band-aid, not a solution. It doesn't solve the underlying technical debt, and it doesn't provide a modern architecture.

Replay introduces a new category: Visual Reverse Engineering. Instead of reading code or wrapping old protocols, Replay records real user workflows as they navigate the IBM i system. It treats the video and the interaction data as the "source of truth."

By recording a user performing a "Create Purchase Order" workflow, Replay’s AI Automation Suite identifies the data inputs, the state changes, and the underlying business logic. It then generates documented React components and API contracts. You aren't just changing the skin; you are extracting the soul of the application into a modern stack.

💰 ROI Insight: Moving from a manual 40-hour-per-screen extraction to a 4-hour automated extraction with Replay represents a 90% reduction in engineering labor costs.


Step-by-Step: Modernizing IBM i Workflows with Replay#

To move from a black-box AS/400 system to a documented, modern React codebase, follow this architectural framework.

Step 1: Workflow Recording and Interaction Capture#

The first step isn't looking at code; it's looking at usage. Identify the "Golden Paths"—the 20% of screens that handle 80% of the business value. Using Replay, record a subject matter expert (SME) executing these paths.

Replay captures:

  • The visual state of the green screen.
  • Every keystroke and function key (F1-F24).
  • The latency and response patterns of the legacy back-end.
  • Data validation rules enforced by the UI.

Step 2: Automated Component Extraction#

Once the workflow is recorded, Replay’s AI analyzes the recording to identify patterns. It recognizes subfiles (the IBM i version of tables), command lines, and input fields.

It then generates a clean, modular React component that mirrors the functionality but utilizes your modern Design System.

typescript
// Example: Generated React component from an IBM i "Customer Inquiry" screen import React, { useState, useEffect } from 'react'; import { Table, Button, Input, Card } from '@/components/ui'; // Your Design System interface CustomerData { id: string; name: string; balance: number; status: 'Active' | 'Hold'; } export function CustomerInquiryMigrated() { const [customers, setCustomers] = useState<CustomerData[]>([]); const [searchQuery, setSearchQuery] = useState(''); // Logic extracted from F4 (Prompt) and Enter key behaviors const handleSearch = async (query: string) => { // Replay generated this API contract based on legacy screen behavior const response = await fetch(`/api/v1/legacy/customer-search?q=${query}`); const data = await response.json(); setCustomers(data); }; return ( <Card title="Customer Inquiry"> <div className="flex gap-4 mb-4"> <Input placeholder="Enter Customer ID..." onChange={(e) => setSearchQuery(e.target.value)} /> <Button onClick={() => handleSearch(searchQuery)}>Search (Enter)</Button> </div> <Table data={customers} columns={['id', 'name', 'balance', 'status']} /> <div className="mt-4"> <Button variant="secondary">Exit (F3)</Button> </div> </Card> ); }

Step 3: Generating API Contracts#

The biggest hurdle in modernizing IBM i is the lack of a modern API layer. Most systems rely on direct database access or Program Calls (PCML).

Replay observes the data flow during the recording and automatically generates an OpenAPI/Swagger specification. This creates a "contract" between your new React frontend and the legacy backend, allowing you to build a middleware layer (often in Node.js or Java) that communicates with the IBM i via REST instead of 5250 terminal emulation.

yaml
# Generated API Contract for Legacy Order Entry openapi: 3.0.0 info: title: IBM i Order Entry Bridge version: 1.0.0 paths: /orders: post: summary: Extracted from Screen "ORD100" parameters: - name: customer_id in: query required: true schema: type: string responses: '200': description: Order Created Successfully

Step 4: Technical Debt Audit and Documentation#

Because 67% of legacy systems lack documentation, the final step is generating the "Blueprints." Replay provides a visual flow of the entire architecture. This isn't just a screenshot; it’s a living document that maps every screen transition and data dependency.

⚠️ Warning: Do not attempt to modernize the entire system at once. Use the Replay Library to build a shared design system first, ensuring consistency across the migrated screens.


Why Visual Reverse Engineering Beats Manual Archaeology#

When you manually modernize, you are prone to "Logic Drift." A developer might misinterpret an RPG indicator or a specific IBM i quirk (like how decimal positions are handled in packed data).

Replay eliminates this by using the Video as the Source of Truth. If the legacy system showed a specific error message when a credit limit was exceeded, Replay captures that exact behavior and ensures the new React component handles it identically.

Key Features of the Replay Platform:#

  • Flows (Architecture): Automatically map out how users navigate from screen to screen.
  • Blueprints (Editor): Modify the extracted logic before generating code.
  • AI Automation Suite: Convert legacy "Subfiles" into modern, sortable, searchable data grids.
  • SOC2 & HIPAA-Ready: Built for regulated industries like Finance and Healthcare where IBM i is most prevalent.

📝 Note: For organizations in highly regulated sectors, Replay offers an On-Premise version to ensure that sensitive data never leaves your secure environment during the extraction process.

The Future Isn't Rewriting—It's Understanding#

The "Future of the Enterprise" isn't found in a $50 million, three-year rewrite project that has a 30% chance of succeeding. The future is in understanding what you already have and transitioning it to modern patterns with surgical precision.

By using Replay, companies are seeing an average 70% time savings. Projects that were slated for 18 months are being delivered in weeks. We are moving from the era of "Software Archaeology" to the era of "Visual Reverse Engineering."

Frequently Asked Questions#

How long does legacy extraction take?#

While a manual rewrite takes 40 hours per screen, Replay reduces this to approximately 4 hours. A complex workflow of 20 screens can be fully documented and converted into React components in less than two weeks.

What about business logic preservation?#

Replay captures the observable business logic. By recording multiple edge cases in the workflow, the AI identifies validation rules, conditional formatting, and state transitions that are often buried in RPG source code. This ensures the new system behaves exactly like the old one, reducing the need for extensive UAT (User Acceptance Testing).

Can Replay handle custom IBM i configurations?#

Yes. Since Replay operates at the interaction layer, it is agnostic to the specific version of OS/400 or the flavor of RPG (III, IV, Free-form) being used. If it can be displayed in a terminal emulator, it can be reverse-engineered.

Does this replace my developers?#

No. Replay is a force multiplier for your Enterprise Architects and Senior Devs. It handles the "grunt work" of extraction and documentation, allowing your team to focus on high-value tasks like system integration and new feature development.


Ready to modernize without rewriting? Book a pilot with Replay - see your legacy screen extracted live during the call.

Ready to try Replay?

Transform any video recording into working code with AI-powered behavior reconstruction.

Launch Replay Free