Restructured Extended Executor

Restructured Extended Executor ( REXX ) is a language , which was invented by Mike Cowlishaw, an IBM researcher. It was initially called REX ( R evised EX ecutor ), but the acronym was already registered . As a procedural interpreted language , it is one of the PL / I’s sole heirs, or at least of itsclear syntax .

It is a language script common to many IBM systems: mainframes , especially VM / CMS where he succeeded EXEC and EXEC 2 ‘ and later MVS / TSO and z / OS . It was also available under OS / 2 .

It has an Open Source version , provided in the repositories of several Linux distributions . REXX interpreters, both commercial and open source , are available on a wide range of platforms and compilers are available for all IBM mainframes.

Its syntax has been designed with the essential aim of facilitating the learning and re-reading of the code.

Here, for example, is a REXX program (the tabs are only for the readability of the source) :

 Do i = 1 to 5
 If i = 3 then say "Three"
 Else say i

Its execution


Another example of a REXX program:

 List_words = "one two three four five" / * list of the first 5 digits * /
 Do i = 1 to words / * loop for each word of list_words * /
 Say word (list_words, i) / * Display the "i" th word * /
 End / * end of loop * /

Which can also be written:

 List_words = "one two three four five" do do i = 1 to words; say word (list_words, i); end

Its execution



  1. Syntax very close to PL / I ;
  2. Systematic use of tiny (reading 30% faster, according to its creator Mike Cowlishaw);
  3. Unnecessary end-of-line character (except when you want to separate several statements on the same line);
  4. No reserved words;
  5. Not of {} nor of []. Indexing is done by a qualifying point that allows numeric or string-based indexing (hash). Examples: service.3095 or birthday.patron;
  6. No pointers;
  7. Few parentheses required;
  8. Intuitive grammar (see example above);
  9. Standard conditional operations ( do i = …, do forever , while / do and do until );
  10. Exception management system in a very simple use through the activation signal on … .
  11. The parse statement allows the decomposition of structured strings into their base elements in a more readable (but less concise) way than regular expressions .

There is a Rexx compiler that provides both more stable scripts for version-based management, faster execution, and some protection against theft or unwanted changes to the source code.