Prerequisites
This book assumes no prior knowledge of COBOL, no access to a mainframe, and no special hardware or software beyond a standard personal computer. It does, however, assume that you are not a complete beginner to programming. Below is an honest accounting of what you need to bring to this book and what you do not.
What You Need
Basic Programming Concepts
You should be familiar with the fundamental concepts that all programming languages share. You do not need to be an expert in any of them, but you should recognize and understand the following:
-
Variables and data types. You know that a variable is a named storage location that holds a value, and that values can be of different types such as integers, decimal numbers, and strings of text. You understand that declaring a variable means telling the program what kind of data it will hold.
-
Control structures. You have used conditional statements (if/else or equivalent) to make decisions in code. You have used loops (for, while, or equivalent) to repeat operations. You understand that programs execute sequentially unless a control structure directs otherwise.
-
Input and output. You have written programs that accept input from the user or from a file and produce output to the screen or to a file. You understand the basic concept of reading data, processing it, and writing results.
-
Functions or procedures. You understand the concept of breaking a program into smaller, reusable units of logic. Whether you call them functions, methods, subroutines, or procedures, you have used them in at least one language.
-
Basic data organization. You have some familiarity with arrays or lists -- the idea of storing multiple values in an ordered collection and accessing them by position.
Familiarity with at Least One Programming Language
You should have written programs in at least one language, even if your experience is limited to an introductory course or a self-study tutorial. The language does not matter. Whether your background is in Python, Java, JavaScript, C, C#, Ruby, Go, or any other language, the transferable concepts are the same. What matters is that you have experienced the cycle of writing code, encountering errors, debugging, and producing working software. That experience gives you the mental framework needed to learn a new language.
If your only programming experience is with visual or block-based environments (such as Scratch or visual workflow tools), you should consider completing an introductory text-based programming course before starting this book.
Comfort with the Command Line
You should be able to open a terminal or command prompt on your operating system and perform basic operations: navigating directories, listing files, running a command with arguments, and interpreting simple output. COBOL programs are compiled and run from the command line, and while the commands involved are straightforward, you should not be encountering a terminal for the first time when you start Chapter 1.
If you need a refresher, spend an hour with any introductory command-line tutorial for your operating system before beginning.
A Computer with Internet Access
You need a computer running Windows, macOS, or Linux on which you can install GnuCOBOL, the free, open-source COBOL compiler used throughout this book. The hardware requirements are modest: any computer manufactured in the last decade will be more than sufficient. You need internet access to download the compiler, access the IBM Z Xplore platform (if you choose to use it), and reach the online resources referenced in the further-reading sections.
What You Do NOT Need
It is equally important to understand what this book does not require, because misconceptions about COBOL's prerequisites discourage many potential learners before they begin.
You do not need mainframe experience. The majority of this book's examples can be compiled and run on your personal computer using GnuCOBOL. When the text covers mainframe-specific topics such as JCL, CICS, and DB2, it explains them from the ground up. You will not be expected to know what a DASD volume is or how RACF works before the chapters that teach you.
You do not need prior COBOL knowledge. Chapter 1 begins with the assumption that you have never seen a line of COBOL. Every verb, clause, division, and concept is introduced, explained, and demonstrated before it is used in exercises.
You do not need special hardware. COBOL's association with mainframes leads many people to assume that learning it requires access to an IBM Z system. It does not. GnuCOBOL runs on ordinary personal computers, and the IBM Z Xplore program provides free remote access to a z/OS environment for the chapters where mainframe-specific practice is beneficial.
You do not need any paid software. GnuCOBOL is free. The text editors and terminal applications you need are included with your operating system or available as free downloads. IBM Z Xplore is free to register. You can complete this entire book without spending a dollar on software.
You do not need a background in finance or business. While this book uses business-oriented examples -- particularly in the later parts on financial systems -- all domain concepts are explained in context. You do not need to know what a general ledger is before reading the chapter that teaches you how to build one in COBOL.
Self-Assessment Checklist
Before you begin Chapter 1, review the following ten questions. You do not need to answer all of them correctly, but you should be able to answer at least seven with confidence. If fewer than seven feel familiar, consider reviewing an introductory programming resource before starting this book.
-
What is a variable, and why do programming languages require you to declare them?
-
What is the difference between an integer and a floating-point number?
-
Write pseudocode (in any style) for a program that reads a list of ten numbers and prints the largest one.
-
What does an
if/elsestatement do? Give a one-sentence explanation. -
What is a loop, and what is the difference between a loop that runs a fixed number of times and one that runs until a condition is met?
-
What is a function (or subroutine or method)? Why are they useful?
-
What is an array? How do you access the third element of an array?
-
In the terminal or command prompt on your computer, how would you list the files in the current directory?
-
What does it mean to "compile" a program? How is a compiled language different from an interpreted language?
-
If a program produces an error message that says "unexpected end of file," what do you think might have gone wrong?
If these questions feel comfortable, you are ready to begin. If some of them gave you pause, that is fine -- the early chapters of this book move at a measured pace and provide thorough explanations. But if most of these questions feel unfamiliar, invest a few weeks in an introductory programming course first. The time spent will pay dividends throughout your study of COBOL.
The Right Mindset
The final prerequisite is not technical. It is attitudinal.
COBOL is a language that rewards patience and penalizes haste. It is verbose by design -- the language was created so that its programs could be read and understood by business managers, not just by programmers. A COBOL program that moves a value from one variable to another says MOVE CUSTOMER-NAME TO OUTPUT-NAME, not out = cust. This is not a limitation. It is a design choice that has allowed COBOL programs to remain maintainable for fifty, sixty, and even sixty-five years.
If you approach COBOL expecting it to feel like Python or JavaScript, you will be frustrated. COBOL does not prioritize brevity, and it does not reward cleverness. It prioritizes clarity, precision, and reliability. A well-written COBOL program reads almost like a set of business instructions written in English. That readability is the reason banks trust COBOL with trillions of dollars in daily transactions, and it is the quality you should aspire to in your own code.
Embrace the structure. Embrace the divisions, the sections, the paragraphs, the level numbers, the PICTURE clauses. Embrace the fact that a COBOL program tells you exactly what it is doing at every step, with no ambiguity and no shortcuts. Once you stop fighting the verbosity and start working with it, you will discover that COBOL is not merely an old language that refuses to die. It is a language that was designed with deep wisdom about what makes software last.
You are about to learn the language that runs the world. Bring your patience, your curiosity, and your willingness to think differently about what good code looks like.
That is all you need.