Introduction to REXX
REXX is a high level programming language designed to perform in two important roles as an
agent for computer users and system administrators:
- As an integrator of system commands and other programs into composites intended
to handle specific higher level functions
- As an embeded macro language for customization or augmentation of system commands
such as the system editor
REXX provides a clean, consistent syntax which many end-users have found
easy to use as they strive to adapt computers to their needs. At the same time,
computing professionals have found the language sufficient to accomplish complex
tasks with a programmer productivity many times that of traditional macro and
scripting languages.
REXX has been available for nearly a decade
from IBM and other vendors for operating systems ranging
from PCDOS, OS/2, and the Amiga on the desk top thru UNIX(tm) to IBM mainframe VM and MVS
systems in the glass house. It biggest defect has probably been its ease of
application to production problems where a traditional compiled high-level might
have been more appropriate.
The purpose of these pages is to introduce S/REXX,
Benaroya's implementation of REXX for UNIX environments with an overview of
those features which differentiate S/REXX from other implementations. There is an
extensive set of REXX references
maintained by Mike Cowlishaw (the creator of REXX) for more information about
the REXX language and its application.
S/REXX with a Graphical Debugger from Benaroya
S/REXX is a UNIX and Microsoft Windows implementation of REXX which
supports all features of the second edition of
The Rexx Language by Mike Cowlishaw except the numeric digit specification
which is limited to 15 digits. It is is available for many
UNIX platforms including Linux as well as current versions of Microsoft Windows.
S/REXX Compatibility
S/REXX is designed to be compabile with other implementations of IBM SAA REXX.
In particular:
- Thre are no implementation size or shape limits which are likely to impact
your REXX programs. For example, if your system has enough memory, there are no limits on:
- Procedure size
- Expression complexity
- Parenthesis nesting
- Number of variables or content
- Recursive function depth
- Argument number and size
- When a S/REXX program file begins with the standard UNIX magic number record:
#! /home/xed/srexx
it becomes a system command which can be executed by simply typing its name.
- Full support by SEDIT permits writing of
edit macros in REXX, many of which will be directly compatible with REXX macros
written for IBM's XEDIT (IBM/VM) and Mansfield Software's KEDIT (PCDOS and OS/2).
- An EXECIO command is included to facilitate porting of REXX programs from
IBM's VM/CMS to UNIX. EXECIO reads and writes files and prints on
native UNIX printers. All options of the CMS EXECIO are supported.
Leveraging the UNIX Environment
S/REXX includes a number of extensions designed to meet the expectations of
UNIX users experienced with the idioms of classical UNIX scripting languages.
Traditional REXX Environmental Integration
S/REXX provides the traditional facilities for integration of REXX
programs into your computing environment. As discussed previously, REXX is a
single language designed for integration into other programs as a MACRO processor and
for integrating other programs via command scripts. S/REXX performs both roles:
- S/REXX is fully integrated into Benaroya's SEDIT
editor (An XEDIT [and ISPF/PDF] like editor for UNIX). You can write SEDIT macros which build MOTIF
or OpenLook dialog boxes with input fields, toggles, and buttons in addition to the
more traditional XEDIT use of REXX to automate complex editing tasks.
- Within SEDIT, S/REXX can be used to manage ISPF-like project control table files.
- User programs can include S/REXX as a MACRO processor exposing subcommands to
the REXX MACRO.
The S/REXX API supports use of the REXX Address instruction to trigger
user specified subroutines included in the C program with which S/REXX has been integrated.
- User written built-in functions can be added to S/REXX.