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)
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:
- Scientific Computing - Complex mathematics like FORTRAN
- Business Data Processing - Record handling like COBOL
- Systems Programming - Low-level control like assembly
- String Processing - Text manipulation capabilities
- List Processing - Dynamic data structures
- 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
- High-Level Systems Programming - Write OS code without assembly
- Strong Typing - Catch bugs at compile time
- Modular Structure - Build complex systems manageable
- Exception Handling - Robust error recovery
- 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:
| Feature | PL/I (1964) | C (1972) |
|---|---|---|
| Philosophy | Feature-rich, comprehensive | Minimal, composable |
| Exceptions | Native ON conditions | setjmp/longjmp |
| Strings | Built-in varying strings | Null-terminated char arrays |
| Arrays | Flexible bounds, slicing | Fixed bounds, pointer arithmetic |
| I/O | Rich file operations | Simple stdio |
| Concurrency | Built-in TASK | None (use libraries) |
| Complexity | Very high | Very 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
- Comprehensive Feature Set - Built-in solutions for most problems
- Powerful Data Structures - Flexible, self-describing
- Excellent Decimal Arithmetic - Perfect for financial calculations
- Strong Exception Handling - Robust error management
- Mature Ecosystem - Decades of libraries and tools
- Backward Compatibility - 1960s code still runs
Weaknesses
- Complexity - Huge language with steep learning curve
- Verbosity - Code can be lengthy
- Limited Portability - Mainframe-centric
- Smaller Community - Compared to C, Java, Python
- Tooling - Modern IDE support limited
- Legacy Perception - Seen as “old” technology
Why PL/I Didn’t Become Universal
Despite IBM’s vision, PL/I failed to replace all languages:
- Complexity - Too large, too difficult to learn completely
- Compiler Size - Early PL/I compilers were massive (gigantic for 1960s hardware)
- Compilation Speed - Very slow on 1960s mainframes
- Unix & C - The rise of Unix with simpler C
- Specialization - FORTRAN and COBOL communities stayed loyal
- 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
- Banking & Finance - Core transaction systems
- Insurance - Policy and claims processing
- Government - Tax, social services systems
- IBM Mainframes - z/OS enterprise applications
- 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:
- One Language For All - Unify scientific, business, systems programming
- Feature Richness - Include everything users might need
- Default Behavior - Make common cases automatic
- Flexibility - Allow multiple ways to solve problems
- Power - Give programmers full control when needed
This contrasts with Unix philosophy (simple tools, compose them) that eventually dominated.
Comparison with Contemporaries
| Language | Year | Focus | Philosophy |
|---|---|---|---|
| FORTRAN | 1957 | Scientific computing | Numeric performance |
| COBOL | 1959 | Business data processing | English readability |
| ALGOL 60 | 1960 | Academic, structured | Formal elegance |
| PL/I | 1964 | Universal | Feature completeness |
| BASIC | 1964 | Education | Beginner-friendly |
| C | 1972 | Systems programming | Minimalism |
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:
- Exception Handling - Try/catch in Java, C++, Python
- Structured Programming - Begin/end blocks everywhere
- Varying Strings - std::string in C++, String in Java
- Array Slicing - Python, NumPy, modern languages
- Decimal Arithmetic - Financial libraries
- 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:
- Historical Understanding - How did we get here?
- Language Design - What works, what doesn’t
- Career Opportunity - Well-paid maintenance work
- Influence Recognition - See PL/I’s DNA in modern languages
- 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
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
Influenced
Running Today
Run examples using the official Docker image:
docker pull codearchaeology/pli:latestExample usage:
docker run --rm -v $(pwd):/app -w /app codearchaeology/pli:latest sh -c 'plic hello.pli && ./hello'