Prove Your End-of-Day Batch Recovers: Crash-Testing a COBOL Batch
Most banks believe their end-of-day batch restarts cleanly. Few can show it. Here is how OneCo's batch recovery lab crash-tested a COBOL end-of-day batch at 75 different moments, and what an independent verifier found that control totals missed.
Direct Answer (Quick Summary)
To prove an end-of-day batch recovers, you crash it on purpose at many different moments, restart it with the normal recovery procedure, and check the result independently of the program's own control totals. OneCo's batch recovery lab did this to a COBOL end-of-day batch at 75 points: every restart recovered with 0 lost and 0 duplicated transactions, and the independent verifier caught bugs that the control totals had reported as fine.
Key Takeaways
- An end-of-day batch that has never been crashed on purpose has an untested recovery path, however reliable it looks day to day.
- OneCo's lab crash-tested a COBOL end-of-day batch at 75 different moments. Every restart recovered with 0 lost and 0 duplicated transactions.
- An independent verifier, which recomputes the expected result from the inputs instead of trusting the program, caught bugs that the program's own control totals reported as fine.
- Control totals can agree with themselves while the data is wrong, for example when errors offset or when totals are computed from the same faulty output.
- The Batch Resilience Assessment runs this method in a bank's own test environment and produces an evidence report for auditors and supervisors.
- The method works for any core banking end-of-day batch. It is not limited to IBM mainframes, and the tool itself does not need a mainframe.
Every bank runs an end-of-day batch. It posts the day's transactions, accrues interest, applies fees, updates balances and produces the files that other systems and counterparties depend on the next morning. In many banks it is written in COBOL, has run for decades, and is treated as the most reliable thing in the building.
Ask a simple question, though, and the confidence often becomes less certain: if the batch crashes halfway through, does the restart produce exactly the right result? Not roughly right. Exactly right, with no transaction lost and none applied twice.
Most teams believe the answer is yes. They have restart procedures, checkpoints and control totals. Far fewer can show evidence that the restart has been tested at the points where it is most likely to go wrong. This article explains how to produce that evidence, what OneCo's batch recovery lab found when it did, and how the same method can be applied in a bank's own environment.
Why "it has never failed" is not evidence
A batch that has run successfully every night for years has proved that its normal path works. It has proved very little about its recovery path, because that path is rarely exercised, and when it is, it is usually after a failure at one particular moment, not across all of them.
Recovery bugs tend to hide in narrow windows:
- Between writing an output record and recording the checkpoint that says it was written.
- Between committing a database update and updating a sequential file that is meant to match it.
- During the switch from one input file to the next.
- Partway through a multi-step posting, where one leg has been written and the other has not.
A crash outside those windows recovers cleanly, which is why ordinary failures do not reveal the problem. A crash inside one can lose a transaction or apply it twice, and the next morning's figures may still look plausible.
Operational resilience expectations from banking supervisors increasingly ask firms to show that important services can recover from disruption, not just to assert it. A tested, evidenced recovery path for the end-of-day batch is a concrete example of that. Building trustworthy AI operations makes the same argument for AI-run work: trust should rest on evidence, not on the absence of incidents.
The method: crash on purpose, recover normally, verify independently
The approach has three parts.
1. Crash at many moments
Run the batch against a fixed, known set of input data. Stop it abruptly at a chosen point, as a real failure would, without letting it close files or finish the current step tidily. Then repeat, choosing a different point each time, so the crashes cover the whole run, including the narrow windows listed above.
2. Recover the normal way
After each crash, restart the batch using the bank's own documented restart procedure, exactly as operations would at night. The test is of the real recovery path, not an idealised one.
3. Verify independently
Compare the final state after recovery with the correct result. The essential point is how "correct" is determined. If you check the outcome using the batch's own control totals, you are asking the program whether it is right. An independent verifier instead recomputes the expected result from the inputs and compares it with what the batch actually produced: every account, every transaction, every output record.
What the lab found
OneCo's batch recovery lab applied this method to a COBOL end-of-day batch. The batch was crashed at 75 different moments across its run. After each crash it was restarted with the normal recovery procedure, and the result was checked by the independent verifier.
The outcome: every one of the 75 restarts recovered with 0 lost and 0 duplicated transactions.
The more instructive finding came during the lab work. The independent verifier caught bugs that the program's own control totals reported as fine. The batch's totals balanced, its own checks passed, and the data was still wrong.
How control totals can agree while the data is wrong
This is the part that surprises people most, so it is worth explaining. Control totals are a valuable check, but they have structural blind spots:
- Offsetting errors. If one transaction is lost and another of the same amount is applied twice, the totals can still balance.
- Self-referential totals. If the totals are computed from the same output the batch just wrote, they will agree with that output whether or not it is correct.
- Counts without identity. A record count confirms how many records were processed, not which ones. A skipped record and a duplicated record leave the count unchanged.
- Checks that restart with the batch. If the running totals are themselves restored from a checkpoint that does not match the data, the totals and the data can drift apart without either noticing.
An independent verifier does not share these blind spots, because it does not rely on anything the batch computed about itself. That is why it is the right final check for a recovery test. How to track AI decisions applies the same principle to AI systems: the system under test should not be the only judge of its own output.
The Batch Resilience Assessment
OneCo offers this method to banks as a Batch Resilience Assessment. In outline:
- It runs in the bank's test environment, against the bank's own end-of-day batch and representative test data. Production is not touched.
- The batch is crashed at many chosen points and restarted using the bank's documented restart procedure.
- An independent verifier checks every recovery against the expected result computed from the inputs.
- The output is an evidence report: the crash points tested, the result of each recovery, any lost or duplicated transactions with the exact records involved, and the cases where control totals and the independent check disagreed. The report is written for internal audit, operational resilience teams and supervisors.
A typical evidence report is organised so that each reader finds what they need:
| Section | What it shows | Main reader |
|---|---|---|
| Scope | The batch, the environment, the test data and the restart procedure used | Audit, resilience |
| Crash points | Each point tested and where it falls in the run | Operations, engineering |
| Results | For each crash, whether recovery was exact, with any lost or duplicated records listed | All |
| Disagreements | Cases where control totals passed but the independent check failed | Engineering, audit |
| Findings | Issues to fix, with the evidence for each | Engineering, management |
The method is not specific to IBM mainframes. It applies to any core banking end-of-day batch, whether it runs on a mainframe, on a midrange system, or as COBOL or another language on commodity servers. The assessment tooling itself does not need a mainframe.
Where AI employees help is in the surrounding work: preparing the evidence pack, summarising results for each audience and tracking follow-up actions, with every external communication approved by a person. AI employees for banking describes that wider picture, and why every AI employee needs an audit trail explains how those runs are themselves recorded.
Questions to ask about your own batch
Even before any assessment, these questions are a useful self-check:
- When was the end-of-day restart procedure last exercised, and at which point in the run did the failure happen?
- Has the restart ever been tested deliberately at the moment between an output write and its checkpoint?
- How is the result of a restart verified today? By the batch's own totals, or by something independent of the batch?
- Could your current checks detect one lost transaction and one duplicated transaction of the same amount on the same night?
- If a supervisor or auditor asked for evidence that the batch recovers correctly, what would you show them?
If the answers are uncertain, that is not unusual. It is also fixable. To discuss a Batch Resilience Assessment, contact the OneCo team and choose "Batch Resilience Assessment" as your interest.
Frequently Asked Questions
What is a Batch Resilience Assessment?
A structured test, run in the bank's own test environment, that crashes the end-of-day batch at many chosen points, restarts it with the normal recovery procedure, and checks each result with an independent verifier. It produces an evidence report for audit and resilience teams.
Do we need a mainframe for the assessment?
No. The method works for any core banking end-of-day batch, on a mainframe or not, and the assessment tooling does not need a mainframe to run.
Why are control totals not enough to verify a restart?
They can balance while the data is wrong, for example when a lost and a duplicated transaction offset each other, or when totals are computed from the same output being checked. An independent verifier recomputes the expected result from the inputs instead.
What did OneCo's lab test show?
A COBOL end-of-day batch was crashed at 75 different moments. Every restart recovered with 0 lost and 0 duplicated transactions, and along the way the independent verifier caught bugs that the program's own control totals reported as fine.
Is production affected?
No. The assessment runs in the bank's test environment against representative test data.
Related reading
- AI Employees for Banking: Operations, Compliance Evidence and Customer Service Under Approval
- Building Trustworthy AI Operations: Controls That Hold
- How to Track AI Decisions So You Can Defend Them Later
- Why Every AI Employee Needs an Audit Trail
- AI for Financial Reconciliation Without the Exception Sprawl
- How to Recover From Failed AI Executions