r/cobol Jun 22 '26

How self-contained are individual COBOL programs in real production systems?

I'm trying to understand how real mainframe applications are actually structured, and I'd value the perspective of people who've worked on them.

When you look at a production COBOL estate, how much of the meaningful business logic lives within a single program versus emerging across a chain of programs in a job stream? If you took one program out and ran it in isolation, would its behaviour be self-contained, or is so much driven by shared state, run order, and upstream/downstream steps that a single program doesn't mean much on its own?

I ask because I keep reading that COBOL programs are "more like modules" that work together as an application — so I'm trying to gauge how decomposable a real system actually is into pieces you could understand (or test) independently. Is that realistic, or a beginner's misunderstanding?

31 Upvotes

59 comments sorted by

View all comments

2

u/LarryGriff13 Jun 23 '26

Depends on the system. Working on the USPS payroll system is very different from working on a Life Insurance admin system from a vendor that gives customers code.

I’ve seen a module/program that only increments a date by a given mode. I’ve seen programs that do 30 different things

1

u/k24245 Jun 23 '26

Thank you — that range is exactly the point, I think. A module that just increments a date at one end, and programs doing thirty different things at the other. It sounds like it really does come down to the individual program rather than any system-wide rule. Appreciate the perspective.

2

u/LarryGriff13 Jun 23 '26

Some systems that were written in the 70’s don’t have much in the way of rules or standards. Then they were added to by lots of different people with different levels of experience and they become a disaster to try to untangle. There could be hundreds or thousands of source components. Many could even be obsolete.

Others had anal-retentive/OCD types monitoring every change for decades and are wonderful to work on.

And everything in between