
- 70-80% of mainframe modernization projects fail. Not because AI can't translate COBOL to Java — it can. They fail because the bug isn't in the code the AI can see. It's in a copybook thousands of lines away that the tool never read. 🧵
- A real failure pattern: an AI translates a wire-transfer COMPUTE on a variable called TRN-LIMIT into a Java BigDecimal. The code compiles. Unit tests pass. In UAT, the first transaction crashes the database consistency check.
- The autopsy: TRN-LIMIT was defined in a copybook thousands of lines up the chain, with a REDEFINES clause — the same memory address read as two different types depending on a flag set in another module. The AI saw a plain integer. The address held packed decimal.
- That's the whole problem. "Paste COBOL, get Java" tools produce code that compiles. Compiling is the easy part. The hard part is the code they can't see: one program can reference 40+ copybooks, each COPYing others, variables defined 5 levels deep in the chain.
- And COBOL doesn't run standalone. CA-7 or TWS schedule 2,000-5,000 JCL jobs. Job A writes a dataset Job B reads at 2 AM. Migrate the COBOL, miss the JCL, and production breaks at midnight — in batch, where nobody is watching.
- Then the arithmetic. COMP-3 packed decimal has no Java equivalent. Even BigDecimal needs an explicit HALF_EVEN mode to match COBOL's ROUNDED clause. One wrong penny compounds across millions of transactions — on rails that still clear 95% of ATM withdrawals and $3T a day.
- The 2026 vendor field doesn't close this. IBM watsonx Code Assistant for Z runs ADDI on z/OS — lock-in mid-migration, no JCL mapping, no behavioral-equivalence testing. Claude Code is strong at discovery but has no knowledge graph for transitive dependencies.
- How live is this fight? When Anthropic published its COBOL playbook in Feb 2026, IBM's stock fell 13.2% in a day. The market already knows translation is commoditizing. The durable value is in everything that has to be understood before you translate a line.
- Our take: the map is the product. We build a knowledge graph of the codebase — COBOL, copybooks, JCL, CICS, DB2 — before touching a line. It surfaces the lowest-coupling module to extract first, so old and new run side-by-side with the legacy as fallback.
- Then we close the gap everyone skips: behavioral equivalence. Capture real production inputs and outputs from the legacy system, replay them against the new one. The edge cases COBOL accumulated over decades encode regulatory logic that lives in no spec anywhere else.
- If you've run a mainframe migration — what broke it first: the copybook dependencies, the JCL job network, or the data? Our bet is the JCL nobody mapped. Tell us we're wrong. #COBOL #Mainframe
- We wrote up the full approach — why these projects fail, and how mapping the topology first changes the odds: https://veriprajna.com/solutions/legacy-cobol-modernization