You might have heard of the Rexx scripting language from its role as the dominate scripting language on mainframes, OS/2, and the AmigaOS.What you may not know is that today free Rexx runs on nearly every operating system. This includes Windows, Linux, Unix; the major handheld operating systems such as Windows CE, Palm OS, Symbian/EPOC; mainframe systems including z/OS, z/VM, and z/VSE; and a wide variety of other operating systems such as Mac OS X, BSD, OpenVMS, DOS in all its forms, BeOS, QNX, eCS, osFree, AROS, AtheOS/Syllable, i5/OS, AS/400, and others.
Rexx is known for combining ease of use with power. This is not an easy synthesis to achieve because these goals naturally conflict. Rexx’s inventor, Michael Cowlishaw, employed a variety of special techniques to blend the two goals in a single language.
For example, Rexx is free-format and case-insensitive. It has very little syntax and a tiny instruction set. Yet its large built-in function set makes it powerful. And external functions are accessed just like built-in functions. Rexx scripts easily leverage existing code, in the form of programs, objects, functions, operating system commands, external interfaces, APIs, and the like.
Combining ease of use with power gives Rexx a very different personality than the scripting languages that evolved from the Unix tradition, such as Perl, Korn, Bash, Awk, and the C-shell. Rexx yields power without the burden of complex syntax. Rexx complements these other scripting languages more than it competes with them because their personalities vastly differ.
Free Rexx comes in the form of eight different free interpreters. All are “standard Rexx” plus extensions or features that adapt the language to particular platforms or goals. Some interpreters are extended for Windows, others for Linux or handhelds, while still others optimize execution speed or maximize portability. I list all the Rexx interpreters and where to download them at the end of this article.
Beyond Standard Rexx
Rexx comes in two fully object-oriented versions. Open Object Rexx is supported by the Rexx Language Association. It supports all object-oriented programming features like messaging, classes, encapsulation, inheritance, overloading, and the like. It features a huge hammer of a class library. roo! is an alternative OOP implementation that includes different operators, classes, and methods. Open Object Rexx runs under Linux, Unix, and Windows, while roo! is strictly a Windows product. roo! features an impressive set of tools and utilities for creating forms and GUI objects, working with XML and HTML, and programming the Windows command line.
Both Open Object Rexx and roo! are true super-sets of classic, procedural Rexx. They run traditional Rexx scripts yet allow developers to seque into object-oriented programming at any time and to any degree. Rexx presents an alternative to object-oriented scripting with Perl or strictly OO languages like Python or Ruby.
NetRexx brings “Rexx-like” scripting to the Java environment. Develop applets, applications, servlets, beans, and classes with NetRexx. NetRexx scripts use Java classes and NetRexx can be used to develop classes used by Java programs. NetRexx even generates fully commented Java code. This brings Rexx’s ease of use to the Java environment in the form of a fully Java-compatible tool.
Rexx has an international standard to which all Rexx interpreters adhere, except NetRexx. The language’s world-wide user community is especially strong in the new Europe. The Rexx community has produced undreds of free Rexx tools and interfaces. With these tools Rexx scripts program relational databases, XML, GUIs, forms, web servers, Apache, CGI, ActiveX controls, objects, editors, and other interfaces.
To Learn More
To get started, check out the Rexx Language Association web site. The new book Rexx Programmers Reference tells everything about the language, its interpreters, tools, and interfaces in its 700 pages for under $30.
I’ve listed the web sites for the free Rexx interpreters and many of the tools below. If you are new to Rexx, I recommend Regina or Open Object Rexx as good choices to start.
Where to Get Free Rexx
Regina runs across a wide variety of operating systems. It is probably the most-widely-used free Rexx interpreter and it features professional documentation and a long-term support record. Regina has a vast set of “extended functions” that provide extra features beyond the Rexx standard.
Reginald is a standard Rexx specifically enhanced and extended for Windows. It includes hooks into Windows and provides the kind of support for Windows features that developers expect.
r4 is another standard Rexx specifically extended for Windows. It features a large set of command line tools and utilities and is especially easily to learn and work with. It is available from the same vendor as roo!, a fully object-oriented superset of classic procedural Rexx that comes with a complete set of utilities and tools for Windows programmers.
BRexx is the fastest Rexx interpreter. It has a tiny footprint and runs on Windows CE, as well as Windows, Unix, Linux, Mac OS X, DOS, AmigaOS, and other systems.
Rexx/imc is an interpreter for the Linux, Unix, and BSD platforms. It features Unix-friendly extensions and has a track record for support spanning back a decade.
Rexx for Palm OS brings Rexx programming to the Palm operating system. It integrates Rexx “applets” with all Palm resources. You can develop Palm applications that execute merely by a pen-swipe and intergrate various applications and Palm resources.
Open Object Rexx is a fully object-oriented superset of classic procedural Rexx that runs under Linux, Unix, and Windows.
NetRexx is a “Rexx-like” language that runs in the Java environment. NetRexx scripts use Java classes and can be used to develop applets, applications, servlets, beans, and classes.
About the Author:
Howard Fosdick is an independent consultant who has worked in most major scripting languages. He is the author of the comprehensive new book Rexx Programmers Reference.
If you would like to see your thoughts or experiences with technology published, please consider writing an article for OSNews.
If you propagandate your favourite language, at least try to show why it is supposed to be so great with some code.
Ripped from IBM mainframes, ARexx inspired Gasse’s Area 51 team dissecting an Amiga secretly shot-down in 1985 and being held in the underground basements of 1 Infinite Loop. Years later Gasse would start his own Amiga-knockoff computer company before selling its operating system to Palm and shutting down. As the now Chairman of PalmSource, he is reportedly now inspired by the work the Chinese are doing with Linux. It remains unclear if the new free Rexx client for Linux will appear in future PalmSource offerings.
+5 funny, but -5 for making me spit diet pepsi out through my nose and all over my keyboard and choking while laughing so hard.
The original IBM mainframes didn’t have good scripting languages to start with. MVS, batch-oriented system, had TSO, interactive ‘Time Sharing Option’ with a scripting language CLIST (command list), rather primitive, but then the whole TSO was terribly slow. VM/CMS was quite different, interactive system, fine, CMS came with rather primitive EXEC script and then EXEC2, also primitive. And then suddenly CMS got REXX, Restrictured Extended Executor, very close in syntax to block-structured languages like Algol or Pascal or C, so of course it was a real pleasure to use. Also very compact definition so easy to learn. At some later time REXX became available on TSO. Still very slow, but at least you can right something more complex compared with CLISTs.
However Unix had fairly decent scripting facilities to start with, Bourne shell (and then of course BASH), and many others, and then of course PERL and PYTHON came in. So even if REXX became available under Unix, it didn’t have anything unique to get excited about, unlike when REXX became available in IBM mainframe environment. So unless you’re doing some kind of cross-platform heavy-duty scripting, and IBM mainframes is one of the platform, I wouldn’t bother.
What’s unique about VM/CMS is that for quite a while IBM made the source code available to the user community, and users, esp. academic community made lots of contributions, patches, enhancements. If I recall correctly, the origins of REXX are outside of IBM, more like user-contributed language. (but please someone who’s more familiar with the history of VM/CMS, correct me if I’m wrong).
It was some sort of glue-all scripting language which was never getting into your way, on the contrary it helped the user to move forward at light speed.
I’m sad remembering how the AmigaOS was the only OS I have enjoyed using…
Rexx is very good. I know about it because I used it in its Amiga incarnation AREXX…
But on Amiga REXX it is powerful because community (and mainly programmers) accepted it and because, then, almost any program have an AREXX port built in.
(lots of components of the AmigaOS have Arexx port too)
On other Operating Systems except OS/2 it is very very (and again: very) rare that a programmer will enhance such a feature in realizing his programs.
To be honest, I don’t know if there could rise some “global” acceptance in embracing REXX if people are not convinced to support it.
This all looks soo old.. look at those project pages. It’s like going back to the 80’s
And I had a hard time finding code examples. Now I realize they tr to hide them. It all looks so cryptic. Or is it just that all those modern languages look so much alike ?
I have used REXX extensively on IBM mainframes. Not sure if this is the only scripting language available on that platform but it sure comes handy for writing small utilities.
Or is it just that all those modern languages look so much alike ?
I’m afraid so. There used to be something called diversity, but now it is gone. I am not sure it is ever coming back …
Damn mornings!!
From my Amiga days, Rexx is just a shell script with the difference from Unix shells, that the syntax makes sense and is not hideously ugly.
I am not sure of how much use it is today, unless you are on a quest to destroy the *sh
From my Amiga days, Rexx is just a shell script with the difference from Unix shells
Umm. No. ARexx was a glue-language. Let say Application DrawMe had a ARexx port, also the Application ConvertMe had it. DrawMe couldn’t load GIFs, but ConvertMe could convert GIF’s to IFF’s. So, all you had to do was read the manual, find out names of function provided by ARexx port on both sides. Then you could use ARexx to call this functions like this
(mind: this is a pseudocode)
drawme openfile(“mypic.gif”)
convertme convert(“mypic.gif”)
convertme convertto(“iff”)
convertme saveas(“tmp:sometempfile”)
drawme loadfile(“tmp:sometempfile”)
So, you could connect two applications with ARexx.
If I recall correctly, the origins of REXX are outside of IBM, more like user-contributed language. (but please someone who’s more familiar with the history of VM/CMS, correct me if I’m wrong).
The REXX language is actually an IBM creation. It was started by a guy named Mike Cowlishaw who basically did not think much of EXEC2 and decided that he could do better.
“I’m sad remembering how the AmigaOS was the only OS I have enjoyed using…”
You don’t have a mac do you? Me neither, but I guess when I do computing will be fun again, hopefully.
Amiga rules!
Mr. Stilgar wrote:
>This all looks soo old.. look at those project pages.
>It’s like going back to the 80’s
>And I had a hard time finding code examples.
>Now I realize they tr to hide them.
>It all looks so cryptic.
>Or is it just that all those modern languages look so much alike ?
Well, I can’t talk about other Rexx dialects, but regarding AREXX you can find lots of examples you could study.
For example there is the news here on the same page OSNews regarding “Rise and Fall of Installation Procedures”
http://www.osnews.com/story.php?news_id=10644
It deals with ARexx also (and extensively) and the author donates as gift 2 AREXX programs to Amiga community. The programs are commented well in the list, and there is an entire html instruction page for each of them.
The article section regarding AREXX:
http://www.morphzone.org/droffice/RiseAndFallOfIPs/Rise_and_Fall_of…
And here follows Trap.rexx and its instruction page:
http://www.morphzone.org/droffice/RiseAndFallOfIPs/Trap.rexx
http://www.morphzone.org/droffice/RiseAndFallOfIPs/Trap.html
Here again second program list, Snapshot.rexx
http://www.morphzone.org/droffice/RiseAndFallOfIPs/Snapshot.rexx
http://www.morphzone.org/droffice/RiseAndFallOfIPs/Snapshot.html
From the same guy there come also PatchLList.rexx and on Aminet Amiga repository (www.aminet.net) you could find also Eqfiles.rexx:
http://www.morphzone.org/droffice/RiseAndFallOfIPs/PatchLList.rexx
http://main.aminet.net/util/rexx/EqFiles.lha
http://main.aminet.net/util/rexx/EqFiles.readme
I hope these examples could help you in analizying what is an Arexx program and its structure, although these examples are AmigaOS only.
Well, obviously on Aminet Amiga repository lay plenty of ARexx examples…
Here: http://www.aminet.net/search.php?path=util/rexx
…but as I said previously in this same thread, the Amiga is advantaged, because on this platform almost any program have Arexx port built in…
Regarding amiga you can also find an entire Web Server written in AREXX:
http://gonzo.1av10.nu/w3s/
Although it obviously is interpreted (ARexx is an interpreted language), so on old (classical) Amigas it is very very slow.
If you desire to check AREXX by yourself, you could download Amiga emulator for your machine and try it by yourself.
http://www.winuae.net/
Well I must advice you that to run it, you need also an original diskset of AmigaOS (5 floppy disks), or a CD of AmigaOS v3.5, or v3.9, and Amiga-kickstart-rom image-file (sort of Amiga Bios).
Alternatively you could buy Amigaforever CD from Cloanto and it has licenced versions of WINUAE and of the kickstarts and OSes built in, so you could extensively try any AREXX program.
Look at
http://www.99-bottles-of-beer.net/language-rexx-493.html
for an example of the Rexx-language.
Many downloadable example scripts are at —
http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764579967,descCd-…
What I like about Rexx is that its simple syntax allows you to code it from memory. Scripts are easy to enhance and maintain. Makes a nice fit with power languages like Perl.
Whoops! Forgive me. I forgot to quote the link of Amigaforever.
http://www.amigaforever.com
Actually, REXX is an ideal companion to KDE’s dcop or the freedesktop.org dbus. If someone modified regina to incoporate support for these, then you’d really have something…
I’m still using daily lot of Arexx scripts on my A4000 and Pegasos machines (under MorphOs) ! Even my old scripts wrote in 1988-89 on A500 (68000 computer) still works on a Pegasos II (G4 computer) in 2005. Especially useful with programs like ImageFX, Simplemail/YAM, PPaint/FxPaint, Miami, Scalos, etc..
Very basic scripting language but powerful (especially with parsing) => an ancestor of moderns Rebol & Python 😉
Still Amiga/Pegasos user and you need an arexx script that doesn’t yet exist, contact me via AI.org forum !
I am also devoted a little to Arexx, especially Arexx of Directory Opus Magellan.
Using it since years… if you have a some own scripts using Magellan’s Arexx commands please to contact me.
Non-AmigaOS users have no idea how strong Amiga implementation of Rexx is, generally speaking. Arexx is one of the reason I am still using Amiga on my PC… just collecting money for Pegasos
The great strength of Rexx (which like others here I use as ARexx) is its Trace facilities. These make debugging extremely easy.
When I learned Perl, I found it much harder to master because there is no similar Trace command.
I was able to code a fairly complex program for creating bar codes in various formats, using ARexx with the functions in a drawing program to output the actual graphics.
Why don’t, both of you cooperate? 😉
Please, if you think your ARexx programs are well written and performs important task-features, then perhaps, have you tought that you could share them with the community by uploading them into Aminet repository?
Just write the Arexx programs cleanly and well commented, then add minimal help or instructions and put them into Aminet.
Also you could create a page on your sites (if you own one or more webpages) leaving other users the possibility to download these scripts.
You just need to create a good archive in which to put all your AREXX scripts, well sorted and ready to use (download), and start advertising regarding its existence into Amiga related Main Forums.
I’ve used REXX on my Amiga and on IBM mainframes,and REXX really kicks ass there But this is because those environments where prepared for REXX. As already said, virtually every Amiga program had an ARexx port and on OS/390 or z/Os you can also interact easily with TSO or ISPF or any other environment.
The REXX incarnations on “normal” PCs don’t have this form of integration, so what’s left is just a nice scripting language. But Perl/Python/Ruby etc. etc. are also nice AND since they’ve lots of bindings to other libraries, you can do a lot more useful stuff with them.
If your looking for Windows integration, check out Reginald Rexx at http://www.borg.com/~jglatt/rexx/rexxuser.htm It’s got hooks into Windows and can invoke any DLL. It comes with many Windows tools and features a good degree of Windows integration.
r4 and roo! also offer at lot of integrated Windows tools and command line utilities at http://www.kilowattsoftware.com
My opinion — not competitive with Perl for desktop OS integration (nothing is!), but beats Ruby.
I use Microsoft’s library of Object Rexx scripts for Windows —
http://www.microsoft.com/technet/scriptcenter/scripts/rexx/rxindex….
Raffaele especially, and all the others, thank you for your links. I have a much better idea of the language now.
It actually seems to be quite nice and consise, especially in environments designed to work with rexx.