
GenAI can untangle decades of COBOL in a bank's core, but only with tests, telemetry and human checks in the pipeline. Why modernisation needs a different playbook.
GenAI can untangle decades of COBOL in a bank's core, but only with tests, telemetry and human checks in the pipeline. Why modernisation needs a different playbook.
Consider this scenario: Asha, a senior payments developer at a mid‑sized bank, runs a two‑week generative artificial intelligence (GenAI) pilot to understand a 25‑year‑old COBOL batch that posts overnight settlements. The goal is to produce a dependency map, generate unit/integration test scaffolds, and surface risky code paths for refactor. Within 48 hours, the tool ingests the repository and produces a call graph, module summaries, and about 200 test scaffolds for the busiest routines. This turns opaque code into readable documentation and cuts new‑hire onboarding from days to hours.
During sandbox replays, however, a persistent reconciliation variance appears. An undocumented, account‑specific rounding rule is implemented with subtle differences across three modules. It is a classic spaghetti pattern. GenAI produces syntactically correct outputs but misses implicit business intent. So, the team pauses automated refactor work until parity is proven with telemetry, targeted tests, and SME validation.

This is just one example of how GenAI can deliver tangible impact in banking technologies but can be severely limited by spaghetti code in legacy systems. According to Databricks, a data intelligence software company, 94% of Indian enterprises report using GenAI in at least one function. However, legacy cores and technical debt will materially slow and reduce realised value unless programs invest in tests, telemetry, and governance.
Treat GenAI as an assistant, not an autopilot.
A GenAI assistant can turn hours of reverse engineering into actionable maps and tests, but a single batch dependency in legacy core code can stop a pilot cold. Here, human experts and telemetry remain essential. Forrester found 21% of Indian software decision‑makers say technical debt is a top barrier to innovation, higher than the global average.

Spaghetti code describes systems whose control flow is tangled, responsibilities are mixed, and decades of ad‑hoc patches and global state make behaviour hard to follow. In banking, this becomes a “spaghetti bowl” of integrations and custom fixes. This is often seen in payment clearing, posting engines, ledgers, loan servicing, and fraud/AML logic where mainframes and COBOL still run mission‑critical workloads.
Because these applications are high‑volume and highly regulated, any change must preserve reconciliation parity and audit trails. This makes them hard to test, trace, or refactor safely. As a result, many modernisation efforts stall at discovery and documentation. In many cases, GenAI output may pass compiler or static checks but prove inadequate for meeting regulatory and reconciliation requirements.
Disclaimer: Content provided by TNF India is for informational purposes only. While we aim to provide accurate data and strategic insights, information is subject to rapid market and technological shifts. This content should not replace independent due diligence or professional consultation. TNF India bears no responsibility for any actions taken, or financial losses incurred, in reliance on this material.










Decoding deals, developments, regulations, and government directives shaping cross-border business between India and BRICS partners.

Who India's financial system trusts, and on what evidence.

What an owner should receive at handover, and what actually arrives.
Industry guidance from IBM and recent technical work on GenAI‑driven mainframe modernisation note that while GenAI reduces boilerplate work, projects typically require staged, test‑first rewrites and extensive telemetry to satisfy audit and reconciliation requirements. Microsoft’s engineering team describes using AI agents to accelerate COBOL migration while relying on test harnesses and staged validation to avoid parity failures and audit friction.
GenAI delivers the fastest, most reliable wins in developer productivity, documentation, and routine automation. Tasks like code comprehension, generating readable module summaries, and scaffolding unit and integration tests are low‑risk and high‑leverage. Document processing and customer‑facing automation (chatbots, form extraction, templated responses) also yield measurable gains quickly. These are areas where GenAI augments human work without touching core transaction logic, so you can capture value with limited governance overhead and clear KPIs.
The hardest gains lie in automated translation or wholesale refactor of mission‑critical mainframe code and reconciliation‑sensitive posting engines. Languages and runtimes such as COBOL/JCL encode decades of implicit business rules, rounding quirks, and sequencing dependencies. Semantic fidelity matters more than syntactic correctness. Auditability, provenance, and runtime behavior must be preserved. This requires exhaustive testing, SME validation, and controlled rollouts. In practice, attempts to fully automate these migrations without heavy engineering controls produce parity failures and regulatory pushback.
If you are looking at mid‑to‑high single‑digit to double‑digit percentage gains in operating cost and developer throughput, you must invest up front. Build test harnesses, capture execution traces, and bake governance into the pipeline before scaling GenAI. Organisations that skip these steps will see pilots stall. Those that make them turn pilots into sustained, auditable modernisation programs.


A disciplined approach can convert the GenAI promise into measurable modernisation wins while keeping the lights on and the ledgers balanced.