Rexx (restructured extended executor) is a high-level programming language developed at IBM by Mike Cowlishaw.[6][7] Both proprietary and open source Rexx interpreters exist for a wide range of computing platforms, and compilers exist for IBM mainframe computers.[8] Rexx is used for scripting, application macros and application development. As a general purpose scripting language, Rexx is considered a precursor to Tcl and Python.

Rexx
Paradigmmultiparadigm: procedural, structured
Designed byMike Cowlishaw
DeveloperMike Cowlishaw, IBM
First appeared1979; 47 years ago (1979)
Stable release
ANSI X3.274 / 1996; 30 years ago (1996)
Typing disciplineDynamic
Filename extensions.cmd, .bat, .exec, .rexx, .rex, EXEC
Major implementations
VM/SP R3,[1] TSO/E V2,[2] SAAREXX,[3][4] ARexx, BREXX, Regina,[5] Personal REXX, REXX/imc
Dialects
NetRexx, Object REXX, now ooREXX, KEXX
Influenced by
PL/I, ALGOL, EXEC, EXEC 2
Influenced
NetRexx, Object REXX
  • Wikibooks logo Rexx Programming at Wikibooks

Rexx is supported in a variety of environments. It is the primary scripting language in some operating systems including OS/2, MVS, VM, AmigaOS and is used for macros in some software including SPF/PC, KEDIT, THE and ZOC. With an engine installed, Rexx can be used for scripting and macros in programs that use a Windows Scripting Host ActiveX scripting engine (such as VBScript or JScript). Rexx is supplied with VM/SP Release 3 on up, TSO/E Version 2 on up, OS/2 (1.3 and later, where it is officially named Procedures Language/2), AmigaOS Version 2 on up, PC DOS (7.0 or 2000), ArcaOS,[9] and Windows NT 4.0 (Resource Kit: Regina). In the late 1980s, Rexx became the common scripting language for IBM Systems Application Architecture, where it was renamed "SAA Procedure Language REXX".

A script is associated with a Rexx interpreter at runtime in various ways based on context. In mainframe computing, a Rexx script or command is sometimes referred to as an EXEC since that is the name of the file type used for similar CMS EXEC,[10] and EXEC 2[11] scripts and for Rexx scripts on VM/SP R3 through z/VM. The first line of a script specifies the use of a Rexx interpreter in a comment either by identifying the code as Rexx language or by file path via EXTPROC. On MVS, Rexx scripts may[a] be recognized by the low level qualifier "EXEC" or if the first line fetched from SYSPROC is a comment containing "REXX" then it is treated as Rexx (rather than CLIST), and a script fetched from SYSEXEC must be Rexx. On OS/2, Rexx scripts share the filename extension ".cmd" with other scripting languages, and the first line of the script specifies the interpreter to use. On Linux, Rexx scripts generally begin with a shebang. Rexx macros for Rexx-aware applications use extensions determined by the application.

Name

edit

Originally, the language was called REX, short for Reformed Executor, but an extra "X" was added to avoid confusion with other products. The name was originally all uppercase. Both editions of Mike Cowlishaw's first book on the language use all-caps, REXX, although the cover graphic uses mixed case. His book on NetRexx uses mixed case but all caps in the cover graphic with large and small caps, NETREXX. An expansion that matches the abbreviation, REstructured eXtended eXecutor, was used for the system product in 1984.[12]

Sample

edit
a = "hello world"           /* assignment instruction           */
do i = 1 to 2               /* keyword instruction "DO"         */
  say "round #" i":" a      /* keyword instruction "SAY"        */
end                         /* keyword instruction "END"        */
"echo Hello World"          /* command to operating system      */
"echo" a                    /* command to operating system      */
say "RC:" rc                /* command's numeric return code    */

History

edit

pre1990

edit

On his own time, Mike Cowlishaw developed the language and an interpreter for it in assembly language between 20 March 1979 and mid-1982 with the intent to replace the languages EXEC and EXEC 2.[6] Mike also intended Rexx to be a simplified and easier to learn version of PL/I, but some claim that Rexx has problematic differences from PL/I.

Rexx was first described in public at the SHARE 56 conference in Houston, Texas, in 1981,[13] where customer reaction, championed by Ted Johnston of SLAC, led to it being shipped as an IBM product in 1982.

Over the years IBM included Rexx in almost all of its operating systems (VM/CMS, MVS TSO/E, IBM OS/400, VSE/ESA, MUSIC/SP, AIX, PC DOS, and OS/2), and has made versions available for Novell NetWare, Windows, Java, and Linux.

The first non-IBM version was written for PC DOS by Charles Daney in 1984/5[7] and marketed by the Mansfield Software Group (founded by Kevin J. Kearney in 1986).[6] The first Rexx compiler appeared in 1987, written for CMS by Lundin and Woodruff.[14] Other versions have also been developed for AmigaOS, Unix, Solaris, DEC, Windows, Windows CE, Pocket PC, Palm OS, QNX, OS/2, Linux, BeOS, EPOC32/Symbian, AtheOS, OpenVMS,[15]:309 and Mac OS X.[16]

ARexx, a Rexx interpreter for Amiga, was included with AmigaOS 2 onwards and was popular for scripting and application control. Many Amiga applications have an "ARexx port" which allows control of the application via a Rexx script. Notably, a Rexx script can switch between Rexx ports to control multiple applications.

Since 1990

edit

In 1990, Cathie Dager of SLAC organized the first independent Rexx symposium, which led to the forming of the Rexx Language Association. Symposia are held annually.

In 1992, the two most widely used open-source ports appeared: Ian Collier's REXX/imc for Unix and Anders Christensen's Regina[5] (later adopted by Mark Hessling) for Windows and Unix. BRexx was developed by Vasilis N Vlachoudis, a nuclear scientist at CERN. It runs on a range of operating systems, including Unix, Linux, BSD, macOS and Windows. Its small size means it can run on an Android mobile phone. BRexx/370 is a version that runs on IBM mainframes.[15]:359–383[17]

OS/2 has a visual development system from Watcom VX-REXX. Another dialect was VisPro REXX from Hockware.

Portable Rexx by Kilowatt and Personal Rexx by Quercus are two Rexx interpreters designed for DOS and can be run under Windows as well using a command prompt. Since the mid-1990s, two newer variants of Rexx have appeared:

  • NetRexx: compiles to Java byte-code via Java source code; this has no reserved keywords at all, and uses the Java object model, and is therefore not generally upwards-compatible with 'classic' Rexx.
  • Object REXX: an object-oriented generally upwards-compatible version of Rexx.

In 1996 the American National Standards Institute (ANSI) published a standard for Rexx: ANSI X3.274–1996 "Information Technology – Programming Language REXX".[b] More than two dozen books on Rexx have been published since 1985.


On October 12, 2004, IBM announced their plan to release their Object REXX implementation's sources under the Common Public License. Recent releases of Object REXX contain an ActiveX Windows Scripting Host (WSH) scripting engine implementing this version of the Rexx language.

On February 22, 2005, the first public release of Open Object Rexx (ooRexx) was announced. This product contains a WSH scripting engine which allows for programming of the Windows operating system and applications with Rexx in the same fashion in which Visual Basic and JScript are implemented by the default WSH installation and Perl, Tcl, Python third-party scripting engines.

In January 2018 the TIOBE index listed Rexx at position 30.[19] Since 2018 it has been either outside the top 50, or, more frequently, outside the top 100.

In 2019, the 30th Rexx Language Association Symposium marked the 40th anniversary of Rexx. The symposium was held in Hursley, England, where Rexx was first designed and implemented.[20]

Toolkits

edit
  • RexxUtil a package of file and directory functions, windowed I/O, and functions to access system services such as WAIT and POST is available for most Rexx environments.[21][22][23]
  • Rexx/Tk a toolkit for graphics to be used in Rexx programmes in the same fashion as Tcl/Tk is widely available.
  • RexxEd an integrated development environment (IDE) for Rexx was developed for Windows.[15]:390
  • RxSock for network communication as well as other add-ons to and implementations of Regina Rexx have been developed, and a Rexx interpreter for the Windows command line is supplied in most resource kits for various versions of Windows and works in DOS as well.

See also

edit

Notes

edit
  1. The TSO EXEC command with an unqualified dataset name, and neither the CLIST nor EXEC option, examines the low level qualifier for "EXEC".
  2. While ANSI INCITS 274-1996/AMD1-2000 (R2001) and ANSI INCITS 274-1996 (R2007) are chargeable, a free draft can be downloaded.[18]

References

edit
  1. Virtual Machine/System Product - System Product - Interpreter Reference - Release 3 (PDF) (First ed.). IBM. September 1983. SC24-5239-0. Retrieved November 6, 2024.
  2. TSO Extensions Version 2 - Procedures Language MVS/REXX Reference (PDF) (Fifth ed.). IBM. August 1991. SC28-1883-4. Retrieved November 6, 2024.
  3. "Procedures Language". Systems Application Architecture - An Overview (PDF) (First ed.). IBM. May 1987. p. 40. GC26-4341-0. Retrieved November 6, 2024.
  4. Procedures Language/2 - REXX Reference - Version 2.00 (PDF). OS/2 2.00 - Technical Library (First ed.). IBM. December 1991. S10G-6268-00. Retrieved November 6, 2024.
  5. 1 2 Mark Hessling (October 25, 2012). "Regina Rexx Interpreter". SourceForge project regina-rexx. Retrieved February 10, 2014.
  6. 1 2 3 M. F. Cowlishaw. "IBM REXX Brief History". IBM. Retrieved August 15, 2006.
  7. 1 2 Melinda Varian. "REXX Symposium, May 1995".
  8. "Catalog of All Documents (filter=rexx)". IBM library server. 2005. Archived from the original on February 15, 2013. Retrieved February 10, 2014.
  9. "Does ArcaOS include REXX support?". Retrieved September 3, 2020.
  10. IBM Virtual Machine Facility /370: EXEC User's Guide (PDF) (Second ed.). International Business Machines Corporation. April 1975. GC20-1812-1.
  11. EXEC 2 Reference (PDF) (Second ed.). International Business Machines Corporation. April 1982. p. 92. SC24-5219-1. Archived from the original (PDF) on April 2, 2020. Retrieved March 28, 2019.
  12. M. F. Cowlishaw (1984). "The design of the REXX language" (PDF). IBM Systems Journal (PDF). 23 (4). IBM Research: 333. doi:10.1147/sj.234.0326. Retrieved January 23, 2014. Could there be a high astonishment factor associated with the new feature? If a feature is accidentally misapplied by the user and causes what appears to him to be an unpredictable result, that feature has a high astonishment factor and is therefore undesirable. If a necessary feature has a high astonishment factor, it may be necessary to redesign the feature.
  13. M. F. Cowlishaw (February 18, 1981). "REX -- A Command Programming Language". SHARE. Retrieved August 15, 2006.
  14. Lundin, Leigh; Woodruff, Mark (April 23, 1987). "T/REXX, a REXX compiler for CMS". U.S. Copyright Office (TXu000295377). Washington, DC: Independent Intelligence Incorporated. Archived from the original on March 3, 2016. Retrieved February 20, 2010.
  15. 1 2 3 Fosdick, Howard (2025). Rexx Programmer's Reference (PDF) (2 ed.). Apex, North Carolina: Rexx Language Association. ISBN 9789403745527. OCLC 1475017186. Archived (PDF) from the original on April 3, 2025. Retrieved May 26, 2025.
  16. "Rexx Implementations". RexxLA. Archived from the original on September 24, 2006. Retrieved August 15, 2006.
  17. Vlachoudis, Vassilis (June 2011). Written at CERN. "BRexx". San Francisco, California: GitHub. Archived from the original on June 12, 2025. Retrieved June 24, 2025.
  18. "American National Standard for Information Systems – Programming Language REXX" (PDF). The Rexx Language Association. Washington D.C.: American National Standards Institute (ANSI). X3J18-199X. Archived (PDF) from the original on April 3, 2025. Retrieved June 7, 2025.
  19. "TIOBE Index for January 2018". TIOBE. Eindhoven, Netherlands. January 2018. Archived from the original on February 3, 2018. Retrieved June 7, 2025.
  20. "RexxLA - Symposium Schedule".
  21. Ashley, W David; Flatscher, Rony G; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Steinbock, Erich; Wolfers, Jon (January 19, 2024). "8. Rexx Utilities (RexxUtil)" (PDF). Open Object Rexx: Reference (PDF) (5.1.0 ed.). Rexx Language Association. pp. 512–566. Archived (PDF) from the original on May 25, 2024. Retrieved May 26, 2025.
  22. "REXX Tips & Tricks:REXXUTIL functions". EDM2: The Electronic Developer Magazine for OS/2. Retrieved October 14, 2023.
  23. "Regina Rexx Interpreter". Sourceforge. Retrieved October 14, 2023.

Further reading

edit
  • Callaway, Merrill. The ARexx Cookbook: A Tutorial Guide to the ARexx Language on the Commodore Amiga Personal Computer. Whitestone, 1992. ISBN 978-0963277305.
  • Callaway, Merrill. The Rexx Cookbook: A Tutorial Guide to the Rexx Language in OS/2 & Warp on the IBM Personal Computer. Whitestone, 1995. ISBN 0-9632773-4-0.
  • Cowlishaw, Michael. The Rexx Language: A Practical Approach to Programming. Prentice Hall, 1990. ISBN 0-13-780651-5.
  • Cowlishaw, Michael. The NetRexx Language. Prentice Hall, 1997. ISBN 0-13-806332-X.
  • Daney, Charles. Programming in REXX. McGraw-Hill, TX, 1990. ISBN 0-07-015305-1.
  • Ender, Tom. Object-Oriented Programming With Rexx. John Wiley & Sons, 1997. ISBN 0-471-11844-3.
  • Fosdick, Howard (2025). Rexx Programmer's Reference (PDF) (2 ed.). Apex, North Carolina: Rexx Language Association. ISBN 9789403745527. OCLC 1475017186. Archived (PDF) from the original on April 3, 2025. Retrieved May 3, 2025.
  • Gargiulo, Gabriel. REXX with OS/2, TSO, & CMS Features. MVS Training, 1999 (third edition 2004). ISBN 1-892559-03-X.
  • Goldberg, Gabriel and Smith, Philip H. The Rexx Handbook . McGraw-Hill, TX, 1992. ISBN 0-07-023682-8.
  • Goran, Richard K. REXX Reference Summary Handbook. CFS Nevada, Inc.,1997. ISBN 0-9639854-3-4.
  • IBM Redbooks. Implementing Rexx Support in Sdsf. Vervante, 2007. ISBN 0-7384-8914-X.
  • Kiesel, Peter C. Rexx: Advanced Techniques for Programmers. McGraw-Hill, TX, 1992. ISBN 0-07-034600-3.
  • Marco, Lou ISPF/REXX Development for Experienced Programmers. CBM Books, 1995. ISBN 1-878956-50-7
  • O'Hara, Robert P. and Gomberg, David Roos. Modern Programming Using Rexx. Prentice Hall, 1988. ISBN 0-13-597329-5.
  • Rudd, Anthony S. 'Practical Usage of TSO REXX'. CreateSpace, 2012. ISBN 978-1475097559.
  • Schindler, William. Down to Earth Rexx. Perfect Niche Software, 2000. ISBN 0-9677590-0-5.
edit