Rexx
By IBM
Rexx is an interpreted scripting language developed by IBM for automating tasks, writing macros, and gluing together system commands, originally on mainframe systems and later ported to a wide range of platforms. It emphasizes readable,…
Definition
Rexx is an interpreted scripting language developed by IBM for automating tasks, writing macros, and gluing together system commands, originally on mainframe systems and later ported to a wide range of platforms. It emphasizes readable, English-like syntax and built-in string-handling capabilities, and it has been used both as a general-purpose scripting language for operating system automation and as an embedded macro language inside applications and editors.
Overview
Rexx was created at IBM in the early 1980s as a successor to earlier mainframe command languages, with an explicit design goal of being easy to read and write compared to the terser scripting facilities that preceded it. Its creator aimed for a language usable by both professional programmers and less experienced users automating repetitive tasks, which led to syntax choices favoring clear keywords and forgiving data typing over compact symbolic notation. This readability focus made Rexx popular quickly within IBM's mainframe environments for tasks ranging from system administration scripts to interactive command procedures. Mechanically, Rexx treats all data as character strings by default, performing implicit conversions to numbers when arithmetic operations require it, which removes much of the type-declaration overhead common in compiled languages. Its parsing instruction is a distinctive feature, letting a script split a string into multiple variables based on patterns or fixed positions in a single statement, which is especially useful for extracting fields from mainframe records or command output. Rexx also supports a straightforward mechanism for invoking external commands and capturing their output, which is central to its role as a glue language for automating interactions between other programs and the operating system. Within scripting languages, Rexx occupies a role similar to what shell scripting languages or Windows batch files do on other platforms, and later general-purpose scripting languages such as Perl and Python absorbed some of the same use cases with more extensive standard libraries and community ecosystems. Rexx differs from those newer languages in its strong roots in the IBM mainframe world and its widespread use as an embeddable macro language inside applications, including OS/2, various mainframe editors, and some IBM middleware products. In practice, Rexx continues to appear in mainframe shops as the language of choice for writing operator automation scripts, ISPF panel logic, and utilities that interact with JCL-driven batch processing. Outside the mainframe world, Object REXX and other variants found niche use as macro languages for automating tasks in specific applications and operating environments, though this usage has narrowed considerably as more mainstream scripting languages captured general-purpose automation demand. The language's limitations mirror those of other IBM-associated legacy languages: its visibility and adoption outside mainframe and a handful of legacy desktop environments is limited, and developers new to scripting are far more likely to reach for Python, PowerShell, or Bash today. Rexx's implicit string-based typing, while easy to learn, can also make it less suitable for large, complex programs where stricter type checking would catch errors earlier in development.
Key Features
- English-like, readable syntax designed for ease of learning
- Implicit string-to-number conversion without explicit type declarations
- Distinctive PARSE instruction for splitting strings into variables
- Built for invoking external commands and capturing their output
- Used as an embeddable macro language inside applications
- Strong roots in IBM mainframe operating system automation
- Object REXX variant adds object-oriented programming features
- Portable across mainframe, OS/2, and other platforms