social share alt icon
Thought Leadership
Banner Image
June 08, 2016
The Power of REXX
Nithila Nelson

As we all know REXX (Restructured Extended Executor) is an interpreted programming language and over the years, IBM is packaging the REXX in almost, all of its operating systems (VM/CMS, MVS TSO/E, AS/400, VSE/ESA, AIX, PC-DOS, and OS/2). Moreover IBM is making the REXX versions available for Novell NetWare, Windows, Java, and Linux.

Let us now get into details, how REXX power is very effective in the Z/OS environment and how it helps us to build tools and automate work in an efficient manner.

MVS operating systems are command based environment, where each and every task is being driven by a command. This means a lot of manual effort is required for a Mainframe developer, especially for the routine tasks which are repetitive in nature.

Let’s exploit the Power of REXX and to see how best we can use it for fine tuning our day to day mainframe tasks.

The power of REXX comes from its ability to invoke a command and access all the functions of the operating systems like TSO, ISPF, SDSF, and ISPF Editor directly. In other words, for every function that ISPF provides on its panel, there is a REXX based logic behind it. With this REXX power, IBM has been simplifying most of its ISPF based operations through REXX based panels. So, why not we use the same REXX power in our day to day Mainframe tasks to ease our work to a greater extent.

Consider an example; we need to identify datasets that meet the user define criteria esp. for its allocation parameters from a set of fifty to hundred datasets. For this task, we need to go with 3.4 option in the ISPF panel and look at all the fifty to hundred datasets to check if that dataset meets the criteria, which eventually involves a lot of manual effort. In case, this has to be done on a daily basis, then it will be a boring and a time consuming job. Instead it can be written in REXX with not more than twenty to thirty lines of code, yielding the desired results in a matter of few seconds.

The above-quoted example is just a simple one but what happens if the complexity of task increases and the frequency of such tasks are more, there comes a question on the task force in place and the motivation factor for the developer who supports the application. To answer this and to use the developer’s time more efficiently, let’s all learn and develop more tools on REXX and make mainframe work more user-friendly and an interesting one too.

Moreover, REXX is not a licensed software, instead, it comes as free bird along the MVS installation package. So when the REXX power is freely available, why not we all explore the possible options on how REXX can be implemented in our applications so that our daily routine jobs and complex tasks gets automated.

Let me now list some of the special features in REXX, which makes it more user-friendly and attractive.

  1. REXX – free format language: Unlike COBOL, REXX program does not follow any definite structure hence the instruction can start anywhere in the program line.
  1. REXX – easy to use: The REXX language is easy to read and write because many instructions are meaningful English words. Unlike some lower-level programming languages that use abbreviations, REXX instructions are common words, such as SAY, PULL, IF…THEN… ELSE…, DO… END, and EXIT.
  1. REXX – built-in functions: performs various processing, searching, and comparison operations for both text and numbers. Other built-in functions provide formatting capabilities and arithmetic calculations
  1. REXX – debugging capability: When the REXX exec runs and TSO/E encounters an error, messages describing the error are being displayed on the screen. Also the REXX TRACE instruction and the interactive debug facility can be used to locate errors in execs.
  1. REXX – an interpreted language: When the REXX exec runs, the REXX code will be directly converted to an executable format whereas other languages which are not being interpreted has to be complied into machine-language first and then it has to be link-edited before it is being executed. This clearly indicates the efficiency of the REXX.
  1. REXX – an extensive parsing capability: REXX allows you to set up a pattern to separate characters, numbers plus the combination of both which comes as an input.
  1. REXX – no inherent limits: REXX has no globally reserved words hence this will be more useful when using the language for application extension.
  1. REXX – System independent: REXX is easily portable to any of the OS (VM/CMS, MVS TSO/E, AS/400, VSE/ESA, AIX, PC-DOS, and OS/2) and its versions are available for Novell NetWare, Windows, Java, and Linux.
  1. REXX – rare and unique features: REXX with associative arrays and dynamic variable scoping makes many algorithms much easier to design and implement.

In today’s IT world and that too on a Mainframe landscape, REXX is not being used for high-volume business applications, but still if we start analyzing and utilizing the REXX power in that perspective, definitely it will prove to be a huge breaking point for the Mainframe business. Hence keeping that in our mind and with continuous learning about the REXX power, let us all develop more and more advanced tools in REXX and march towards that breaking point.

Comments
MORE ARTICLES BY THE AUTHOR
RECENT ARTICLES
RELATED ARTICLES