Est. 1964 Intermediate

PL/I

IBM's ambitious 'one language to rule them all' - combining scientific, commercial, and systems programming in a single powerful language.

Created by IBM (SHARE and GUIDE user groups)

Paradigm Imperative, Procedural, Structured
Typing Static, Strong
First Appeared 1964
Latest Version Enterprise PL/I 6.1 (2023)

PL/I (Programming Language One) was IBM’s audacious attempt in the 1960s to create a universal programming language that could handle scientific computation (like FORTRAN), business data processing (like COBOL), and systems programming (like assembly language) - all in one coherent language. While it never achieved universal dominance, PL/I became one of the most powerful and feature-rich languages ever created, influencing numerous successor languages and still running critical systems today.

History & Origins

The NPL Project (1963)

In October 1963, IBM faced a problem: their customers used multiple incompatible languages on different systems. Scientific users demanded FORTRAN for calculations, business users required COBOL for data processing, and systems programmers needed assembly for low-level control. Each language required separate compilers, training, and maintenance.

IBM’s SHARE (scientific users) and GUIDE (commercial users) groups formed a committee to design NPL (New Programming Language) - a single language to replace them all.

The Vision

The design committee wanted a language that could:

  1. Scientific Computing - Complex mathematics like FORTRAN
  2. Business Data Processing - Record handling like COBOL
  3. Systems Programming - Low-level control like assembly
  4. String Processing - Text manipulation capabilities
  5. List Processing - Dynamic data structures
  6. Real-Time Control - Interrupt handling and concurrency

This was an incredibly ambitious goal for 1963.

From NPL to PL/I (1964)

The name “NPL” conflicted with the UK’s National Physical Laboratory, so it became MPPL (MultiPurpose Programming Language), then finally PL/I - “Programming Language One” - in 1964. The Roman numeral “I” emphasized its intended role as the first and only language anyone would need.

The IBM System/360 Connection

PL/I was designed alongside IBM’s revolutionary System/360 mainframe family:

  • Unified Architecture - One language for one computer family
  • Compatibility - Code portable across all System/360 models
  • Modern Features - Structured programming, recursion, exceptions
  • Comprehensive - Combined the best features of existing languages

Why PL/I Mattered

Despite not becoming the universal language IBM envisioned, PL/I introduced groundbreaking concepts:

1. Exception Handling

PL/I pioneered structured exception handling in the 1960s:

ON ENDFILE(INPUT) GOTO FINISHED;
ON ZERODIVIDE BEGIN;
    PUT LIST('Division by zero!');
    GOTO RECOVERY;
END;
ON ERROR SYSTEM;

This influenced CLU (1970s), Ada (1980s), C++ (1990s), and eventually Java and C#.

2. Multitasking and Concurrency

PL/I included built-in concurrent programming:

DECLARE TASK1 TASK;
DECLARE TASK2 TASK;

CALL TASK1 EVENT(E1);
CALL TASK2 EVENT(E2);
WAIT(E1, E2);

Revolutionary for a mainstream language in the 1960s.

3. Dynamic Storage Management

Automatic memory management with multiple storage classes:

DECLARE P POINTER;
DECLARE 1 NODE BASED(P),
    2 VALUE FIXED BINARY,
    2 NEXT POINTER;

ALLOCATE NODE;           /* Dynamic allocation */
FREE P;                  /* Manual deallocation */

4. Flexible Data Types

PL/I offered unprecedented data type flexibility:

DECLARE FIXED DECIMAL(10,2);         /* Decimal arithmetic */
DECLARE FLOAT DECIMAL(16);           /* Floating point */
DECLARE BIT(8) ALIGNED;              /* Bit strings */
DECLARE CHARACTER(100) VARYING;      /* Variable strings */

5. Compile-Time Facilities

Preprocessor and conditional compilation:

%DECLARE DEBUG BIT;
%DEBUG = '1'B;

%IF DEBUG %THEN
    PUT LIST('Debug mode enabled');
%ENDIF;

6. Block Structure and Scope

Proper lexical scoping with nested blocks:

PROC: PROCEDURE OPTIONS(MAIN);
    DECLARE X FIXED;
    X = 10;

    BLOCK: BEGIN;
        DECLARE X FIXED;  /* Different X */
        X = 20;
    END BLOCK;

    /* X is still 10 here */
END PROC;

Modern PL/I Features

Strong Typing with Flexibility

DECLARE 1 EMPLOYEE,
    2 ID FIXED BINARY,
    2 NAME CHARACTER(50) VARYING,
    2 SALARY FIXED DECIMAL(10,2),
    2 HIRE_DATE,
        3 YEAR FIXED,
        3 MONTH FIXED,
        3 DAY FIXED;

Array Processing

DECLARE A(10,10) FIXED,
        B(10,10) FIXED,
        C(10,10) FIXED;

C = A + B;  /* Element-wise array addition */

Built-in Functions

Hundreds of built-in functions:

DECLARE X FLOAT;
X = SQRT(2);
X = SIN(3.14159);
X = LOG(10);
X = MAX(A, B, C);

String Manipulation

Powerful string handling:

DECLARE TEXT CHARACTER(100) VARYING;
DECLARE POS FIXED;

TEXT = 'Hello, World!';
POS = INDEX(TEXT, 'World');          /* Find substring */
TEXT = SUBSTR(TEXT, 1, 5);           /* Extract substring */
TEXT = TEXT || ' PL/I';              /* Concatenation */

File I/O

Sophisticated file handling:

DECLARE INFILE FILE RECORD INPUT;
DECLARE OUTFILE FILE RECORD OUTPUT;

OPEN FILE(INFILE);
READ FILE(INFILE) INTO(RECORD);
WRITE FILE(OUTFILE) FROM(RECORD);
CLOSE FILE(INFILE);

The Multics Legacy

PL/I’s most famous use was in Multics (Multiplexed Information and Computing Service), a revolutionary time-sharing operating system developed by MIT, Bell Labs, and GE (1965-1969):

Why Multics Chose PL/I

  1. High-Level Systems Programming - Write OS code without assembly
  2. Strong Typing - Catch bugs at compile time
  3. Modular Structure - Build complex systems manageable
  4. Exception Handling - Robust error recovery
  5. Concurrent Programming - Native multitasking support

Multics Influenced Unix

When Bell Labs left the Multics project, Ken Thompson and Dennis Ritchie took lessons learned and created Unix. They initially considered using PL/I but found it too complex, leading to the creation of C - a simpler systems programming language.

The Connection:

  • Multics (PL/I) → influenced → Unix (C) → influenced → Linux/BSD
  • PL/I’s exception handling → C’s setjmp/longjmp → C++ exceptions
  • PL/I’s structured programming → C’s { } blocks
  • PL/I’s file I/O → Unix’s file descriptors

PL/I vs C

The relationship between PL/I and C is fascinating:

FeaturePL/I (1964)C (1972)
PhilosophyFeature-rich, comprehensiveMinimal, composable
ExceptionsNative ON conditionssetjmp/longjmp
StringsBuilt-in varying stringsNull-terminated char arrays
ArraysFlexible bounds, slicingFixed bounds, pointer arithmetic
I/ORich file operationsSimple stdio
ConcurrencyBuilt-in TASKNone (use libraries)
ComplexityVery highVery low

C won because it was simpler, more portable, and came with Unix. But many of PL/I’s ideas later appeared in C++, Java, and C#.

Available Compilers

IBM Enterprise PL/I

The flagship commercial compiler:

  • Platform - z/OS mainframes
  • Standards - Full PL/I support + extensions
  • Performance - Highly optimized
  • Cost - Enterprise licensing

Iron Spring PL/I

Cross-platform open compiler:

  • Platforms - Linux, OS/2, Windows (via WSL)
  • License - Free for non-commercial use
  • Compatibility - High IBM mainframe compatibility
  • Active - Regular updates (tested on Ubuntu 24.04 in 2024)

Historic Compilers

  • PL/I for GCC - Open source GCC front-end
  • Micro Focus PL/I - Unix systems
  • Kednos PL/I - Various platforms (discontinued)

File Extensions

PL/I programs use various extensions:

  • .pli - Most common (Iron Spring, modern compilers)
  • .pl1 - Traditional extension
  • .plx - PL/I executable source
  • .inc - Include files

PL/I’s Strengths and Weaknesses

Strengths

  1. Comprehensive Feature Set - Built-in solutions for most problems
  2. Powerful Data Structures - Flexible, self-describing
  3. Excellent Decimal Arithmetic - Perfect for financial calculations
  4. Strong Exception Handling - Robust error management
  5. Mature Ecosystem - Decades of libraries and tools
  6. Backward Compatibility - 1960s code still runs

Weaknesses

  1. Complexity - Huge language with steep learning curve
  2. Verbosity - Code can be lengthy
  3. Limited Portability - Mainframe-centric
  4. Smaller Community - Compared to C, Java, Python
  5. Tooling - Modern IDE support limited
  6. Legacy Perception - Seen as “old” technology

Why PL/I Didn’t Become Universal

Despite IBM’s vision, PL/I failed to replace all languages:

  1. Complexity - Too large, too difficult to learn completely
  2. Compiler Size - Early PL/I compilers were massive (gigantic for 1960s hardware)
  3. Compilation Speed - Very slow on 1960s mainframes
  4. Unix & C - The rise of Unix with simpler C
  5. Specialization - FORTRAN and COBOL communities stayed loyal
  6. IBM Lock-In - Perceived as IBM-only technology

But its influence spread through C, Ada, and modern languages.

PL/I Today

Where PL/I Still Runs

  1. Banking & Finance - Core transaction systems
  2. Insurance - Policy and claims processing
  3. Government - Tax, social services systems
  4. IBM Mainframes - z/OS enterprise applications
  5. Legacy Modernization - Migration projects

The Modernization Challenge

Organizations face tough choices with PL/I code:

  • Keep - Stable, reliable, well-understood
  • Rewrite - Risky, expensive, time-consuming
  • Hybrid - Wrap PL/I in modern APIs
  • Maintain - Train new developers in PL/I

Learning Resources

Active PL/I resources:

  • IBM PL/I Documentation - ibm.com/pli
  • Iron Spring PL/I - www.iron-spring.com
  • PL/I Language Reference - IBM manuals (comprehensive)
  • Multics PL/I - multicians.org (historical)
  • comp.lang.pl1 - Usenet newsgroup (still active)

PL/I Philosophy

PL/I embodied 1960s optimism about computing:

  1. One Language For All - Unify scientific, business, systems programming
  2. Feature Richness - Include everything users might need
  3. Default Behavior - Make common cases automatic
  4. Flexibility - Allow multiple ways to solve problems
  5. Power - Give programmers full control when needed

This contrasts with Unix philosophy (simple tools, compose them) that eventually dominated.

Comparison with Contemporaries

LanguageYearFocusPhilosophy
FORTRAN1957Scientific computingNumeric performance
COBOL1959Business data processingEnglish readability
ALGOL 601960Academic, structuredFormal elegance
PL/I1964UniversalFeature completeness
BASIC1964EducationBeginner-friendly
C1972Systems programmingMinimalism

PL/I tried to be all of these combined.

The “Swiss Army Chainsaw” Reputation

PL/I earned the nickname “Swiss Army Chainsaw” - incredibly powerful but potentially dangerous:

Power

/* Multiple ways to declare the same thing */
DECLARE X FIXED BINARY(31);
DCL X FIXED BIN(31);
DCL X FIXED BIN;

Danger (Default Attributes)

/* Without explicit declaration, compiler infers: */
/* Variables starting with I-N are FIXED BINARY */
/* Others are FLOAT DECIMAL */
TOTAL = I + J;  /* Could be disaster if you meant FIXED! */

This flexibility caused bugs, leading modern languages to require explicit declarations.

PL/I Innovations Still Used Today

Even if you’ve never written PL/I, you use its inventions daily:

  1. Exception Handling - Try/catch in Java, C++, Python
  2. Structured Programming - Begin/end blocks everywhere
  3. Varying Strings - std::string in C++, String in Java
  4. Array Slicing - Python, NumPy, modern languages
  5. Decimal Arithmetic - Financial libraries
  6. Multitasking - Concurrent programming primitives

The Documentary Record

PL/I’s development is well-documented:

  • IBM Archives - Design documents, committee notes
  • Multics Papers - Systems programming experience
  • SHARE Proceedings - User group discussions
  • Language Standards - ANSI X3.53, ISO/IEC 6522

This makes PL/I a fascinating case study in programming language design.

A Language Ahead of Its Time

Many PL/I features weren’t fully appreciated until decades later:

  • Exception Handling (1964) - Mainstream in 1990s with Java
  • Generic Programming (1970s) - Templates in C++ (1990s)
  • Concurrent Tasks (1964) - Async/await in modern languages
  • Decimal Arithmetic (1964) - Still crucial for finance
  • Preprocessor (1964) - C preprocessor, template metaprogramming

Why Study PL/I Today?

Even if you never write production PL/I:

  1. Historical Understanding - How did we get here?
  2. Language Design - What works, what doesn’t
  3. Career Opportunity - Well-paid maintenance work
  4. Influence Recognition - See PL/I’s DNA in modern languages
  5. Systems Thinking - Learn comprehensive systems programming

The Verdict

PL/I aimed to be the ultimate programming language and fell short of that impossible goal. But it succeeded in other ways:

  • Proved high-level systems programming worked (Multics)
  • Pioneered language features we take for granted
  • Ran and runs critical systems for 60+ years
  • Influenced every major language that came after

PL/I is a monument to ambitious language design - flawed, powerful, and undeniably important.

Continue to the Hello World tutorial to write your first PL/I program.

Timeline

1963
SHARE and GUIDE committees form to design NPL (New Programming Language)
1964
NPL renamed to MPPL, then PL/I (Programming Language One) to avoid conflicts
1965
First PL/I compiler (PL/I F) delivered for IBM System/360
1966
PL/I officially announced and begins commercial use
1969
PL/I D (Debugging) compiler released with improved error messages
1971
PL/I Optimizing Compiler released for better performance
1976
ANSI standard X3.53-1976 established
1987
ISO/IEC 6522 international standard ratified
1991
IBM introduces PL/I for MVS & VM (major modernization)
1999
Enterprise PL/I for z/OS released with modern features
2007
Iron Spring Software launches cross-platform PL/I compiler for Linux and OS/2
2023
IBM Enterprise PL/I 6.1 released with enhanced optimization

Notable Uses & Legacy

Multics Operating System

The revolutionary time-sharing OS that influenced Unix was largely written in PL/I, demonstrating the language's systems programming capabilities.

IBM Mainframe Applications

Billions of lines of mission-critical financial, insurance, and government systems still run in PL/I on IBM mainframes worldwide.

NASA Space Programs

PL/I was used extensively in NASA's Apollo program and Space Shuttle mission planning systems.

Financial Services

Major banks and financial institutions maintain massive PL/I codebases for transaction processing and accounting systems.

Insurance Industry

Policy management, claims processing, and actuarial systems in PL/I power insurance companies globally.

Government Systems

Tax processing, social security, and public administration systems rely on decades-old PL/I code.

Language Influence

Influenced By

FORTRAN ALGOL 60 COBOL

Influenced

C Ada PL/M PL/S Mesa

Running Today

Run examples using the official Docker image:

docker pull codearchaeology/pli:latest

Example usage:

docker run --rm -v $(pwd):/app -w /app codearchaeology/pli:latest sh -c 'plic hello.pli && ./hello'

Topics Covered

Last updated: