The Rexx language Rexx Anywhere! The Rexx language


This web page attempts to fill a void for people wanting to create Rexx execs that will execute on any platform or Rexx implementation. It is geared toward the intermediate-advanced Rexx programmer and assumes some knowledge of the language.

As you are probably aware, you can write general purpose Rexx execs which will execute anywhere with little or no changes. Problem in Paradise: If that Rexx exec does file I/O, it will not execute everywhere. Unfortunately, file I/O was not implemented consistently in the different versions of Rexx (even in the ones developed by IBM).

For this reason, you will want to trap the environment that the Rexx exec is executing in and perform different processing. Here are the main points covered by the
Rexx Anywhere! web page: The goal is to be able to write Rexx execs that will execute on any platform and take the steps needed to perform functions differently on that platform when needed. With little effort, you can have portable versions of your general purpose Rexx execs. Otherwise you will have a Rexx exec that

WRECKS Somewhere!.

But keep in mind that not all Rexx execs need this capability, only general purpose ones that don't invoke operating system features. Read on if you have Rexx execs that you want to be portable.
Collection of environment results

I've written a small Rexx exec called rexxver that shows the results from the ADDRESS(), PARSE SOURCE ... and PARSE VERSION ... statements. These environment results will give us the information needed to write code that is portable and reacts (when needed) to process differently on a given platform or implementation.

Here are the results of my testing and contributions sent to me:

Platform ADDRESS() Env
"PARSE SOURCE Env"
REXXVER
Output
OS/390 :: TSO TSO TSO +
OS/390 :: PGM=IRXJCL MVS TSO +
OS/390 :: OMVS Shell New [2001-05-08] SH TSO
(Don't use this field, use this)
+
OS/390 :: Rexx Compiler 3.0 MVS TSO +
OS/390 :: CICS New [2001-09-13] REXXCICS CICS +
VM/ESA CMS CMS +
VSE/ESA VSE VSE +
AIX/6000 ksh AIX/6000 +
Object Rexx :: Windows 95 CMD Windows95 +
Object Rexx :: Linux bash LINUX +
Object Rexx :: OS/2 CMD OS/2 +
OS/2 CMD OS/2 + +
PC/DOS 7.0 COMMAND DOS +
AS/400
V4R1
COMMAND
(the CL environment)

EDIT
(Possible editor)

*LIBL/ABC
(your ABC program)
OS/400 +
NetRexx n/a JAVA +
Regina Rexx :: Windows 95 and NT SYSTEM WIN32 +
Regina Rexx :: All UNIX versions SYSTEM UNIX +
Regina Rexx :: Open-VMS SYSTEM VMS +
Regina Rexx :: EPOC32
(Psion 5/5mx/Revo etc) New [2001-09-09]
SYSTEM EPOC32-MARM +
Regina Rexx :: QNX 4.2.5 New [2001-09-09] SYSTEM QNX +
BREXX :: Windows 95 (MS/DOS prompt) SYSTEM MSDOS +
uniREXX :: Solaris 2.6 UNIX UNIX +
REXX-imc :: FreeBSD 2.2.6 UNIX UNIX +
Quercus Personal Rexx for DOS DOS PCDOS +
Quercus Personal Rexx for Windows COMMAND WIN + +
Enterprise Rexx COMMAND WIN +
Amiga Regina Rexx SYSTEM AMIGA +
Amiga ARexx REXX COMMAND +
Editor section
VM/ESA 1.2.2 XEDIT XEDIT CMS +
SPF/PC Rexx exec edit macro ISREDIT WINDOWS +
Tritus/SPF edit macro (DOS) ISREDIT Garbage, see full output +
Tritus/SPF edit macro (OS/2) ISREDIT OS/2 +
Mark Hessling's THE editor
THE Based on the OS: WIN32, OS/2, UNIX or DOS. +


View the full output from the REXXVER Rexx exec on each platform. This list above isn't intended to be a list of every Rexx implementation. It is a list of the Environment results that I've tested or people have sent me. If your favorite Rexx isn't in the list, then it should be...

For more information on invoking Rexxver as a Java application and applet, go to my Rexx Anywhere! - NetRexx page.
Sample code

I've provided these Rexx execs that demonstrate detecting the Rexx environment and processing differently:
Portability issues


CMS/TSO Pipelines

Distinguishing Levels of CMS/TSO Pipelines
A Call for contributions

I don't have access to every Rexx implementation. Please send me examples of executing REXXVER on your system. If you see any bugs with my sample code, please email me. My email address is on my contact page. Or send me email about what you think of this page. Do you have any sample code that you've written that you would like to make available?

Hint: On many operating systems like MS/DOS, PC DOS, OS/2, Windows 95/NT DOS prompt and UNIX, you can pipe the output of the Rexxver Rexx exec to a file. Here is an example of putting the output to a file for easy emailing:
REXXVER >REXXVER.OUT

T H A N K S

I'd like to thank the following people who have contributed information and testing results:

Jim Alves, Eric Bitterman, John A Cifonelli, John C. Ford, Carl Forde,
Stephen Ferg, Mark Hessling, Rudy Kohut, Marc Irvin, Tim Launchbury,
David McRitchie, Gilbert Saint-flour, John Saxton, Ian Smith, Leif Trdger and R.F. van der Woude  




Other References




Why "Rexx Anywhere!"? Because "Rexx Ubiquitous!" just doesn't have the right ring...

Return to the Planet MVS home page.



GOTO (or should I say SIGNAL) my Dave's MVS page


Last Updated: 2004-01-01
This web page is © 1997-2004+ by David Alcock. All Rights Reserved.