REXX
The scripting language that powered IBM mainframes - designed for human readability and still running enterprise systems worldwide.
Created by Mike Cowlishaw (IBM)
REXX (Restructured Extended Executor) is a scripting language designed by Mike Cowlishaw at IBM in 1979. Created with the explicit goal of being easy to read and write, REXX became one of the most successful scripting languages in computing history, particularly in the mainframe and enterprise computing world.
History & Origins
Mike Cowlishaw developed REXX at IBM’s UK laboratory in Hursley, England. Frustrated with the limitations of existing scripting tools on VM/CMS (specifically EXEC and EXEC 2), he designed a language that would be powerful enough for serious programming while remaining accessible to non-programmers.
The Design Philosophy
Cowlishaw articulated several key principles that shaped REXX:
- Human-oriented design - The language should be easy for humans to read and write
- Minimal special characters - Reduce the need for obscure symbols
- Free-form syntax - No rigid column requirements or complex formatting rules
- Powerful string handling - Strings are the fundamental data type
- Decimal arithmetic - Use human-friendly decimal math, not binary floating point
The Name
Originally called REX (Reformed EXecutor), the name gained a second ‘X’ in 1982 to become REXX, avoiding confusion with other IBM products. The “Restructured Extended Executor” backronym came later.
Why REXX Was Revolutionary
In an era of complex languages with rigid syntax, REXX stood out:
1. True Readability
| |
No obscure symbols, no complex declarations—just readable code that does what it says.
2. Strings as the Universal Type
In REXX, everything is a string. Numbers, commands, variable names—all are strings that can be manipulated with powerful built-in functions:
| |
3. Decimal Arithmetic
REXX uses arbitrary-precision decimal arithmetic, avoiding the floating-point surprises that plague other languages:
| |
4. Seamless System Integration
REXX can pass commands directly to the host operating system:
| |
REXX Implementations
REXX runs on virtually every platform:
| Implementation | Platform | Notes |
|---|---|---|
| IBM REXX | z/OS, VM/CMS, OS/2 | The original, still in production |
| Regina REXX | All platforms | Most popular open-source implementation |
| ooRexx | All platforms | Object-oriented extension, open source |
| NetRexx | JVM | REXX-like language for Java platform |
| ARexx | AmigaOS | Pioneered inter-application scripting |
| Brexx | DOS, Windows | Lightweight implementation |
| r4 | Windows | Commercial implementation |
For this tutorial series, we’ll use Regina REXX, the most widely available open-source implementation that runs on modern systems.
The REXX Structure
REXX programs have a simple structure:
| |
Key Language Features
- Case insensitive -
SAY,Say, andsayare identical - Free format - No column restrictions (unlike older languages)
- Comments - Use
/* comment */style - String concatenation - Use
||or simple adjacency - No line continuation - Statements can span multiple lines naturally
The REXX Community
REXX maintains an active community:
- Rexx Language Association (RexxLA) - Organizes annual symposiums and maintains standards
- comp.lang.rexx - Usenet newsgroup active since the 1990s
- Regina REXX Project - Ongoing development of the open-source interpreter
- ooRexx Project - Object-oriented REXX development
REXX in Modern Context
While REXX’s heyday was the 1980s-90s, it remains relevant:
Still Running
- Mainframes - Billions of lines of REXX scripts run enterprise systems daily
- Legacy systems - Banking, insurance, and government systems depend on REXX automation
- Network devices - Many enterprise networking tools still use REXX
Modern Use Cases
- Mainframe DevOps - Modern z/OS development uses REXX for automation
- Data processing - REXX’s string handling excels at text transformation
- Teaching - REXX’s readability makes it useful for introducing programming concepts
Getting Started
REXX files typically use these extensions:
.rexx- Standard extension.rex- Alternative short form.cmd- OS/2 and Windows command files
A typical REXX development workflow:
| |
Continue to the Hello World tutorial to write your first REXX program.
Timeline
Notable Uses & Legacy
IBM Mainframe Scripting
REXX is the standard scripting language for VM/CMS, MVS/TSO, and z/OS, automating countless enterprise operations.
OS/2 System Scripting
IBM's OS/2 used REXX as its native scripting language, controlling everything from desktop automation to system administration.
AmigaOS ARexx
Amiga computers featured ARexx, enabling inter-application communication and automation years before AppleScript.
Network Device Configuration
Many enterprise network devices and telecom systems use REXX for configuration scripts and automation.
Financial Systems
Banks and financial institutions use REXX scripts to orchestrate mainframe batch processing and data transformation.
Healthcare Administration
Hospital systems running on mainframes frequently use REXX for report generation and data processing tasks.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull rzuckerm/rexx:3.6-5.00-1Example usage:
docker run --rm -v $(pwd):/app -w /app rzuckerm/rexx:3.6-5.00-1 rexx /app/hello.rexx