Discover / COBOL programming / Reading path

Learn COBOL: The Best Books for Mainframe Programming

@codesherpaBeginner → Expert
6
Books
90
Hours
4
Stages
Not yet rated

This curriculum takes a complete beginner from zero COBOL knowledge to confidently maintaining and extending real-world mainframe business systems. Each stage builds directly on the last — first establishing the language's unique syntax and mindset, then mastering data handling and file I/O, then tackling the enterprise patterns and tools that define professional mainframe work.

1

Foundations: COBOL Syntax & Mindset

Beginner

Understand COBOL's structure, divisions, data types, and basic procedural logic well enough to read and write simple programs confidently.

Study plan for this stage

Pace: 4–5 weeks, ~40–50 pages/day (approximately 200–250 pages per book)

Key concepts
  • COBOL's four-division structure (Identification, Environment, Data, Procedure) and why each division exists
  • Data types and the PICTURE clause: how to declare and define variables with proper formatting and constraints
  • The MOVE statement and data movement semantics, including type coercion and alignment rules
  • Conditional logic: IF/ELSE statements, nested conditions, and the EVALUATE statement for multi-way branching
  • Looping constructs: PERFORM loops (inline and out-of-line), PERFORM UNTIL, and PERFORM VARYING for iteration
  • Working with numeric and alphanumeric data: arithmetic operations, string manipulation, and field alignment
  • File organization basics: sequential file structure and how the Environment Division connects programs to external data
  • COBOL's verbose, English-like syntax as a design philosophy and how it affects code readability and maintenance
You should be able to answer
  • Explain the purpose of each of COBOL's four divisions and describe what code belongs in each one.
  • How does the PICTURE clause define a variable's data type, size, and format? Give examples of PICTURE clauses for numeric, alphabetic, and alphanumeric fields.
  • What is the difference between MOVE and COMPUTE statements, and when would you use each one?
  • Write a simple IF/ELSE block and an EVALUATE statement that accomplish the same conditional logic; explain the trade-offs.
  • Describe the three forms of PERFORM loops (inline, out-of-line, and PERFORM VARYING) and give a realistic scenario for each.
  • How does COBOL handle file input/output at a basic level? What role does the Environment Division play in connecting to external files?
Practice
  • Write a complete COBOL program with all four divisions that reads employee data (name, ID, salary) and displays it formatted to the screen.
  • Create a program that declares variables using PICTURE clauses for different data types (numeric with decimals, alphabetic, alphanumeric) and uses MOVE statements to transfer data between them.
  • Build a program that uses nested IF/ELSE statements to categorize employees by salary range (e.g., entry-level, mid-level, senior) and displays the category.
  • Write a program using PERFORM UNTIL to sum a series of numbers entered by the user, stopping when the user enters 0.
  • Refactor an IF/ELSE chain (with 4+ conditions) into an EVALUATE statement and compare readability.
  • Create a program that reads from a sequential file (or simulates file input) and processes each record with a PERFORM VARYING loop, calculating totals or counts.

Next up: This foundation in COBOL's structure, data handling, and control flow equips you to move into the next stage—working with more complex file operations, data validation, and modular program design—where you'll build larger, production-like systems.

COBOL for the 21st century
Nancy B. Stern · 2002 · 848 pp

The single most widely used introductory COBOL textbook, covering all four divisions, data description entries, and control structures with clear exercises. Start here to build correct mental models of how COBOL programs are laid out.

Murach's mainframe COBOL
Mike Murach · 2004 · 687 pp

Murach's paired-page format makes it ideal as a second beginner read — it reinforces syntax from Stern while immediately grounding concepts in a realistic IBM mainframe (z/OS) context, bridging pure language learning to the real environment.

2

Data Structures & File Handling

Beginner

Master COBOL's rich data manipulation features — numeric editing, tables/arrays, string handling — and learn to work with sequential, indexed (VSAM), and relative files.

Study plan for this stage

Pace: 4–5 weeks, ~40–50 pages/day (focus on chapters covering data structures, file organization, and I/O operations)

Key concepts
  • COBOL data types and numeric editing (PICTURE clauses, USAGE clauses, MOVE statements with conversion)
  • Table and array manipulation (OCCURS clause, subscripts, indexes, PERFORM VARYING)
  • String handling and manipulation (reference modification, INSPECT, STRING, UNSTRING statements)
  • Sequential file organization and processing (FD, SELECT, OPEN, READ, WRITE, CLOSE)
  • Indexed (VSAM) file organization and random/sequential access patterns
  • Relative file organization and direct access by record number
  • File status codes and error handling during I/O operations
  • Record structure design and layout for efficient file storage and retrieval
You should be able to answer
  • How do you define and use PICTURE clauses for numeric editing, and what is the difference between USAGE BINARY, USAGE COMP, and USAGE DISPLAY?
  • What is the OCCURS clause, and how do you access table elements using subscripts and indexes in PERFORM VARYING loops?
  • How do STRING, UNSTRING, and INSPECT statements work, and when would you use each for string manipulation?
  • What are the key differences between sequential, indexed (VSAM), and relative file organization in terms of access patterns and performance?
  • How do you open, read, write, and close files in COBOL, and what do file status codes tell you about I/O operation success or failure?
  • How would you design a record structure for a customer file that includes numeric fields, string fields, and a repeating group of transactions?
Practice
  • Write a COBOL program that defines a table of 100 employee records with OCCURS, then populate it with sample data and display records using subscripts and PERFORM VARYING.
  • Create a program that reads a sequential file of sales transactions, uses STRING to concatenate fields into a formatted report line, and writes the output to a new file.
  • Build a program that uses INSPECT to count occurrences of a character in a string and UNSTRING to parse a comma-separated input line into individual fields.
  • Write a program that defines numeric fields with various PICTURE clauses (9(5)V99, S9(7)COMP, etc.) and demonstrates MOVE statements with automatic conversion and numeric editing.
  • Create a sequential file processing program that reads customer records, performs calculations on numeric fields, and writes results to an output file with proper error handling using file status codes.
  • Design and code a program that creates and reads an indexed (VSAM) file with a key field, demonstrating both sequential and random access patterns with START and READ statements.

Next up: Mastering COBOL's data structures and file handling equips you with the core skills to build real-world business applications; the next stage will focus on advanced program control flow, modularization, and debugging techniques to write maintainable, production-grade COBOL systems.

Structured COBOL programming
Nancy B. Stern · 1979 · 763 pp

Stern's deeper companion volume expands on file organization (sequential, indexed, relative) and advanced data manipulation, giving you the file-I/O vocabulary that is the backbone of every business COBOL system.

3

Intermediate: Enterprise COBOL & the Mainframe Ecosystem

Intermediate

Work fluently with IBM Enterprise COBOL on z/OS, understand JCL job control, VSAM datasets, and the DB2 SQL interface used in production business systems.

Study plan for this stage

Pace: 8–10 weeks, ~25–30 pages/day (Murach's JCL: 4–5 weeks; DB2 Part 1: 4–5 weeks)

Key concepts
  • JCL syntax and structure: DD statements, EXEC statements, and dataset allocation for job submission on z/OS
  • Dataset organization: sequential, partitioned (PDS), and VSAM datasets; allocation parameters and naming conventions
  • Job control flow: condition codes, COND parameters, and step execution logic in multi-step jobs
  • Embedded SQL in COBOL: EXEC SQL blocks, host variables, and the precompilation process
  • DB2 fundamentals: tables, rows, columns, and basic SQL SELECT, INSERT, UPDATE, DELETE operations
  • Cursor handling and result set processing in COBOL programs using FETCH and OPEN/CLOSE
  • Error handling and SQLCODE interpretation for production-grade DB2 applications
  • Mainframe job execution: submitting, monitoring, and interpreting job output (SYSOUT, return codes)
You should be able to answer
  • How do you allocate a sequential dataset in JCL, and what are the key DD statement parameters (UNIT, SPACE, RECFM, LRECL)?
  • Explain the difference between a partitioned dataset (PDS) and a VSAM dataset, and when you would use each in a production environment.
  • What is the purpose of the COND parameter in a JCL EXEC statement, and how does it control conditional job step execution?
  • How do you embed SQL into a COBOL program, and what is the role of the precompiler in preparing the source code for compilation?
  • Describe the process of declaring and using host variables in embedded SQL, and how COBOL data types map to SQL data types.
  • What is a cursor in DB2, and how do you use OPEN, FETCH, and CLOSE statements to retrieve and process multiple rows in COBOL?
  • How do you interpret SQLCODE values to handle errors and exceptions in a production DB2 application?
  • What information does a job's SYSOUT contain, and how do you use it to debug failed or slow-running batch jobs?
Practice
  • Write a multi-step JCL job that allocates a sequential input dataset, a sequential output dataset, and a temporary work dataset; include EXEC statements with COND parameters to control step execution based on return codes.
  • Create a COBOL program that reads a sequential dataset allocated via JCL, performs basic record processing, and writes output to another sequential dataset; submit the job and interpret the SYSOUT.
  • Design and code a COBOL program with embedded SQL that connects to DB2, executes a SELECT statement with a WHERE clause, and retrieves results into COBOL host variables; precompile, compile, and test the program.
  • Write a COBOL program using a DB2 cursor to fetch multiple rows from a table in a loop; include error handling for SQLCODE values (0, +100, negative codes) and proper OPEN/FETCH/CLOSE sequencing.
  • Build a JCL job that allocates a VSAM dataset and calls a COBOL program that performs CRUD operations (INSERT, UPDATE, DELETE) on a DB2 table; include proper error handling and conditional step execution.
  • Create a parameterized JCL job using symbolic parameters and PARM= to pass values to a COBOL program; the program should use these parameters in a DB2 query and write results to an output dataset.

Next up: This stage equips you with the enterprise infrastructure skills (JCL, datasets, DB2) needed to work on real mainframe systems; the next stage will deepen your ability to optimize performance, handle complex transactions, and architect larger business applications.

Murach's OS/390 and z/OS JCL
Raul Menendez · 2002 · 559 pp

No mainframe COBOL programmer can work effectively without understanding Job Control Language; this book is the clearest practical introduction to JCL, DD statements, and dataset management that COBOL programs depend on.

DB2 for the COBOL Programmer. Part 1
Steve Eckols · 1992 · 382 pp

Most enterprise COBOL systems embed SQL to access DB2 databases; this book teaches embedded SQL, cursor handling, and error checking in a COBOL-first style, making it the natural next step after mastering the language itself.

4

Advanced: Maintaining & Modernizing Real Business Systems

Expert

Confidently read, debug, refactor, and extend legacy COBOL codebases; understand CICS online transaction processing; and apply modern practices to aging mainframe systems.

Study plan for this stage

Pace: 4–5 weeks, ~40–50 pages/day, with 2–3 days per week dedicated to hands-on refactoring exercises

Key concepts
  • Legacy system assessment and risk analysis: identifying technical debt, dependencies, and modernization candidates
  • Incremental refactoring strategies: safe, testable approaches to modifying production COBOL code without breaking functionality
  • Code comprehension techniques: reverse-engineering business logic from undocumented or poorly documented legacy systems
  • Testing and validation in legacy environments: creating test harnesses, regression testing, and verifying changes in mainframe contexts
  • Modernization patterns: wrapping, strangler pattern, and gradual migration of legacy COBOL to contemporary architectures
  • Performance and maintainability trade-offs: balancing system stability with the need for readable, extensible code
  • Documentation and knowledge transfer: capturing implicit business rules and system behavior for future maintainers
You should be able to answer
  • What are the key steps in assessing a legacy COBOL system before beginning modernization, and what risks should you evaluate?
  • How does the strangler pattern apply to COBOL modernization, and what are its advantages over a complete rewrite?
  • What testing strategies does Seacord recommend for validating changes to legacy COBOL code in a production environment?
  • How can you safely refactor a tightly coupled COBOL program without introducing regressions?
  • What are the trade-offs between wrapping legacy code and incrementally refactoring it, and when should each approach be used?
  • How do you extract and document implicit business logic from undocumented legacy COBOL systems?
Practice
  • Analyze a provided legacy COBOL codebase (or your own): create a dependency map, identify technical debt hotspots, and write a modernization assessment report
  • Implement a test harness around a legacy COBOL program using JUnit or a mainframe testing framework; write regression tests that verify existing behavior before refactoring
  • Refactor a tightly coupled COBOL module by extracting a subroutine, improving variable naming, and simplifying control flow; document the changes and verify no regressions occur
  • Design a strangler pattern migration for a legacy COBOL batch job: sketch how you would gradually replace it with a modern microservice while keeping the old system running
  • Reverse-engineer the business logic from a poorly documented COBOL program; create flowcharts and write plain-language documentation of what it does and why
  • Practice wrapping a legacy COBOL program with a modern API layer (e.g., REST wrapper); test that the wrapper correctly translates inputs and outputs

Next up: This stage equips you to confidently maintain and evolve real-world COBOL systems; the next stage would typically focus on specialized mainframe technologies (CICS, DB2, JCL) or emerging integration patterns that connect legacy COBOL to cloud and microservices ecosystems.

Modernizing Legacy Systems
Robert C. Seacord · 2003 · 352 pp

Provides principled strategies for incrementally restructuring and wrapping legacy code — directly applicable to the large COBOL codebases found in banking, insurance, and government — rounding out the curriculum with a professional, long-term maintenance perspective.

Discussion

Keep reading

Paths that share books, cover the same subject, or open a related topic.

More on MySQL database development

Learn MySQL: The Best Database Books, in Order

Beginner8books87 hrs4 stages
More on Godot game engine

Learn Godot: The Best Game Engine Books, in Order

Beginner7books46 hrs5 stages
More on Concurrent and parallel programming

Learn Concurrent and Parallel Programming: Best Books

Beginner8books99 hrs5 stages

More on cobol programming