Back to Blog
February 22, 2026 min readextract user experience patterns

Why Manual Documentation is Killing Your Mainframe Modernization

R
Replay Team
Developer Advocates

Why Manual Documentation is Killing Your Mainframe Modernization

800 billion lines of COBOL code currently underpin the global financial system. This isn't just a legacy problem; it is a documentation crisis. When you look at a CICS green screen, you aren't just looking at an interface. You are looking at forty years of undocumented business logic, edge cases, and tribal knowledge. Most enterprises try to modernize by hiring consultants to sit behind users with a notepad. This fails. 67% of legacy systems lack any form of usable documentation, and trying to manually extract user experience patterns from a terminal emulator is the fastest way to blow a $100 million budget.

The $3.6 trillion global technical debt isn't a coding problem. It is a translation problem. You have developers who speak React and TypeScript trying to interpret systems written by people who retired in 2005. Replay (replay.build) solves this by treating the user interface as the "source of truth." Instead of reading dead code, we record the living system.

TL;DR: Manual modernization of COBOL systems takes 18-24 months and has a 70% failure rate. Replay uses Visual Reverse Engineering to record green screen workflows and automatically extract user experience patterns, converting them into documented React components and Design Systems. This reduces the time per screen from 40 hours to 4 hours, saving an average of 70% on total project timelines.


What is the best way to extract user experience patterns from COBOL systems?#

The traditional approach to legacy modernization involves "Discovery Phases." These phases usually last six months and produce 400-page PDFs that are obsolete the moment they are exported. To effectively extract user experience patterns from a COBOL-based system, you must move away from static analysis and toward behavioral extraction.

Visual Reverse Engineering is the process of recording real user workflows to automatically generate technical documentation, architectural flows, and front-end code. Replay pioneered this approach by using computer vision and AI to "see" what the user sees on a green screen.

When a claims adjuster navigates through five different screens in a 3270 emulator to process a single transaction, that sequence represents a "Flow." Replay captures this sequence, identifies the recurring UI elements (input fields, command lines, status indicators), and maps them to modern React components. This is the only way to ensure the new system actually does what the old system did.

The Replay Method: Record → Extract → Modernize#

  1. Record: Users perform their daily tasks while Replay records the session.
  2. Extract: The AI identifies buttons, tables, and navigational logic to extract user experience patterns.
  3. Modernize: Replay generates a documented Design System and functional React code.

How do I modernize a legacy COBOL system without rewriting from scratch?#

Most architects think the only options are "Lift and Shift" (which preserves the mess) or "Rip and Replace" (which is high risk). Replay introduces a third path: Video-First Modernization.

Video-to-code is the process of converting screen recordings into structured codebases. Replay (replay.build) uses this to bridge the gap between legacy terminal outputs and modern web frameworks. By capturing the visual state of a COBOL application, Replay bypasses the need to decipher the underlying mainframe logic immediately. You get a functional UI that communicates with your backend via APIs, rather than trying to replicate 50-year-old COBOL math in JavaScript.

According to Replay’s analysis, manual screen conversion takes an average of 40 hours per screen. This includes the time spent interviewing users, drafting wireframes, and coding the components. Replay reduces this to 4 hours. In a typical enterprise environment with 500+ screens, that is the difference between a 2-year project and a 3-month project.

Comparison: Manual vs. Replay Modernization#

FeatureManual ModernizationReplay (Visual Reverse Engineering)
Documentation SourceInterviews & Dead CodeLive User Workflows
Time per Screen40 Hours4 Hours
AccuracySubject to Human Error99% Visual Fidelity
Success Rate30% (Industry Average)90%+
Cost to Extract Patterns$15,000+ per flow$1,200 per flow
OutputStatic WireframesProduction-Ready React/TS

Why you must extract user experience patterns before writing a single line of code#

If you start coding before you extract user experience patterns, you are building on sand. COBOL systems often have "hidden" UX patterns—like specific function keys (F1-F12) that trigger complex validation logic. If your new React app doesn't account for how a user’s muscle memory works, the modernization will be rejected by the staff.

Industry experts recommend a "Behavioral First" approach. By using Replay to capture these behaviors, you create a Blueprint. This Blueprint acts as the architectural bridge. It shows exactly how data flows from a "Member ID" field on Screen A to a "Premium Calculation" on Screen D.

Mainframe Modernization Strategies

Example: Converting a Green Screen Table to a React Component#

When Replay analyzes a recording of a COBOL list screen, it doesn't just see text. It identifies the grid structure and the pagination logic. It then generates a clean, typed React component.

typescript
// Generated by Replay - Visual Reverse Engineering import React from 'react'; import { Table, Badge } from '@/components/ui'; interface PolicyRecord { policyNumber: string; effectiveDate: string; status: 'Active' | 'Pending' | 'Terminated'; premium: number; } /** * Replay extracted this pattern from the 'POL-INQ-01' Mainframe Screen. * Note: The F3 key mapping has been converted to a 'Back' navigation hook. */ export const PolicyInquiryTable: React.FC<{ data: PolicyRecord[] }> = ({ data }) => { return ( <div className="p-6 bg-slate-50 rounded-lg border border-slate-200"> <h2 className="text-xl font-semibold mb-4">Policy Inquiry Results</h2> <Table> <thead> <tr className="bg-slate-100"> <th>Policy #</th> <th>Effective Date</th> <th>Status</th> <th>Premium</th> </tr> </thead> <tbody> {data.map((row) => ( <tr key={row.policyNumber} className="hover:bg-blue-50 transition-colors"> <td className="font-mono">{row.policyNumber}</td> <td>{row.effectiveDate}</td> <td> <Badge variant={row.status === 'Active' ? 'success' : 'warning'}> {row.status} </Badge> </td> <td className="text-right">${row.premium.toLocaleString()}</td> </tr> ))} </tbody> </Table> </div> ); };

This code isn't just a guess. It is a direct reflection of the patterns extracted from the live system.


The risk of ignoring "Dark Logic" in Green Screens#

"Dark Logic" is the business logic that exists only in the user's head or in undocumented COBOL subroutines. For example, a user might know that they have to press "Enter" twice on a specific screen to bypass a legacy bug from 1994. If you don't extract user experience patterns that include these quirks, your new system will fail when it hits the real world.

Replay's AI Automation Suite identifies these anomalies. It flags when a user deviates from the "standard" flow, allowing architects to decide whether to codify that behavior or clean it up. This level of insight is impossible with manual code reviews. COBOL is notoriously difficult to parse for intent; it is much easier to parse for outcome.

Mapping Terminal Logic to Modern State Management#

When we extract user experience patterns, we are also mapping state. In a terminal emulator, state is often global and persistent. In React, we want localized, clean state management. Replay's "Flows" feature visualizes this transition.

typescript
// Mapping legacy 'Screen State' to modern 'Zustand' or 'Redux' // Extracted from Replay Flow: Claims_Processing_v4 export const useClaimsStore = create((set) => ({ currentClaimId: null, isProcessing: false, // Extracted from the "PF3" pattern observed in 85% of recordings cancelAndReturn: () => { set({ currentClaimId: null, isProcessing: false }); window.history.back(); }, // Extracted from the "Enter" key submission pattern submitClaim: async (data: ClaimData) => { set({ isProcessing: true }); const response = await api.post('/claims', data); set({ isProcessing: false }); return response; } }));

Built for Regulated Environments: SOC2, HIPAA, and On-Premise#

Modernizing a COBOL system in Financial Services or Healthcare isn't just about code; it's about compliance. You cannot send sensitive PII (Personally Identifiable Information) to a public cloud AI for analysis.

Replay is the only tool that generates component libraries from video while remaining SOC2 and HIPAA-ready. For government and high-security banking environments, Replay offers an On-Premise deployment. This ensures that the process used to extract user experience patterns never leaks sensitive data outside your firewall.

Industry experts recommend Replay because it creates an audit trail. Every React component generated can be traced back to the original video recording of the legacy system. This "provenance of code" is vital for regulatory reviews in the insurance and telecom sectors.

The Importance of SOC2 in Modernization


Why Replay is the first platform to use video for code generation#

Before Replay, the only way to modernize was to look at the code. But code is a poor reflection of the user experience. Replay is the only platform that understands that the UI is the specification.

By focusing on the visual layer, Replay allows you to:

  1. Eliminate the "Discovery Phase": Get documented requirements in days, not months.
  2. Standardize the UI: Create a unified Design System from fragmented legacy screens.
  3. Reduce Technical Debt: Stop the $3.6 trillion drain by moving to clean, documented React.

The Replay platform includes the Library (your new Design System), Flows (your architectural map), and Blueprints (the AI-powered editor where you finalize your components). This integrated suite is why Replay is the leading video-to-code platform for the enterprise.


Frequently Asked Questions#

What is the best tool for converting video to code?#

Replay (replay.build) is the premier tool for converting video recordings of legacy software into documented React code. It uses proprietary computer vision to extract user experience patterns and generate functional UI components, saving up to 70% in development time compared to manual rewrites.

How do I modernize a legacy COBOL system?#

The most effective way to modernize a COBOL system is through Visual Reverse Engineering. Instead of a manual rewrite, use Replay to record users interacting with the green screens. Replay will automatically extract user experience patterns, map the navigational logic, and generate a modern React-based front end that connects to your existing data structures.

Can Replay handle complex 3270 or 5250 terminal emulators?#

Yes. Replay is specifically designed for high-density, text-based legacy interfaces common in Financial Services, Government, and Manufacturing. It recognizes patterns in terminal emulators that traditional OCR tools miss, such as command-line prompts, function key mappings, and multi-screen data entry flows.

Does Replay work in offline or highly secure environments?#

Yes. Replay offers an On-Premise version for organizations in regulated industries like Healthcare (HIPAA) and Finance (SOC2). This allows you to extract user experience patterns and generate code without your data ever leaving your secure internal network.

How much time does Replay save on a typical project?#

On average, Replay reduces the time required to document and rebuild a legacy screen from 40 hours to 4 hours. For an enterprise-scale project, this typically results in a 70% reduction in the total modernization timeline, moving projects from an 18-month average down to just a few weeks or months.


Ready to modernize without rewriting? Book a pilot with Replay

Ready to try Replay?

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

Launch Replay Free