The Capstone
A fictional community bank in Arizona, run the way real banks run: batch at night, balances that must prove out, and nobody touching the books who shouldn't.
Two machines, two eras
| The bank's core | Modernization | |
|---|---|---|
| Machine | IBM System/370, MVS 3.8j (Hercules + TK5) | IBM Z, z/OS (IBM Z Xplore) |
| COBOL | COBOL-74 style: no EVALUATE, no scope terminators | Enterprise COBOL |
| Data | VSAM KSDS masters, GDG daily files | DB2 |
| Online | INTERCOMM (CICS-like) teller screen | Driven from the Zowe CLI |
| Security | RAKF (RACF-style) | RACF |
Anyone can reproduce the core on their own PC: clone the repo, boot TK5, submit the job.
The End-of-Day cycle
| Step | Program | Does |
|---|---|---|
| 010 | BIBEDIT | Validates the day's transactions; bad data goes to a reject file with a reason code, never an S0C7 abend |
| 020 | SORT | Sorts by account number, then time |
| 030 | BIBPOST | Posts to the account master (VSAM random update), overdraft rules, general ledger and audit log |
| 040 | BIBINT | Daily interest accrual in packed decimal (COMP-3), banker's rounding |
| 050 | BIBFEE | Maintenance and overdraft fees |
| 060 | BIBRECN | Reconciliation: opening + postings = closing, debits = credits. If not, the job stops. |
| 070 | BIBSTMT | Month-end statements with masked account numbers |
The job stream restarts cleanly from any step without posting anything twice, and a runbook explains every return code and abend.
The security layer
Least privilege
Only the batch ID can update the masters. Tellers read.
Separation of duties
Separate IDs for operator, teller and auditor.
Audit trail
Every posting logs who, when, and the before and after balance.
Data minimization
Reports show only the last four digits of an account.
Progress
| Phase | Build | Done when | Status |
|---|---|---|---|
| 0 | TK5 up, first COBOL compile | A program runs from my own JCL | In progress |
| 1 | Copybooks, sample data, VSAM masters | Masters load and list | Planned |
| 2 | Edit + sort | Garbage input makes rejects, not abends | Planned |
| 3 | Posting | Balances, GL and audit log correct | Planned |
| 4 | Interest + fees | Hand-checked to the cent | Planned |
| 5 | Reconciliation | A broken posting fails the job loudly | Planned |
| 6 | Statements | Month-end prints, accounts masked | Planned |
| 7 | Restart | Killed mid-run, restarted, no double-posting | Planned |
| 8 | Teller inquiry | 3270 screen shows live balances | Planned |
| 9 | Security | A teller ID is denied update, with proof | Planned |
| 10 | Modernization | Same result on z/OS with DB2, from a script | Planned |
Code, job output and screenshots: github.com/aimozart/cobol-z. All data is fictional.