Fix slow COBOL migrations before the batch window slips.
RuleBridge fixes the hot paths where COBOL-to-Java migration becomes too slow to launch. We move selected insurance business rules into Postgres procedures, expose them as APIs, and prove they match the mainframe output before your team commits to cutover.
Pilot scope
3 programs
Start where latency, batch runtime, or cutover confidence is already blocked.
Correctness bar
Field parity
Same inputs, same data snapshot, same expected COBOL output, reviewed mismatch by mismatch.
Target surface
Postgres + API
PL/pgSQL procedures or functions wrapped behind a stable REST/RPC contract.
Migration proof
CALC-AUTO-PREM / endorsement rating
COBOL paragraph
01PERFORM LOOKUP-TERRITORY02PERFORM LOOKUP-USAGE03COMPUTE GROSS-PREM ROUNDED =04 BASE-PREM * TERR * USAGE05COMPUTE TOTAL-DUE ROUNDED =06 GROSS-PREM + TAX + FEE
Postgres target
01create function rate_endorsement(...)02returns table(total_due numeric)03select factor into v_territory04gross := round(base * factors, 2);05return query select total_due;
Cases matched
25,000 / 25,000
p95 contrast
410 ms -> 63 ms
Throughput
38/sec -> 510/sec
The failure mode
The rewrite compiles. Production does not care.
01
The converted Java still thinks like COBOL.
Automated translation can preserve paragraph order, row-by-row loops, packed-decimal checkpoints, and table lookups that were fast only because the data lived beside the runtime.
02
The database becomes a network problem.
Rating, billing, claims financials, and commission logic can turn into repeated JDBC calls, object mapping, and transaction chatter that pushes p95 latency and nightly batch windows the wrong way.
03
Nobody trusts a rewrite without evidence.
Insurance edge cases live in copybooks, JCL parameters, DB2 tables, VSAM files, 88-level flags, REDEFINES, rounding behavior, and years of quiet production exceptions.
The wedge
Do not modernize the estate. Prove the path that is blocking launch.
RuleBridge works alongside your SI, AWS/Azure program, or mainframe team. The first engagement is deliberately narrow: find the data-heavy rules that should live close to Postgres, then measure whether the migrated path is correct and fast enough.
Trace
Map COBOL, copybooks, embedded SQL, DB2/VSAM access, JCL job context, and side effects for the selected programs.
Translate
Move the right data-heavy rules into Postgres-native procedures while leaving screen flows and transaction-manager behavior out of the first pilot.
Expose
Wrap the procedure behind an API contract with request validation, trace IDs, and deterministic response shape for existing callers.
Prove
Run a golden-master harness against legacy output, compare every money field, and benchmark latency and throughput before any production decision.
Proof demo
One rating path, shown the way a modernization lead actually reviews it.
This is the paid-pilot artifact: source paragraph, extracted rule, Postgres target, API response, equivalence run, and performance contrast. No production data is required to understand the method.
RuleBridge evidence record
CALC-AUTO-PREM moved from procedural risk to verified API.
Cases
25k
p95
63ms
Delta
$0.00
COBOL source path
CALC-AUTO-PREM.cbl
01PERFORM LOOKUP-TERRITORY-FACTOR02PERFORM LOOKUP-USE-FACTOR03PERFORM LOOKUP-DEDUCT-FACTOR04 05COMPUTE WS-GROSS-PREM ROUNDED =06 WS-BASE-PREM07 * WS-TERR-FACTOR08 * WS-USE-FACTOR09 * WS-DEDUCT-FACTOR10 11COMPUTE WS-TOTAL-DUE ROUNDED =12 WS-GROSS-PREM + WS-TAX-AMT + WS-FEE-AMT
Extracted rule
rating.auto.endorsement
01inputs:02 policy_id, vehicle_id, coverage_cd, as_of_date03 04dependencies:05 policy, vehicle, coverage, rating_factor06 07rounding:08 gross_premium: COBOL ROUNDED / 2 decimals09 total_due: gross + tax + fee10 11candidate:12 data-heavy procedure near Postgres
Postgres target
rate_auto_endorsement()
01create or replace function rate_auto_endorsement(02 p_policy_id text,03 p_vehicle_id text,04 p_coverage_cd text05) returns table (06 gross_premium numeric,07 tax_amt numeric,08 total_due numeric09) language plpgsql as $$10begin11 -- factor lookups and rounding checkpoints12end; $$;
API contract
POST /rpc/rate_auto_endorsement
01{02 "policy_id": "SAMPLE-PA-100284",03 "coverage_cd": "COLLISION",04 "as_of_date": "2026-05-01"05}06 07200 OK08{09 "gross_premium": "496.07",10 "tax_amt": "10.42",11 "total_due": "518.49"12}
Golden-master proof
25,000 / 25,000 passed
gross_premium
COBOL and Postgres
496.07
delta 0.00
tax_amt
COBOL and Postgres
10.42
delta 0.00
fee_amt
COBOL and Postgres
12.00
delta 0.00
total_due
COBOL and Postgres
518.49
delta 0.00
Performance and review trace
Representative p95
translated Java path
410 ms
Postgres procedure
63 ms
Data-heavy work moved out of repeated app/database round trips.
Representative throughput
translated Java path
38/sec
Postgres procedure
510/sec
Procedure path keeps the calculation close to the rating tables.
DB2 table access collapsed into local factor lookup
COBOL rounding checkpoints preserved before totals
API response includes trace ID for audit review
Mismatches routed to SME review before cutover
Paid pilot
Three programs. Four to six weeks. A real go/no-go decision.
The pilot is designed for teams that already have modernization budget and need evidence before architecture hardens. If the path is wrong for Postgres, the report says that clearly.
What you leave with
COBOL dependency and data-access map
Candidate decision: Postgres procedure, Java, wrapper, or leave alone
Postgres function/procedure and API contract
Golden-master regression harness with field-level diffs
Latency and batch-throughput benchmark
Executive go/no-go report for the next migration wave
When it is a fit
COBOL, CICS, JCL, DB2, VSAM, IMS, or Micro Focus modernization in motion
Generated Java or replatformed code technically runs but misses latency, throughput, or maintainability targets
Policy, rating, billing, claims financials, commissions, endorsements, or batch logic with measurable outputs
A modernization team that wants proof on a narrow path before arguing about the entire estate
Limited pilot capacity
Bring one painful path. Leave with proof your team can defend.
RuleBridge pilots require hands-on source review, database review, and output validation. We keep the first wave small so every pilot has a real finish line.