Preface
The Gap Between Knowing COBOL and Using It
You have learned COBOL. You can write a program with four divisions, define data items with PICTURE clauses, code a PERFORM loop, read a sequential file, and display output. You passed your introductory course. You may even have felt confident.
Then you looked at a production COBOL program -- perhaps at an internship, perhaps in an open-source repository, perhaps in a job posting's technical screening -- and you realized that what you know and what the enterprise expects are separated by a chasm. The production program was 8,000 lines long. It called six subprograms. It processed three files simultaneously while issuing embedded SQL against a DB2 database. It ran inside CICS, responding to terminal input in a pseudo-conversational loop. Its error handling was more complex than any program you had written in its entirety. And someone expected you to understand it, modify it, and not break it.
This book exists to close that chasm.
Why an Intermediate COBOL Book
The COBOL publishing landscape has a conspicuous gap. There are introductory textbooks that teach the language from scratch -- and one of them, Learning COBOL Programming, is the direct predecessor to this volume. There are IBM reference manuals that document every compiler option and language feature with exhaustive precision. There are scattered blog posts, forum threads, and conference presentations that address specific advanced topics.
What has been missing is a systematic, comprehensive textbook that takes a programmer who has completed an introductory course and develops them into someone who can work on production enterprise systems. A book that does not merely teach more syntax but teaches the judgment, the patterns, the defensive habits, and the architectural awareness that distinguish a student who has learned COBOL from a practitioner who can use it.
That is the book you are holding.
What "Intermediate" Means
In this textbook, "intermediate" does not mean "harder exercises with the same concepts." It means a fundamental shift in perspective.
A beginning COBOL programmer asks: Does my program compile and produce correct output? An intermediate COBOL programmer asks: Is my program structured so that another programmer can read and maintain it? Does it handle every error condition that production data will throw at it? Does it integrate correctly with the databases, transaction monitors, and batch pipelines that surround it? Will it perform acceptably when processing millions of records instead of dozens?
The shift from the first question to the second is the shift from student to practitioner. Every chapter, every exercise, and every case study in this book is designed to develop that practitioner's mindset.
The Scope of This Book
This book covers forty-five chapters organized in nine parts, progressing from a rigorous revisiting of foundations through file processing mastery, data manipulation, modular design, database and transaction processing, testing and quality, enterprise architecture, and three comprehensive capstone projects.
The technical coverage includes advanced data description and numeric precision, structured program design, sequential and indexed (VSAM) file processing, sort and merge operations, Report Writer, string handling and table processing, intrinsic functions, date and time processing, CALL linkage and parameter passing, nested programs, object-oriented COBOL, inter-language communication, embedded SQL with DB2, CICS online transaction processing, IMS database access, transaction design patterns, debugging strategies, unit testing, code review, performance tuning, migration and modernization, batch processing patterns, real-time integration, and legacy code archaeology.
Each chapter includes exercises at multiple cognitive levels, quizzes, two case studies grounded in realistic business scenarios, key takeaways, and curated further reading.
The Dual-Platform Approach
Like its predecessor, this book supports two COBOL environments: GnuCOBOL, the free, open-source compiler that runs on Windows, macOS, and Linux, and IBM Enterprise COBOL, the industry-standard compiler for z/OS mainframe environments. Platform-specific information is clearly marked with [GnuCOBOL] and [IBM Enterprise COBOL] tags throughout the text.
GnuCOBOL allows you to practice the majority of this book's material on your personal computer. For the chapters on CICS, DB2, IMS, and mainframe-specific topics, the IBM Z Xplore program provides free remote access to a z/OS environment, and the text includes guidance on adapting exercises for both platforms.
Three Running Examples
Throughout this textbook, three running examples ground abstract concepts in realistic scenarios:
GlobalBank, a midsized commercial bank with a mainframe-based core banking system, illustrates COBOL in the financial sector -- transaction processing, interest calculation, batch pipelines, and the modernization challenges facing a bank with forty years of COBOL code.
MedClaim, a regional health insurance company, illustrates COBOL in the healthcare domain -- claims adjudication, EDI processing, regulatory compliance, and the extraordinary complexity of business rules in insurance systems.
The Student Mainframe Lab provides a controlled learning environment where you can practice without risking production systems, bridging the gap between textbook exercises and enterprise reality.
The people who work at these organizations -- Maria, Derek, Priya, James, Sarah, and Tomas -- are composite characters drawn from real enterprise COBOL professionals. Their experiences, mistakes, and insights will illuminate the material in ways that code listings alone cannot.
Who This Book Is For
This book is for anyone who has completed an introductory COBOL course and wants to develop the skills required for professional enterprise COBOL development. Whether you are a university student progressing through a two-semester COBOL sequence, a career changer building toward your first COBOL position, an experienced programmer from another language adding COBOL to your skill set, or a mainframe professional deepening your understanding of the application code that runs on the platforms you support -- this book is designed to take you from where you are to where the enterprise needs you to be.
Grace Hopper's Continuing Legacy
The spirit of Rear Admiral Grace Murray Hopper -- her insistence that programming languages should serve people, her conviction that readability matters, her impatience with the phrase "we have always done it this way" -- runs through every chapter of this book. The intermediate COBOL programmer does not merely learn more features of the language Hopper helped create. The intermediate COBOL programmer begins to understand why the language was designed the way it was, and why those design decisions have allowed COBOL programs to remain in production for sixty-five years and counting.
We hope this book serves you as well on the next stage of your journey as Learning COBOL Programming served you on the first.
The authors April 2026