Demo · Parity Lab

Run a mainframe batch and its Java rewrite, side by side.

Press run, and AWS runs CardDemo's nightly batch twice: the original COBOL programs, unchanged, and our Java versions, on the same data. Posting, then interest, then the printed report; after each job, every output record and report line is compared. Results appear here as each step finishes.

Also in the lab: the account screen, CardDemo's original 3270 green screen next to its web replacement, and the account update, where both sides save your changes and are compared byte for byte.

Test data
Java side's data the COBOL always uses record files
Fixes Java side only

With no fixes, the outputs should be identical. Switch a fix on to see exactly which records it would change: the tests found these behaviors in the original, and changing them is a business decision.

1 · Daily posting POSTTRAN

COBOLGnuCOBOLwaiting
JavaJava 21waiting
Compareevery recordwaiting

2 · Interest INTCALC

COBOLreads COBOL posting outputwaiting
Javareads Java posting outputwaiting
Compareevery recordwaiting

3 · Daily report TRANREPT

COBOLreads COBOL posting and interestwaiting
Javareads Java posting and interestwaiting
Compareevery linewaiting
Resultswaiting

How it works

A mainframe batch, serverless

No mainframe is involved. The COBOL runs unchanged under GnuCOBOL, an open-source COBOL compiler, inside the same container as the Java versions.

Your browser
Amazon CloudFrontthis site and /api
Amazon API Gatewaywith request limits
AWS Lambdastarts runs, reports progress
AWS Step Functionsruns the batch in order
AWS Lambda containerGnuCOBOL 3.1.2 and Java 21
Amazon S3run files, deleted after a day
Amazon Aurora ServerlessPostgreSQL; pauses when idle
  1. Two nightly chains

    Posting runs first, then interest, then the daily report, as in CardDemo's batch schedule. Each COBOL job reads what the COBOL jobs before it wrote, and each Java job reads what the Java jobs wrote, so an error early in the chain would show up again in every later job.

  2. The same harness as the case study

    Each step runs the scripts from our CardDemo case study: it loads the data the way the mainframe holds it, pins the clock so every run is repeatable, and compares every output record field by field. The only thing set aside is the fraction of a second in processing timestamps, which comes from the real clock.

  3. The same jobs on a database

    Choose PostgreSQL and the Java side runs the database versions of the three jobs: the same business rules on a typed data model, with each job's changes saved in one database transaction. Each run gets its own schema, removed when the run ends. The database is Amazon Aurora Serverless, which pauses itself when idle.

  4. Built to be cheap to leave running

    Nothing runs between visits, and the database pauses after five idle minutes. Runs are limited per minute and per day, and run files are deleted after a day, so a public demo stays inexpensive. The whole setup is defined in AWS CDK and deployed from GitHub, like the rest of this site.

GnuCOBOL is not the mainframe. The reference results come from GnuCOBOL, the same as in the case study; a run on z/OS would close that gap.

Read the CardDemo case study · Engineering record · All demos