In brief
Knowledge about a COBOL system on a mainframe is passed on by plan, long before the experts leave: through a map of batch runs and transactions, pair work on real changes, recorded code reviews, and tests that capture the system's behavior. Documentation alone is not enough, because the most valuable knowledge concerns exceptions: what to do when the nightly run stops, and why a certain program is run twice. The plan starts with a list of people and areas that only they know.
Why this is urgent right now
At many banks, insurers, and public institutions, COBOL systems on IBM Z mainframes handle settlements, ledgers, and nightly runs. The people who built them often have worked on them for decades and will retire in the coming years.
The language itself is not the problem. COBOL is readable and well documented, and a younger developer will learn the syntax in a few weeks. What is hard is what is not written down: dependencies between hundreds of batch jobs, the meaning of fields in VSAM datasets, the reasons for manual workarounds that have become part of the process. Such knowledge disappears with the person, and reconstructing it from the code takes months. We describe the broader background of the mainframe decision in a bank in the article The mainframe in a bank: when to modernize and when to leave it.
A knowledge map: what and from whom
The first step is an inventory of who knows what. A simple table is enough, which the team fills in together with the experts.
| Area | Who knows it | Is there documentation | Risk |
|---|---|---|---|
| Nightly settlement run (JCL, scheduler) | One person | Partial | High |
| CICS customer service transactions | Two people | Yes | Medium |
| COBOL programs for interest calculation | One person | None | High |
| Data structures (copybooks, VSAM, Db2 for z/OS) | The team | Partial | Medium |
| Emergency procedures and run restarts | One person | None | High |
Areas with one person and no documentation go first in the plan. The table also shows where a second person is needed and where documentation is enough.
Methods that work
Knowledge transfer works when the learner works on the real system and the expert looks over their shoulder, not the other way around.
Pair work on real changes
The new person makes a change, and the expert guides and comments. After a few such changes in one module, the roles reverse: the new person explains to the expert what they did and why. This is the fastest way to check whether the knowledge has really passed on.
Recorded walkthroughs of runs
The expert walks through a nightly run step by step: which JCL job starts which program, which datasets it reads and writes, what happens on an error. The recording with a description goes into the documentation repository along with a list of steps. An hour of recording saves many hours of questions after the expert leaves.
On-call shifts with a shadow
During failures and run restarts, a second person sits next to the expert. After a few incidents, they take the lead and the expert just watches. Emergency procedures are the hardest to write down and the easiest to pass on this way.
Tests as a record of behavior
Regression tests on a copy of the data capture how the system calculates today. When the experts are gone, the tests still tell you whether a change broke something. We describe the approach using IBM i as an example in the article Automated tests for IBM i applications; for the mainframe the principles are the same.
What to avoid
A few mistakes repeat in many companies. The first is passing on knowledge in the last month before the expert leaves: there is time for a lecture then, but not for independent changes under supervision. The second is choosing one person to take over the whole system, which only shifts the risk by a few years. The third is documentation in private notes and e-mails instead of a repository that will survive a change of team.
It is also worth remembering the expert's motivation. A person who has been the only one who knew the system for years may treat knowledge transfer as a sign they are becoming redundant. A clear mentor role, recognition of their work, and time set aside in the plan for teaching others change that conversation.
New tools help new people
It is easier for younger developers to get into the mainframe when they work in a familiar environment. Zowe, an open project of the Open Mainframe Project, provides, among other things, a command line interface and the Zowe Explorer extension for VS Code: access to datasets, jobs, and output from an editor they know from other languages. There are also extensions with COBOL and JCL syntax support, as well as commercial IBM environments.
Tools will not replace knowledge of the system, but they shorten the time it takes to learn the platform, especially for people who have never worked in a 3270 terminal. Moving sources and documentation to git also provides change history and code review, which new people know from other projects.
A 12-month plan
Below is a sample plan for a team in which two experts will leave within a year. The timings are illustrative; in practice they depend on the size of the system.
- Months 1–2. A knowledge map, choosing the people who take over, access to environments, the first recordings of runs.
- Months 3–6. Pair work in high-risk areas, documentation of runs and data structures in the repository, on-call shifts with a shadow.
- Months 7–9. Reversed roles: the new people lead changes and on-call shifts, the expert checks. Regression tests for key runs.
- Months 10–12. The new team works independently, the expert is available for questions. A review of which areas still have only one person.
It is worth measuring the plan with a simple indicator: how many areas in the table already have at least two people who have made a change in them independently. We describe the general principles of passing on knowledge in a team in the article Knowledge transfer when the team changes, and an example of a team working on a mature system is shown in the scenario a maintenance team for an administration's domain system.
Questions and answers
How long does it take to learn COBOL?
An experienced developer learns COBOL syntax in a few weeks, because the language is readable and has few constructs. Learning the surroundings takes longer: JCL, datasets, CICS or IMS, Db2 for z/OS, and mainframe tools. Learning a specific system and its exceptions takes the longest, which is why a knowledge transfer plan is counted in months, not weeks.
Is it enough to write documentation before the expert leaves?
No, although documentation is needed. An expert who writes alone usually describes what is obvious to them and skips what a new person would ask about. Documentation works better when it is written by the learner based on pair work and recordings, and checked by the expert. Tests complement it by capturing the system's behavior independently of the description.
Does AI help in understanding old COBOL code?
AI assistants can summarize a program, describe the data flow, and suggest comments, which speeds up the first reading of code. Their output must be checked, though, because a model does not know the business context or dependencies with other programs and can confidently give a wrong explanation. It is best to treat it as a draft to verify with an expert or with tests.
What if the expert has already left?
Then the knowledge is reconstructed from the system: an inventory of jobs and programs, dependency analysis, run logs, conversations with users, and tests on a copy of the data. Short cooperation with the former employee also helps, if it is possible, for example a few question sessions. We describe methods of working without the authors in the article Documenting a legacy system when its authors are gone.