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 CODASYL Committee (Grace Hopper, technical consultant)

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 reportedly continues to process the majority of ATM transactions and credit card operations worldwide, according to widely cited industry estimates.

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. Grace Hopper, who had pioneered the concept of machine-independent programming languages with FLOW-MATIC, served as a key technical consultant to the committee. COBOL was designed 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

The CODASYL committee insisted that COBOL be readable by business managers, not just programmers. This philosophy, championed by Grace Hopper, 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

  • Hundreds of billions of lines of COBOL code reportedly in production worldwide (a 2022 Micro Focus survey estimated over 800 billion)
  • Industry estimates suggest approximately $3 trillion in daily commerce processed by COBOL systems
  • A widely cited figure claims 95% of ATM transactions rely on COBOL backends, though the original methodology is unverified
  • According to Reuters (2020), approximately 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)
  • XML processing (standard); JSON support (vendor extensions)
  • Dynamic-capacity tables
  • Integration with Java and .NET
  • Unicode and internationalization support
  • Web services and RESTful APIs (via vendor implementations)

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 COBOLRocket Software (formerly Micro Focus)AllLeading commercial compiler
ACUCOBOL-GTRocket Software (formerly Micro Focus)AllCross-platform runtime
Fujitsu NetCOBOLFujitsuWindows, LinuxEnterprise COBOL compiler

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

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-600 billion globally according to Gartner
  • 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:

  • Industry surveys suggest the average COBOL programmer is between 45-58 years old
  • 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 Open Mainframe Project COBOL training program 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
CODASYL committee develops COBOL specification, approved January 1960
1960
First COBOL compilers released by RCA and Remington Rand
1968
COBOL 68 standard approved by ANSI
1974
COBOL 74 standard revises the language with improved features
1985
COBOL 85 adds scope terminators and nested programs
1997
Object-oriented COBOL draft specification published (finalized in 2002)
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-capacity tables
2023
COBOL 2023 standard approved with modern language features

Notable Uses & Legacy

Banking Systems

According to widely cited industry estimates, the majority of ATM and credit card transaction processing worldwide reportedly runs on COBOL code written decades ago.

Government Benefits

The Social Security Administration maintains over 60 million lines of COBOL code, processing over $1 trillion in annual payments to approximately 70 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 process nearly $2 trillion combined in annual healthcare spending. CMS has historically relied on legacy COBOL mainframe systems for claims processing, though active modernization efforts are underway.

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

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: