By Andrew Wig
Languages like COBOL, PL/I and Assembler; API calls for CICS, IMS, Db2—“the content for these technologies doesn't exist out in the wild to train your LLM on,” Rich Larin, who runs zDevX and platform engineering for IBM Z Software, tells TechChannel.
IBM software developer Ethan Mendel backed up that assertion during an online IBM Dev Day session in September. With all the subsystems, specific language extensions and platform-specific behavior that characterize the mainframe, “IBM Z is very special,” Mendel said. “COBOL is not just COBOL—there are many subsystems, lots of very specific language extensions, and a great deal of platform-specific behavior.”
IBM’s new AI-driven software "development partner," the platform-agnostic IBM Bob, hit general availability in April 2026, but the tool uses some of the same general-purpose models that have had a difficult time finding sufficient mainframe data to be trained on. To provide Bob the context it needs to excel as an AI tool for the mainframe, IBM released the Bob Premium Edition for Z in July, marketed as an evolution of watsonx Code Assistant for Z.
“Base Bob is a modern agentic AI-assisted development partner,” Larin says. “ … The Premium Package for Z says, ‘All right, if you're a COBOL developer or you're a mainframe application architect, what are the things that you need?”




Through its Z Architect and Z Code modes, the Premium Package comes with a suite of tools, skills and workflows designed to make up for the lack of publicly available mainframe training data. General-purpose coding assistants trained on scant mainframe data fall short in two main areas: semantics and scale, Larin says.
The semantics concern languages like COBOL, PL/I, Assembler, plus middleware and specific API calls for CICS, IMS and Db2. The scale concerns the millions of lines of code that need to be analyzed for complex tasks like modernization projects, as developers try to determine how a change in one line of code will affect other components within a massive system.
For example, a developer might ask, “What are the 27 programs that call this program? What are the 29 programs downstream of this?” Larin says. “And oh, by the way, it's not like there's just a GitRepo that has all this. A lot of this source is on the mainframe, and so you need special tools to be able to go and assess that and help you in workflows where that's a key piece.”
That complexity, along with the mainframe’s role as the system of record, have heightened the challenge of modernization for mainframe shops that are hesitant to meddle with mission-critical systems where hiccups can be costly. “I haven’t seen a customer base with more technical debt than major mainframe applications—just because they are that old, and because they’ve always been running and always been working,” said Mendel, the lead developer for IBM Bob Premium Package for Z.






Some clients, Mendel continued, look at their mainframe environment, see a 10-year modernization project, and wonder if it’s worth it. In part, the mountain of technical debt they face is a documentation problem. And it’s a big problem, since documentation is “the very first thing you reach for” in modernization efforts that involve impact analysis, refactoring or code transformation, Mendel noted.
Mendel offered the following hypothetical:
Documentation is where critical information such as the definitions for COBOL variables would reside. The challenge is that those variables are often inscrutable, leaving unsuspecting developers scratching their heads. “One problem with COBOL programs is that you can see a variable and you have no clue what it means,” Larin says. A developer armed with no documentation would have no way of knowing that WC3AWQX4, for example, meant an account opening.
The Bob Premium Package for Z addresses this problem with its Data Dictionary workflow, which scans COBOL and PL/I files, identifies important variables and generates descriptions of them as JSON files. “If I'm a user and I'm asking around account opening, I call my Data Dictionary tool and it knows exactly which variables I'm referring to so I can go modify or leverage them,” Larin says.
Creating a data dictionary is one example where a generic AI tool would fail, Mendel noted: “There’s no application-wide context, no understanding of IBM Z dialects, and no access to any kind of Data Dictionary that gives variables their real meaning."
The Data Dictionary is a prime example of the way the Premium Package for Z leverages metadata, a key concept for IBM’s specialized AI assistant. Based on a static analysis of components including source code and job configuration settings, that metadata shows up as a queryable database.
“That metadata is what we collect. We make that available to the AI. So if I'm Bob now, and all of a sudden I have access to COBOL and Assembler and DB2 and CICS information. I have access to this dependency information,” Larin explains.
Captures explicit and dynamic program-to-program calls (e.g., identifying which programs invoke a shared date-processing utility or external module).
Maps how execution moves through a program, across paragraphs, and between copybooks (e.g., tracking control transfers following a PERFORM).
Tracks how data transforms and moves between fields, accumulators, copybook layouts and routines.
Maps queries and accesses to database resources (e.g., tracking which programs read or modify specific SQL tables or Db2 structures).
Captures definitions and triggers associated with transaction processing environments like CICS or IMS.
Maps batch scheduler dependencies, file interactions, copybooks and subsystem resource connections across the application portfolio.
The metadata collected within IBM Bob serves as a source of truth for the system in question, and remains so even when scaling up to hundreds of millions lines of code, Mendel noted. That source-of-truth status is key as AI workloads scale up.
“Just imagine you have a million programs. Each one has, say, 20,000 lines of code—or even just 1,000,” Mendel said. If a human were conducting impact analysis, they would read the program, take notes, summarize and repeat.
“After program 50, you’d probably need a break,” Mendel said. “It’s actually very similar for AI when it scales. It tries to read all the programs, make sense of them and summarize them. But in that process, it loses information. And just like a human eventually needs coffee, the model eventually runs out of context.”
IBM Bob has a context limit of 270,000 tokens per task. Once Bob reaches that threshold, the system performs compaction, summarizing the entire conversation before starting a fresh one. The problem with compaction is that it’s lossy, IBM Bob product manager Max Jesch noted during Dev Day. “There is no perfect summary of anything. You may lose details, and those details may be important,” he explained.
This is where hallucinations become more likely. “What we found,” Mendel said, “is that if you need actual insight into the large interdependencies of an application, AI will hallucinate heavily—and the larger the problem gets, the worse it gets.”
In testing a large application with about 80 non-trivial impact analysis questions using a general-purpose model, the genereic approach only achieved about 30% accuracy, he added. “So what we do instead is scan the application,” he explained. “Through that scan, we build the dependency information and the relationships within and across programs, store that in a database and then use natural-language-to-SQL to search the database. That means you’re not asking AI to guess. AI is taking real data and working with it.”
Larin explains the dynamic with this rhetorical question: “What do you think is easier? An AI trying to get an answer off of a 10 million-line code base or an AI writing a SQL query to go query the metadata that already exists?”
The typical mainframe environment is vast, but the challenges it poses to modernization projects are specific. And the IBM Bob Premium Package for Z is the specialist made to address those problems—kind of like a cardiologist, Mendel said, offering an apt metaphor for an application designed to work at the heart of the enterprise.