Rexx: The Original Scripting Language is Still Useful if You Work on Mainframes

When you think of scripting languages used to process text files or create reports, the first languages that come to mind may be Python or Perl. However, there was a language called Rexx developed by IBM in the late 1970s that also accomplished these features and can be considered a major precursor. Rexx or Restructured Extended Executor is a free-form programming language that includes a ton of features including support for functions, ability to process unix commands, file I/O operations, debugging tools, and crash protection.

Although the language is not popular today, its influence is still felt. Much of the language’s structure and syntax is similar to many of today’s scripting languages. Though Rexx’s popularity peaked in the 1990s, it still being used by systems programmers to create programs on mainframes. Check out the resources below to learn more about this influential language.

Operating Systems Supported

Though Rexx was initially developed to work on IBM’s mainframe systems, Rexx is still supported on several OSs including:

  • VM/CMS
  • OS/2
  • DOS
  • 16-bit Windows
  • Linux
  • Windows CE
  • PocketPC

Today, open-source versions of Rexx are also available including REXX/imc and Regina on Linux and Windows.

Rexx Tutorials

A great way to study and understand Rexx is to consult the following tutorials and use them as building blocks for your Rexx projects.

  • IBM Systems Magazine’s Rexx Tutorial presents a simple tutorial aimed for beginners and presents an example of how to open and read data files.
  • The Rexx Tutorial from the University of Oxford presents an in-depth tutorial ideal for beginners and advanced users. It walks through several language features and presents lessons on creating basic programs, loops, conditionals, and much more.
  • TutorialsPoint’s Rexx Tutorial not only gives an overview of the language, it also gives instructions on implementing basic language syntax as well as advanced concepts including XML parsing.
  • NetRexx Programming Guide (PDF) is a great resource if you ever wanted to use an alternative to the Java Virtual Machine. NetRexx shares many features of the original Rexx programming language but can be run on multiple platforms because of the VM. NetRexx also includes several libraries for file processing and networking similar to Java.
  • Open Object Rexx (PDF) presents a detailed guide to a version of Object Rexx. If you are big fan of object oriented programming (OOP) and want to implement better designed programs in Rexx, then this is an ideal tutorial.

Rexx Video Tutorials

Being able to visualize concepts is a great way to understand a programming language. Here are some video tutorials that will help you improve your Rexx skills.

  • Rexx Mainframe Tutorial is part of a series of video tutorials on the kumar ITChannel. It presents various language features and examples through 10 unique lessons.
  • Coding Rexx Programs in 7 Minutes shows you how to setup the Rexx environment on Windows and have a functional program in a few minutes. This is a great tutorial for beginners wanting to get a head start in the environment.
  • Windows Programming for Everyone is a paid course on Udemy that outlines how users can setup their own Rexx environment on Windows and start writing programs. Several language features are covered including basic syntax and running Windows commands. Though the course costs money, it serves as a one-stop resource for understanding the Rexx language.
  • Rexx System Automation Tutorial is a video created by IBM that shows users how to use Rexx’s built in debugger to help find and fix issues with Rexx programs.
  • NetRexx Eclipse Project is a video tutorial that demonstrates various programs written in NetRexx on the popular Eclipse IDE.

Books on Rexx

If you prefer to use a book to learn programming or need some references for the Rexx programming language, check out the following books:

  • The REXX Language on TSO (2012), by Gabriel Garguilo, provides an excellent source information on writing REXX programs for IBM mainframe computers. This book covers writing programs for various operating systems found on IBM mainframes including TSO/E, MVS, OS/390, and Z/OS. Various language features are covered and the idea behind the book is to help you get started writing programs as quickly as possible.
  • The REXX Language on TSO (2013), by Gabriel Garguilo, although having the same name as his 2012 book, is actually quite different. It focuses on built-in REXX functions. The book lists the functions and what they do. Additional chapters cover writing macros and commonly used TSO functions.
  • The REXX Language: A Practical Approach to Programming (1990), by Michael Cowlishaw, provides an introduction and overview of the REXX programming language from the eyes of REXX’s own creator.
  • Rexx Programmer’s Reference (2005), by Howard Fosdick, not only introduces the Rexx programming language to beginners it also goes through advanced features for more experienced users. The book covers various topics including how to improve the structure of your Rexx programs, connect to databases, and work with servers in Linux and Windows environments.

Should I Bother Learning Rexx?

Although Rexx reached its peak in the mid 1990s, it is still worthwhile to learn. Taking the time to learn Rexx will give you a great introduction to programming and help you understand the basics of writing scripts. In addition, understanding Rexx will provide tools and foundation necessary to create mainframe server programs. Much of the server infrastructure around the globe uses mainframes. So, understanding the languages that power these mainframes will ultimately go a long way to boosting your own career.


Further Reading and Resources

We have more guides, tutorials, and infographics related to coding and development:

What Code Should You Learn?

Confused about what programming language you should learn to code in? Check out our infographic, What Code Should You Learn? It not only discusses different aspects of the languages, it answers important questions such as, “How much money will I make programming Java for a living?”

Brian Wu

About Brian Wu

Brian specializes in technology and medicine. This isn't surprising given he now has a PhD in integrative biology and disease and an MD with a focus on holistic treatment. In the past, he's been an actor. Brian lives in southern California.

Comments

Thanks for your comment. It will show here once it has been approved.

Your email address will not be published. Required fields are marked *

avatar

Cade

June 17, 2019

FYI, I use OOREXX (Open Object REXX).

Your title needs updating; the word “Mainframes” should be replaced with the words
“a computer”. In addition to REXX doing more than {process text files, create reports}, it is also an effective “glue” language (amongst other things).

REXX is intuitive, comfortable and pragmatic in character.
It is obvious, after using REXX, the author of REXX made interesting/effective design decisions that allows for decent readability/modularity/debuggability of REXX code with relative ease.

Recently, I ported my makefile-free (“zero config”) software construction (“build”) tool from the original “bash” implementation to a OOREXX implementation since the initial “bash” version started to exhibit “growing pains”; i.e. REXX more readable than BASH, REXX code more modular than BASH code, OOREXX more higher-level-programming-like than BASH, REXX coding more fun than BASH coding. Due to the nature of REXX coding it was much easier to expand the functionality of my tool; i.e. the REXX version being more functional than the BASH version.

C++ is my main workhorse language and I had dabbled in Python programming concerning a previous build system I used to use (“scons”) prior to developing my own, above-mentioned, BASH/REXX build system. For my workflow/psychology, I prefer OOREXX over Python.

OOREXX has {external function, external native library} support, meaning that natively-coded functions (e.g. C/C++ coded routines) can be compiled into shared libraries and REXX code can access these native routines using it’s existing function/subroutine call syntax. The path for these shared libraries would be specified in a REXX related environmental variable (REXXLIB).

One initial goal for REXX was for non-programmers (say business students) to be able to customise a “system” (software program, …) towards their needs. For example, the patent professionals (not professional programmers) at the European Patent Office use Rexx/OOREXX for their patent-related preparations. The thing is, for programmers REXX is just fabulous. Like a Slashdot commenter mentioned, words to the effect …
“coding in REXX was more convenient than the default scripting language of the respective Unix OS”.

REXX’s relatively small footprint makes it suitable for mobile devices.

My experience with REXX/OOREXX has led me to the stance that REXX would be a good
first-programming-language, even for early high-school students. If the person finds that they like the programming paradigm, then they should move onto embracing the {object-related, etc.} extensions offered by OOREXX.

Spread the word …… “REXX IS GOOD” .

shares