PL/I Rating Engines: The $3.6 Trillion Technical Debt Trap
The insurance industry is currently held hostage by code written before the internet existed. In the basement of almost every Tier-1 carrier sits a mainframe running PL/I (Programming Language One) code that manages the core of the business: the rating engine. These engines are not just calculators; they are the cumulative repository of forty years of actuarial logic, regulatory compliance, and edge-case handling.
When a carrier attempts to modernize, they hit a wall. Manual extraction of these 15-step logic sequences takes an average of 40 hours per screen, and with 67% of legacy systems lacking any up-to-date documentation, the risk of "breaking the math" is catastrophic. This is why 70% of legacy rewrites fail or exceed their timelines.
TL;DR:
- •Legacy PL/I rating engines contain complex, undocumented 15-step logic that is nearly impossible to migrate manually without errors.
- •The global technical debt in insurance contributes to a $3.6 trillion problem.
- •Replay uses Visual Reverse Engineering to capture these workflows, reducing modernization time by 70%.
- •By recording real user workflows, Replay converts legacy UI outputs into documented React components and clean TypeScript logic.
The 15-Step Complexity of Insurance Rating Engines#
An insurance rating engine is a black box. You input a driver’s age, a zip code, and a vehicle type; it spits out a premium. But between the input and the output lies a 15-step calculation sequence that has been patched, modified, and appended since the 1980s.
According to Replay’s analysis, these steps typically include:
- •Base Rate Retrieval: Fetching the foundational state-filed rate.
- •Territory Factoring: Applying multipliers based on geographic risk.
- •Class Rating: Assessing the risk profile of the insured (age, gender, marital status).
- •Vehicle Symbol Calibration: Adjusting for the specific make/model safety and repair costs.
- •Violation Surcharges: Layering in points from MVR (Motor Vehicle Record) reports.
- •Multi-Policy Discounts: Calculating cross-product price reductions.
- •Safety Equipment Credits: Adjusting for anti-lock brakes, airbags, and telematics.
- •Loyalty/Tenure Adjustments: Applying "stay" incentives.
- •Prior Carrier Limits: Assessing the risk based on previous coverage levels.
- •Education/Occupation Tiers: Applying actuarial weights to professional categories.
- •Expense Constants: Adding fixed administrative costs.
- •State Taxes and Fees: Layering in mandatory regulatory levies.
- •Rounding and Truncation: Handling the specific decimal precision required by state law.
- •Installment Fee Calculation: Determining the cost of monthly vs. annual payments.
- •Final Premium Binding: The final validation of all previous 14 steps.
Insurance rating engines capturing this level of detail manually is a recipe for disaster. If a developer misses a single "round down" instruction in step 13, the entire book of business could be non-compliant with state filings.
Why Manual Extraction Fails#
Industry experts recommend moving away from manual "code-digging." When a business analyst sits with a green-screen terminal trying to document PL/I logic, they are looking at thousands of lines of
PROCDECLAREGET DATAThe primary issue is that the source code often doesn't match the current business reality. Over decades, "hotfixes" and "Z-patches" are applied directly to production environments. The documentation—if it ever existed—is long gone.
| Metric | Manual Migration | Replay Visual Reverse Engineering |
|---|---|---|
| Time per Screen | 40+ Hours | 4 Hours |
| Documentation Accuracy | 60-70% (Human Error) | 99% (Visual Proof) |
| Logic Capture | Manual Code Audit | Automated Workflow Recording |
| Average Timeline | 18-24 Months | 4-8 Weeks |
| Cost of Failure | High (Logic Mismatch) | Low (Verifiable Outputs) |
Video-to-code is the process of recording a user interacting with a legacy system and using AI to translate those visual transitions and data outputs into modern, documented code structures.
Insurance Rating Engines Capturing: The Replay Methodology#
Replay bypasses the need to read ancient PL/I source code by focusing on the "Visual Truth." By recording a series of test cases—ranging from the standard driver to the high-risk edge case—Replay captures how the UI responds to specific data inputs.
Because the UI is the final representation of the underlying PL/I logic, capturing the UI's behavior allows Replay to reconstruct the business rules.
Step 1: Record the Workflow#
A subject matter expert (SME) records a session of them entering data into the legacy terminal. They walk through the 15 steps of the rating engine. Replay’s engine captures every state change, every data validation, and every calculation result displayed on the screen.
Step 2: Architecture Mapping (Flows)#
The platform analyzes the recording to create "Flows." This represents the architectural map of the rating engine. It identifies where step 4 (Vehicle Symbols) ends and step 5 (Violations) begins.
Step 3: Component Generation (Library)#
Replay converts the visual elements into a modern Design System. Instead of a "green screen" text field, you get a React-based, accessible, and themed input component that retains the original validation logic.
Step 4: Logic Documentation (Blueprints)#
This is where insurance rating engines capturing becomes automated. Replay generates "Blueprints"—the underlying technical documentation that explains the why behind the what.
Modernizing Financial Workflows often requires this level of precision to satisfy SOC2 and HIPAA requirements.
From PL/I to React: A Practical Example#
In a legacy PL/I environment, a territory adjustment might look like this:
pli/* LEGACY PL/I FRAGMENT */ DCL TERRITORY_CODE CHAR(3); DCL BASE_PREMIUM FIXED DEC(9,2); DCL ADJ_FACTOR FIXED DEC(5,4); IF TERRITORY_CODE = '012' THEN ADJ_FACTOR = 1.1520; ELSE IF TERRITORY_CODE = '045' THEN ADJ_FACTOR = 0.9850; FINAL_PREMIUM = BASE_PREMIUM * ADJ_FACTOR;
When Replay captures this interaction, it doesn't just give you a raw string; it generates a structured TypeScript component that handles the rating logic within a modern React framework.
typescript// MODERN REACT/TYPESCRIPT GENERATED BY REPLAY import React from 'react'; import { useRatingLogic } from './hooks/useRatingLogic'; interface RatingProps { basePremium: number; territoryCode: string; } export const TerritoryAdjustment: React.FC<RatingProps> = ({ basePremium, territoryCode }) => { const { calculateAdjustment } = useRatingLogic(); // Replay captured the 1.1520 and 0.9850 factors from visual state changes const adjustedPremium = calculateAdjustment(basePremium, territoryCode); return ( <div className="p-4 border rounded-lg bg-slate-50"> <h3 className="text-lg font-bold">Step 2: Territory Calculation</h3> <p>Base: ${basePremium.toFixed(2)}</p> <p>Adjusted: <span className="text-blue-600">${adjustedPremium.toFixed(2)}</span></p> </div> ); };
By using Replay, the engineering team avoids the "Translation Gap"—the space between what the actuary wants and what the developer builds.
The Cost of the "Status Quo"#
Maintaining these PL/I engines is not just a technical burden; it is a talent risk. The average age of a PL/I developer is increasing, and the pool of available talent is shrinking. According to Replay’s analysis, the cost of maintaining legacy insurance systems increases by 15% year-over-year as specialized labor becomes more expensive.
Furthermore, the inability to quickly update rating logic prevents carriers from responding to market shifts. If a competitor introduces a "Telematics Discount" and your PL/I engine takes six months to update, you lose the most profitable, low-risk customers.
Insurance rating engines capturing via visual reverse engineering allows for "Parallel Run" testing. You can run the legacy engine and the new Replay-generated engine side-by-side to ensure that for every one of the 15 steps, the math is identical to the penny.
Security and Compliance in Regulated Environments#
For insurance companies, security is non-negotiable. Moving logic out of a mainframe and into the cloud requires rigorous oversight. Replay is built for these regulated environments, offering:
- •SOC2 Type II Compliance: Ensuring your data and logic are handled with enterprise-grade security.
- •HIPAA-Ready Frameworks: Critical for health insurance rating engines.
- •On-Premise Deployment: For carriers who cannot allow their logic to leave their internal network.
Building for Regulated Industries is a core pillar of the Replay platform.
Reconstructing the "Black Box"#
The most difficult part of insurance rating engines capturing is the hidden dependencies. Often, step 12 (Taxes) relies on a calculation performed in step 3 (Class Rating) that was temporarily stored in a "scratchpad" memory area in the mainframe.
Manual audits often miss these "ghost dependencies." Replay’s visual approach identifies them because they manifest as UI changes. If a tax amount changes when a driver's age is modified, Replay flags that relationship, ensuring the modern React code preserves the dependency.
The Blueprint Editor#
Replay’s Blueprint editor allows architects to refine the captured logic. If the AI identifies a calculation but the architect knows that a new regulation is coming next month, they can modify the Blueprint before the final code is exported. This combines the speed of AI with the oversight of human expertise.
typescript// Generated Blueprint Logic for Step 13: Rounding // This ensures compliance with State-Specific Rounding Rules export const applyStateRounding = (value: number, stateCode: string): number => { switch (stateCode) { case 'NY': return Math.round(value * 100) / 100; // Round to nearest cent case 'TX': return Math.floor(value); // Texas specific truncation rule captured default: return Math.round(value); } };
Conclusion: Modernize or Be Left Behind#
The $3.6 trillion technical debt is a ticking time bomb for the insurance industry. The 18-month average enterprise rewrite timeline is no longer acceptable in a market that moves at the speed of InsurTech.
By shifting from manual code extraction to visual reverse engineering, carriers can capture their 15-step rating logic with unprecedented speed and accuracy. Replay provides the bridge from the PL/I past to the React future, saving 70% of the time typically wasted on documentation and manual coding.
Ready to modernize without rewriting? Book a pilot with Replay
Frequently Asked Questions#
How does Replay handle logic that isn't visible on the screen?#
While Replay is a visual reverse engineering tool, most business logic in rating engines eventually manifests as a value on a screen (e.g., intermediate totals, tax lines, or premium breakdowns). By recording a wide variety of "test cases" with different inputs, Replay can infer the mathematical relationships between inputs and outputs. For purely "invisible" background processes, Replay provides a Blueprint editor where architects can manually augment the captured flows.
Can Replay export code to frameworks other than React?#
Replay is optimized for modern web architectures, with React and TypeScript being the primary export targets. This allows organizations to build modern Design Systems and Component Libraries that are easily maintainable. However, the underlying Blueprints (the documented logic) can be used as a specification for any modern language.
Is my data safe during the recording process?#
Yes. Replay is designed for highly regulated industries like insurance and banking. We offer PII (Personally Identifiable Information) masking during the recording phase, and our platform is SOC2 compliant. For organizations with strict data residency requirements, we offer on-premise deployment options where no data ever leaves your secure environment.
How long does it take to see results with Replay?#
Unlike traditional modernization projects that take months to show progress, Replay can produce documented React components within days of the initial recording. Most pilot projects for a specific rating engine workflow are completed within 2-4 weeks, representing a significant acceleration over the 18-month industry average.
Does Replay replace my developers?#
No. Replay is an "accelerator" for your existing engineering team. It removes the "grunt work" of manual documentation and UI recreation (which takes about 40 hours per screen). This allows your senior architects and developers to focus on high-value tasks like system integration, performance optimization, and new feature development.
Ready to modernize without rewriting? Book a pilot with Replay