|A Brief History of Rexx|
Before computers were inexpensive enough for widespread individual ownership, they usually had to be shared by many people. IBM’s most successful time-sharing operating system in the 1970s and 1980s was the VM/370 (Virtual Machine/370) operating system. This operating system provided a personal computer for each of its users through the Virtual Machine concept–very similar to the Virtual DOS Machines (VDMs) in OS/2 and today’s VMWare products.
Any System/370 operating system can run in a VM virtual machine; the most popular for interactive development was the Conversational Monitor System (CMS). CMS is a single-user operating system that borrowed many of its features from earlier systems such as Multics, including the concept of controlling the system by commands. CMS’s command language is still one of the simplest and most readable.
Like other command-driven operating systems, CMS provides the ability to ‘wrap up’ commands with a programming logic; initially, these simple programs were written in a language called EXEC. This language, although not much more advanced than the PC-DOS ‘Batch’ language, allowed many enhancements and new commands to be written rapidly and much more easily than in the native assembler language used for writing low-level commands.
In the 1970s, C. J. Stephenson and others at the IBM T. J. Watson Research Center realized that, if applied consistently, this concept of a command programming language was extraordinarily powerful: a single language could provide the extension language – or ‘macro’ language – for a wide variety of applications. They took the EXEC language and generalized and improved it for this enhanced role; the new language was called EXEC 2.
EXEC 2 proved the concept of a general macro language. It was used mostly for writing system commands and macros for a wide variety of editors. Its interpreter was, and probably still is, the finest example of efficient and robust System/370 assembler code.
However, EXEC 2 (like its predecessor and most other macro languages of the 1970s and even early 1980s) assumed that macro programs would be mostly commands, with relatively little ‘glue’ of logic and variables. Accordingly, it was designed to allow commands (literal strings, usually in upper case) to be written plainly, whereas language keywords and variables were identified by a prefix of an ampersand. A command, followed by a test of its result, might look like this:
COPYFILE &FNAME &FTYPE &FMODE = BACKUP = &IF &RC GT 0 &TYPE Copy failed with return code &RC
This style, while adequate for simple commands, proved cumbersome for the large and complex programs and macros that were soon being written in EXEC 2. It became clear to me that a new language was needed, one based on the more classical syntax and semantics used by languages in the tradition of Algol, Pascal, and PL/I, yet including the command and string programming facilities that EXEC 2 had proven to be so effective and powerful.
This new language, initially called REX (because the name sounded nice) was very much driven by the desire to make programming easy. It borrows most of its features from other languages, especially PL/I and EXEC 2, but these features are modified or expressed in ways that make them easy to use (but not necessarily easy to implement!). The code fragment shown above would look quite different; literal strings are quoted, but language keywords and variable names are not obfuscated by special characters:
'COPYFILE' fname ftype fmode '= BACKUP =' if rc>0 then say 'Copy failed with return code' rc
This difference between the two languages becomes more striking as the complexity of the program increases.
The language concept was first thought of on 20 March 1979, and the first specification for the language is dated 29 March 1979. This was written before any implementation was even designed, and it was circulated to a number of people for comment: this began the tradition of documentation before implementation that characterized the development of Rexx. This first specification included three sample programs written in Rexx to show how the language would look; those programs would seem familiar to today’s Rexx programmers, although some details have changed.
My first implementation of Rexx was made freely available over IBM’s world-wide internal network in late 1979 and rapidly became popular. The network made it easy for people to exchange ideas and make suggestions for improvements. Also, because the language was limited to one (large) organization, it was possible to make some rather large changes in response to these suggestions. For example, one change, in which the ARG instruction replaced an earlier ARGS instruction, required updating hundreds of thousands of Rexx programs.
As a result of this direct feedback, the language quickly evolved to meet the needs of its users through a number of releases over the next few years. By 1982 it had become essentially the language known today; its name gained an ‘X’ to avoid any confusion with other products. Rexx was included in the third release of IBM’s VM/System Product, shipped in 1983.
It was soon discovered that IBM’s customers liked the language just as much as did the ‘internal’ users. Only two years later, the first non-IBM implementation (by the Mansfield Software Group, for PC-DOS) became available; this product, Personal Rexx, was later sold by Quercus Systems for both DOS/Windows and OS/2.
Also in 1985 the first edition of the book The Rexx Language was published; since then, at least 125 books and manuals about Rexx have been published.
In 1987 IBM announced that Rexx was to be the Procedures Language for its Systems Application Architecture (SAA), which was followed by implementations for a number of operating systems, including MVS/TSO, AS/400, and (in 1989), the Extended Edition of OS/2 1.2.
The first Rexx compiler was developed at IBM’s Vienna Laboratory, following research by the IBM Haifa Scientific Center, and was delivered to customers in 1989. By 1990 there was sufficient interest in the language to justify the first international Rexx Symposium for Developers and Users, organized by the Stanford Linear Accelerator Center in California. This symposium, now run by the Rexx Language Association, has been held annually since then.
Rexx became part of the base OS/2 product with OS/2 1.3: this version was the first implementation of the Rexx 4.00 language defined and published as The Rexx Language second edition in 1990. Enhancements to performance and to the Rexx function packages provided with OS/2 were added for OS/2 2.0, and in OS/2 2.1, the Multimedia component of OS/2 provided commands that allow the control of Multimedia devices from Rexx.
1990s versions of Rexx from IBM include Rexx for the AIX/6000 operating system, Rexx for Netware, Rexx for PC-DOS 7 (included in the operating system), and Rexx for the CICS transaction monitor. Rexx is now available for most significant operating systems, and from several vendors, not just IBM. Freeware or shareware versions, often excellent, are also available for MS-DOS, Windows, Unix, Linux, and other systems. See the list of implementations.
1991, the X3-J18 committee, on the behalf of ANSI, worked on an ANSI standard for Rexx; this standard (ANSI X3.274) was completed and published in 1996.
In 1988, Simon Nash of IBM led a team designing an upwards-compatible object-oriented upwards-compatible version of Rexx. This was released as Object Rexx in 1997 and runs on the OS/2, Win32, AIX, and Linux platforms. In 2005 this was transferred to the Rexx Language Assocation and is now available as the open source project Open Object Rexx (ooRexx).
In 1995, having just ported JavaTM to OS/2, I started the development of a version of Rexx for the Java platform. This language, NetRexx (1.0), was released in 1996 as a compiler/translator, and the book The NetRexx Language was published in 1997. By 2000, many enhancements were added to the language and an interpreter was also completed; this was published on the World Wide Web as NetRexx 2.
Like Object Rexx, NetRexx was transferred to the Rexx Language Assocation in 2011, and is now available as open source (see http://www.netrexx.org).
Please send any corrections or additions to Mike Cowlishaw, firstname.lastname@example.org.
Copyright © Mike Cowlishaw 1979, 2012.