Est. 1959 Intermediate

COBOL

The business programming language that still runs the world - powering banking, government, and enterprise systems for over 60 years.

Created by Grace Hopper and the CODASYL Committee

Paradigm Imperative, Procedural, Object-Oriented (COBOL 2002+)
Typing Static, Strong
First Appeared 1959
Latest Version COBOL 2023

COBOL (COmmon Business-Oriented Language) is one of the oldest programming languages still in active production use. Despite decades of predictions of its demise, COBOL continues to process an estimated 95% of ATM transactions and the majority of credit card operations worldwide.

History & Origins

In 1959, a committee of computer manufacturers, government agencies, and users formed CODASYL (Conference on Data Systems Languages) to create a common business language. Led by Grace Hopper, who had pioneered the concept of machine-independent programming languages with FLOW-MATIC, the committee designed COBOL with revolutionary goals:

  1. English-like readability - Code should read like business documentation
  2. Machine independence - Write once, run anywhere (decades before Java)
  3. Self-documenting - Programs should explain themselves to non-programmers
  4. Data processing focus - Designed for business record-keeping, not scientific calculation

The Name Behind the Language

Grace Hopper insisted that COBOL be readable by business managers, not just programmers. This philosophy shaped every aspect of the language: verbose keywords (ADD, SUBTRACT, MULTIPLY), sentence-like syntax, and extensive commenting capabilities.

Why COBOL Still Matters

Despite being 65+ years old, COBOL remains mission-critical:

1. Massive Economic Impact

  • 220 billion lines of COBOL code in production worldwide
  • $3 trillion in daily commerce processed by COBOL systems
  • 95% of ATM transactions rely on COBOL backends
  • 80% of in-person financial transactions touch COBOL code

2. If It Works, Don’t Fix It

Rewriting COBOL systems is extraordinarily risky:

  • Decades of accumulated business rules embedded in code
  • Mission-critical operations that can’t tolerate downtime
  • Cost of rewriting often exceeds hundreds of millions of dollars
  • Risk of introducing bugs in financial calculations

3. Modern COBOL Features

COBOL 2014/2023 is not your grandfather’s COBOL:

  • Object-oriented programming (classes, inheritance)
  • JSON and XML processing
  • Dynamic tables and memory allocation
  • Integration with Java and .NET
  • Unicode and internationalization support
  • Web services and RESTful APIs

The COBOL Structure

COBOL programs are organized into divisions that mirror business documentation:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.

ENVIRONMENT DIVISION.

DATA DIVISION.
WORKING-STORAGE SECTION.

PROCEDURE DIVISION.
    DISPLAY "Hello, World!".
    STOP RUN.

The Four Divisions

  1. IDENTIFICATION DIVISION - Program metadata (name, author, date)
  2. ENVIRONMENT DIVISION - Hardware and file configuration
  3. DATA DIVISION - All data structures and variables
  4. PROCEDURE DIVISION - The actual program logic

This rigid structure enforces organization and makes programs easy to navigate even decades after they were written.

COBOL’s Verbose Beauty

What looks like verbosity is actually precision:

1
2
3
4
5
ADD 1 TO CUSTOMER-COUNT.
MULTIPLY PRICE BY QUANTITY GIVING TOTAL.
IF BALANCE IS GREATER THAN CREDIT-LIMIT
    PERFORM CREDIT-CHECK
END-IF.

Every statement reads like a business rule. Non-programmers can understand what the code does, making maintenance easier across generations of developers.

Modern COBOL Compilers

Several compilers keep COBOL alive:

CompilerVendorPlatformsNotes
GnuCOBOLOpen SourceAllFree, COBOL 85/2002/2014 support
IBM Enterprise COBOLIBMz/OS, LinuxMainframe standard
Micro Focus COBOLMicro FocusAllLeading commercial compiler
ACUCOBOL-GTMicro FocusAllCross-platform runtime
Fujitsu NetCOBOLFujitsuWindows, LinuxJapanese market leader

For this tutorial series, we’ll use GnuCOBOL (formerly OpenCOBOL), which is free, open-source, and produces native executables.

Getting Started

COBOL code is typically stored in files with extensions:

  • .cob, .cbl - Standard COBOL source
  • .cpy - Copybooks (shared code/data definitions)

The typical workflow with GnuCOBOL:

1
2
3
4
5
# Compile to executable
cobc -x -free program.cob

# Run
./program

The -free flag enables free-format source (no column restrictions), while -x creates an executable.

The Y2K Legacy

The year 2000 problem thrust COBOL into public consciousness. When programmers in the 1960s-70s used 2-digit years to save memory, they created a ticking time bomb. The worldwide effort to fix billions of lines of COBOL code:

  • Cost an estimated $300 billion globally
  • Created massive demand for COBOL programmers
  • Proved COBOL’s continued importance
  • Highlighted the risks of technical debt

Many “temporary” patches applied during Y2K remain in production today.

The COBOL Skills Gap

As original COBOL programmers retire, organizations face a crisis:

  • Average COBOL programmer age is 55+
  • University CS programs rarely teach COBOL
  • Mainframe knowledge becoming rare
  • Critical systems at risk without maintainers

This creates opportunities: COBOL programmers command premium salaries, and initiatives like IBM’s “Call for Code” aim to attract new talent to the language.

Modern Integration

Contemporary COBOL isn’t isolated:

  • Java interoperability - Call Java from COBOL and vice versa
  • Web services - COBOL programs expose REST/SOAP APIs
  • Databases - Seamless integration with DB2, Oracle, PostgreSQL
  • Cloud deployment - Mainframe applications moving to cloud platforms
  • Container orchestration - COBOL microservices in Kubernetes

Continue to the Hello World tutorial to write your first COBOL program.

Timeline

1959
COBOL specification published by CODASYL committee
1960
First COBOL compilers released by RCA and Remington Rand
1968
COBOL 68 standard approved by ANSI
1974
COBOL 74 standard introduces structured programming features
1985
COBOL 85 adds scope terminators and nested programs
1997
Object-oriented COBOL (COBOL 97) introduces classes and objects
1999-2000
Y2K crisis highlights COBOL's dominance in legacy systems
2002
COBOL 2002 standard enhances OO features and Unicode support
2014
COBOL 2014 standard adds dynamic tables and JSON support
2023
COBOL 2023 standard approved with modern language features

Notable Uses & Legacy

Banking Systems

95% of ATM transactions and the majority of credit card processing worldwide run on COBOL code written decades ago.

Government Benefits

Social Security Administration processes billions in payments using COBOL systems managing over 60 million beneficiaries.

Insurance Industry

Major insurance companies process claims and manage policies with COBOL applications containing millions of lines of code.

Airline Reservations

Legacy airline booking systems still rely on COBOL for their core transaction processing and inventory management.

Healthcare Claims

Medicare and Medicaid systems process over a trillion dollars in annual claims through COBOL-based infrastructure.

Retail Point-of-Sale

Major retailers' backend systems for inventory, pricing, and transaction processing still depend on COBOL.

Language Influence

Influenced By

FLOW-MATIC COMTRAN FACT

Influenced

PL/I ABAP Structured programming

Running Today

Run examples using the official Docker image:

docker pull esolang/cobol:latest

Example usage:

docker run --rm -v $(pwd):/app -w /app esolang/cobol sh -c 'cobc -x -free hello.cob && ./hello'

Topics Covered

Last updated: