It's all ones and zeroes Programming

7 Reasons that Rexx Still Matters

You might think of the dynamic language Rexx with nostalgia, but without a sense of urgency to program in it. René Vincent Jansen offers several convincing reasons that it ought to be in your programming toolbox.

Every time I mention Rexx on Slashdot or another techie site, people roll their eyes. They think that Rexx — the first widely used scripting language — is no longer relevant. I disagree, and in this article I explain why.

First: If you haven’t encountered Rexx before, you may need an update. Though Mike Cowlishaw invented it at IBM in 1979, there are nine free and open source Rexx implementations. It’s supported on virtually any operating system, though it got the most attention, initially, on IBM platforms including mainframes and IBM OS/2.

Among the main elements that make Rexx such a pleasure to program in:

  • It is a small language that can do everything.
  • It is case insensitive where that matters.
  • It has built-in TRACE and PARSE statements that are unsurpassed.

So how can Rexx be useful today, when so many other languages – such as Python, PHP, and Perl – are better known and more popular? Let me explain.

Rexx is a major glue language that ties together all important mainframe processing.

There is no denying that Rexx, the venerable granddaddy of scripting languages, had its popularity peak around 1995. Mentions of Rexx on Slashdot draw reactions from people who used it and liked it but for some reason feel compelled to announce that they are past Rexx now. This means, more often than not, that they lost the access to the mainframe platform they once used it on, went through a withdrawal period, and found replacement languages. It also means that the new love could not entirely replace the memories.

Rexx was originally, and still is, a mainframe language. It originated around 1980 on VM, and was published by IBM, at first reluctantly, as a result of a groundswell of popular demand by the technical staff of major accounts. It replaced a language called exec-2, which consisted mainly of ampersands. Rexx’s author, Mike Cowlishaw, was initially in trouble, but was later recognized as an IBM fellow. Rexx later spread to all IBM’s operating systems such as MVS, OS/2, and OS/400.

Typically, Rexx, as a glue language, is used by staff who are not supposed to do any programming, such as systems programmers and infrastructure and middleware management groups. (Perhaps that makes Rexx the first DevOps language, too.) As such, Rexx applications tend to stay under the radar, but if we were to take them away, it would surely mean the end of the world, with a greater measure of certainty than Camping or the Mayas can offer us. I have seen, recently, how major parts of commercial applications are sidestepped and swapped for Rexx glue, because It Just Works (which should be a Rexx trademark – with apologies to whoever owns the phrase now). So Rexx is the largest unknown application language. Bruce Eckel mentioned this in his Thinking in Java.

For mainframes, a commercial Rexx compiler produces native object code. It also enables promotion of applications to production status without having it executing from source code (and to squeeze out that last drop of performance). It is no great secret that the excellent Rexx compiler, produced from Haifa research by the Vienna labs, is a profitable product. On the mainframe (that important environment for your financial well-being), there is really no alternative.

Rexx has evolved into a major object-oriented language with an OO-version for the Java Virtual Machine.

In its original form, the Classic variant that still runs the mainframe, Rexx dated from the era of functional decomposition. If that’s all you know about, you may be surprised to learn that Rexx is also a far more modern programming environment.

There are two object-oriented follow-ons. One is a design by committee which is SmallTalk inspired, and had a stack-based VM before Java, that has all the dynamism that would make Ruby’s mouth water. (But that is an anachronism, since Ruby’s gestation was still far in the future when Object Rexx was designed by Simon Nash and his colleagues at IBM Hursley.) Next in innovative and dynamic Object Orientation, ooRexx has perfect backward compatibility with Classic Rexx as its greatest asset. This implementation was born on OS/2, and in the public eye its reputation has undeservedly has suffered by that OS’s untimely demise. It interfaced perfectly to SOM, the equally lamented better component model.

The other update to Rexx is a one-man product by the father of Rexx himself. Started as an experiment to determine if running Rexx on the Java Virtual Machine (JVM) was possible, it became the first alternative language for the JVM. That version is now a mature product, bootstrapped in itself, which the performance runs rings around other alternative VM languages.

The reason for this is simple: NetRexx is implemented as a (platform independent) translator from Rexx to Java source code. This JVM version has, in its 16 years of existence, leveraged the impressive progress in the javac compiler and the hotspot and j9 VMs – and all others. NetRexx is a fresh start, corrects some elements which Mike Cowlishaw was unhappy with (all comparisons are now case insensitive and the overloaded ‘do’ statement is split into ‘do’ and ‘loop’ – retconned into Object Rexx now also). It is, as was established on Sun’s JVM Language Summit in 2008, the only alternative JVM language that has stood at the base of an implementation of a class in the Java Class Library itself: BigDecimal.

Rexx is still human-oriented.

A very important language design goal has always been that the interpreters and compilers should be easy on the user. In other words, the language should not be complicated because the compiler writer would then have an easier task. This has translated into a “I think this should work” probability that is high and an astonishment factor that is low.

In every flavor of Rexx, all arithmetic is decimal based. It does not suffer “computer” rounding errors that make you look dumb. Furthermore, the decimal precision is unlimited – within reason, memory, and processing cycles of course.

While Rexx evolves, it never breaks your old code.

It never ceased to amaze me how many companies went bust because the step between VB n and VB n+1 was too much of an investment, or to hear people speak of “legacy Java code” in 1997. This just will not happen in Rexx. No new reserved words were introduced that trip up the variable names that you chose years ago. NetRexx, for example, does not have any reserved words at all (although I can advise against calling your variable ”end” if you want to shorten your programs by using loops).

Rexx has an ISO-standard, and implementations for every platform imaginable.

Few programming languages can boast an ISO standard. It means there is an important yardstick against which to measure implementations, and that shows in the quality of the interpreters and compilers available. Regina, for example, one of the first open source implementations, runs on an impressive array of machines, and on operating systems even I have never heard of.

Rexx is open source.

I have seen the future, and it is open source.

Oddly enough, and I am showing my age here, when I started in this profession, software, even IBM’s crown jewels, was open source, at least for customers, who would get the source on tape or microfiche without asking. Personally, I remember this as a time that technical staff, even of competing companies, helped each other in a way that was beneficial to all, not to mention fun.

For this day and age, the fact that IBM has made good on its promises to open source Object Rexx and NetRexx (the former in 2005, the latter only recently, in June 2011) means for all Rexx users, fans, and aficionados that its future is secured, and investment is safe. This means in its turn, that its future is starting now. To get involved in open source Rexx, have a look at Open Object Rexx and NetRexx. Regina is an ISO-compliant Classic Rexx for all relevant platforms.

The future of Rexx is on mobile platforms.

Rexx is beautifully suited to mobile devices, due to its small footprint and its extreme portability. Several implementations already are on Android for Rexx and NetRexx. For example, there’s a NetRexx IDE on Android devices.

The performance that is inherent to tight code conceived on smaller machines means this bright future is on mobile, the mainframe in your pocket. Chances are, you are running NetRexx code already on your Android device without really knowing it, just like on the mainframes that are enabling modern-day life.

There is a Rexx in your future, whether you like it or not.

For transparency: SQC editorial director Esther Schindler is the co-author of a book on REXX, Down to Earth Rexx (in its first edition), and still has a fondness for the language. She cannot say No to any request to mention it.

Share with your friendsJoin and Stay Current with the Community
JOIN RSS
About René Jansen

René Vincent Jansen is president of the Rexx Language Association.

  • Michael Hipp

    Thanks. Good article.

    For a Rexx neophyte, could you recommend a particular implementation of Rexx that would be a good one to start with?

  • Achilleas Margaritis

    The article would be more convincing if you posted some code examples and links to tutorials.

  • http://kitdavies.com/ Kit Davies

    I started my professional career in 1987 using Rexx on IBM 3090s running VM/CMS. The PARSE statement is still the most powerful single statement I have ever come across in any language. 

    FYI, Mike Cowlishaw has recently retired from IBM after about 40 years service.  

  • http://www.sutor.com/c/2011/12/daily-links-for-12022011/ Daily links for 12/02/2011 | Blog | Bob Sutor

    [...] 7 Reasons that Rexx Still Matters [...]

  • A.T. Murray

    http://mind.sourceforge.net/mindrexx.html is an artificial intelligence that I wrote in 1994. Then I ported it to Forth because the Forth community wanted it for robots. Then I ported it to http://www.scn.org/~mentifex/AiMind.html JavaScript so that Netizens anywhere could see how it thought. I really miss programming in Rexx, though, because Rexx is so powerful and easy to code in.

  • Anonymous

    “They think that Rexx — the first widely used scripting language”

    Oh please be serious.  There are scripting languages that had a larger development base before Rexx got started than Rexx ever approached.

    Rexx was created in 1979, and the closest it ever got to being widely used – which wasn’t very close – was when it became the OS/2 scripting language with its 1996 release.  RAND thinks the developer population never crossed the 10,000 mark.

    Forth, PL/M, Speakeasy 3, Bourne Shell, QDOS Batch, awk, sed, Perl 2, and Visicalc all had higher than Rexx’ peak before Rexx was born.

    DOS/360 JCL had achieved that population more than 15 years before Rexx was created.  IPL beat it by almost 20.

    Wow, Rexx is open source?  So is almost every other language.

    Wow, Rexx has an ISO standard?  That’s nice.  Maybe try comparing it to a real standard like the C++ standard some time.  Rexx’ standard doesn’t even hold up to the Microsoft JScript standard for Internet Explorer 3.  That standard barely exists, and is famously one of the worst ISO standards that was ever created for a language.  Even homebrew languages like Forth often have better standards.

    Rexx is a major glue language for big iron?  Dream on, fanboy.  Rexx doesn’t exist on most big iron, and most big iron staff have never heard of it.  Rexx barely even qualifies as a *minor* big iron glue language.  If you’d bother to look at statistics, instead of just making bald-faced false claims, you’d find that *even* *LISP-1* from 1954 is a more common glue language in the real world today.

    You have seen the future and it is open source?  What, did you just discover the internet?  My mother, who can’t program the VCR, had opinions on open source ten years ago.  The future was open source so long ago that even the past is barely open source anymore.  You might as well be telling us that the future is The Pet Shop Boys, the Teenage Mutant Ninja Turtles, and 286es.  Jesus.

    You want to know why nobody thinks Rexx is relevant?  It’s articles like these.  It’s articles that show that the only people who even consider these languages are fantastically out of touch individuals who tell themselves shaggy dog stories so that they don’t have to admit that their niche language isn’t a niche language.

    If you want your language to have credibility, start by having some credibility yourself.  That starts by not writing breathless articles about how you’ve just discovered open source and how a language most developers have never heard of is secretly a major language, you’re sure of it.

    Doesn’t it bother you that you didn’t actually provide a single technical point here?  It’s all “ooh look, shiny, open source, ISO standard.”

    BASIC – not Visual BASIC, but actual BASIC, with line numbers and goto, has an ISO standard, and according to RAND data, is a more active language than Rexx by almost an order of magnitude.  Why don’t you try cheerleading for BASIC for a while and watching how people roll their eyes?  Since you aren’t emotionally married to that long-sunk ship, maybe then you can watch which things you say are getting you laughed at the hardest, so that you can learn better how to approach primping up your corpse-engineering.

    You might as well have said “use Rexx because the logo is red.”  It’s painfully obvious that nobody’s ever actually taught you how to choose a language.  None of that comes in terms of you finally catching on to the open source movement of the 1960s.

    God, I hate novice fanboys and their made up data.

    ‘Course, this’ll end up censored, because you don’t get this delusional about your language without silencing some laughter.

    Software quality connection, indeed.  Let’s start with a dead scripting language from 1979, based on the false assertions of someone who apparently isn’t aware of the words “research” or “citation.”

  • Anonymous

    “The PARSE statement is still the most powerful single statement I have ever come across in any language. ”

    Rudimentary block assignment is the most powerful statement you’ve ever come across in any language?

    Dude.  Learn more languages.  Almost every language has some equivalent of list().

    Seriously, maybe it’s time to pick up Prolog. 

  • René Jansen

    Michael,

    that depends on your environment and your goals. ooRexx, if you want Classic Rexx compatibility, OO and Windows interfacing, and NetRexx if you are more comfortable on the JVM. 

  • René Jansen

    Not sure if you have ever used the PARSE statement, I would hardly call it rudimentary block assignment. With your comparison to list() you lost me.

  • René Jansen

    Although you have written ‘troll’ all over you, some points. Your facts are shaky. 

    “Forth, PL/M, Speakeasy 3, Bourne Shell, QDOS Batch, awk, sed, Perl 2, and Visicalc all had higher than Rexx’ peak before Rexx was born.”Of these only awk could be called a scripting language, if you do not know enough about scripting languages, but it wasn’t. Perl 2 did not even exist when Rexx came about, and calling Forth, PL/M and Visicalc scripting languages is just plain backward, and comparing OS/360 JCL to it is just hilarious.Rexx is on all versions of z/VM and z/OS, so on all big iron. You really never saw Lisp-1, did you? You probably never saw big iron either.If you must have a citation, Michael L. Scott, Programming Language Pragmatics, Second Edition, ISBN-13: 978-0126339512,  names Rexx as the first scripting language.You have missed the point about ooRexx becoming open source in 2005, and NetRexx in 2011. No big deal – ask you mom to read the article to you, slowly.I gave up on BASIC probably before you were born. You don’t need to be censored because you are funny enough as you are.

  • http://twitter.com/8bitmore 8bitmore

    @google-c4e926fdc0905d11899b69c6387f6ed7:disqus @google-11306e5a084c4f90ab1eba09da4d197d:disqus
    René Jansen being the president of the Rexx Language Association probably makes it a bit politically sensitive for him to start recommending one type of Rexx compiler. That being said I would have loved something like that as well – a quick google provided me with following observations: Regina Rexx, while stable, seems a bit dated with little foum activity happening. ooRexx had its last status report published 12 April 2009. Finally NetRexx might be the most active of the branches but its web presence seems very fractured / in-transition. I’m not impressed with the practical Rexx situation from community / day-to-day usage standpoint but I profoundly like the idea and premise of Rexx as a user friendly language, YMMV.

  • Anonymous

    (I removed this post voluntarily. I had misunderstood an anti-spam mechanism which was catching evidence given as links and interpreting it as spam to be the blog being locked after the “I don’t need to censor you” line, and I called the author out in a way that is incorrect.)

  • Anonymous

    It seems I also can’t post things with links in them, so although I’ve posted the response I want to post on my blog, I can’t tell anyone where it is.

    How nice.

    It’s the first post on fullof dot bs.  I’m not posturing like I have something to say; I very much do have something to say.  However, when you claim I’ve got my facts wrong, I’d like to provide reference, and it seems you’ve set your comment system up in such a way as to prevent spammers.

    Unfortunately the anti-spammer mechanism is also catching people who want to give evidence of their claims, which you rebuke incorrectly.

    Maybe you’ll actually post it.  Doubt it, though.

  • Anonymous

    Unfortunately your comment system is set up to disallow comments with links in them.  This is a sensible anti-spam mechanism.

    However, when someone wants to give evidence of the claims you suggest are incorrect without any actual proof, that means they can’t post.

    I have written a long form response, and it’s waiting on moderation.  There are none of the personal attacks you seem unable to go without; let’s see if you admit a post that picks the peacock’s feathering.

  • Anonymous

    “Not sure if you have ever used the PARSE statement, I would hardly call it rudimentary block assignment.”

    Yes, I have, and that’s exactly what it is. 

    “With your comparison to list() you lost me.”

    List() is the traditional name of PARSE, and is rudimentary block assignment.

    This code with minor tweaks is valid PHP, PL/M and Perl.

    It’s block assignment instead of simple assignment because the REXX version explodes on space implicitly.

    This is also the reason for the prolog comment, because this is basically all prolog actually does, is walk PARSE in a depth-first search with first-order cut.

    This is also what base assignment operator (what Erlang calls pattern matching) is.

    { Noun, Verb, Modifier, Adjective } = re:split(” “, “You are not correct.”);

    Almost every language has something like this.  In BCPLs like C, C++ and Java it’s the format f family (sscanf, et cetera).

    Please don’t argue with things I said to someone else if all you’re going to say is “have you really done this and you lost me.”

    Of course I lost you.  It’s difficult not to.

  • Anonymous

    Sorry, the code example must have been removed because it was PHP and it was framed in angle braces.  Skipping the bracketting:

    ?PHP list($Noun, $Verb, $Modifier, $Adjective) = explode(” “, “You are not correct”); ?

  • Anonymous

    Have you nothing better to do that bash?  Maybe you could use bash to bash?
    Rexx is a great language for many things.  Unfortunately for it IBM restricted it to much for too long while other scripting tools such as Perl became widely used.  Perl became so well liked and widely used because everything else that was available for non-mainframe platforms pretty much stunk.  Debug (-d) for Perl was added as an afterthought while it was built into Rexx from the start.  No other language I’ve seen or used comes close to Rexx for “If I can read it and it makes sense then it will work”.  For Perl
    “if ($x == 7) {” is ok but change it to “If ($x == 7) {” and it doesn’t have a clue. And

  • Anonymous

    And…what’s up with the “==”?  Give me a break!  Before you go bash-ing me for picking on Perl let me say that I could say similar stuff about most Unix born langs.  I just know a little more about Perl.  Enough to ditest it for being case sensitive when there really is no reason for it…

  • Anonymous

    I’m so sorry you consider any kind of JCL a scripting language.  Or even a language for that matter.  I guess I never found the “loop” command.  But then again many people consider sh and ksh and csh and even bash to be scripting languages.  Go figure.

  • Anonymous

    Parse is cool, but you have to interpret to be really cool. 

  • Mike S

    This StoneCypher is what’s wrong with computing nowadays. I apologize to everyone on behalf of his generation, his behaviour really makes me ashamed of being young. 

  • Mike S

    Also, thanks Rene Jansen; this was a very useful and informative article. I just (re)discovered rexx yesterday, I know many, many programming languages, and I find it an extremely nice language that I’m sure i’ll want to study further and further. I look forward to joining the Rexx community once I’d done some reading and played with the implementations a bit, that’s hopefully very soon. :-)

  • Anonymous

    StoneCypher calm down, he’s not saying it’s the best language in the world, he’s just saying it’s relevant, and I agree with him. Please stop trolling. We need more user friendly languages like REXX and HyperTalk. It may seem trivial to arrogant “experts” like you but for common users they are empowering. I don’t want to learn python and perl and install 2000 different packages from CPAN to write a simple script! OK?? 

  • Anonymous

    I used REXX during my student days on a 3090 and i LOVED it! People who like complexity for complexity’s sake can never understand the beauty of REXX. These people are  the real troglodytes who want to go back to the same level of complexity which the machine languages offered except they do this in perl/python/ruby and  what have you. They belittle clean, easy on the human languages and equate simplicity with “simple-ness”. Thanks to your article I have discovered NetRexx and I’m loving going through the tutorials. Bye.

  • Tom Bracken

    Unfortunately stoneCypher below has probably never had to debug someone else’s code written say in something like C++, or any other language which is convoluted in terms of syntax.

    Again the reason REXX stood out from among all the other languages is the fact the instead of making the syntax for the language horribly complex, the designer of Rexx made the syntax as simple as possible. This made debugging a Rexx program much easier to do. 

    I am always of the opinion that if you want to do something stupid, make sure that you do it to the fullest extent of stupidity.  Hence, instead of writing something in a language someone can understand and be able to debug like Rexx, write the program in something that someone can never in a million years figure out or fix!!!

    Something say like APL (A Programming Language)

    Also make sure that the entire program fits on one line. 

    Which with APL is very easy to do!!!!!

    As someone who once worked on 370 assembly language programs for airline
    systems (TPF – Transaction Processing Facility) , I can tell you that it is no fun
    trying to figure out someone else code, especially if the language the code is written in is almost impossible to follow because of its very nature.
    (370 Assembler , APL, C++ , (Your choice for a Convoluted Computer Language Goes Here!!!!) )
    Cheers!

    Tom

  • John Megert

    Rene, I really enjoyed your article. I can remember writing Clists and then moving over to REXX on the mainframe when I was an application programmer. My what an elegant tool. I used it to write everything from mainframe utilities under TSO/Dialog Manager to screen scrapers on OS/2. I wrote an entire set of programs to scan PDS libraries looking for date fields to prepare for the Y2K remediation process. They were very sophisticated set of programs. I also ported them to a Windows version of REXX and changed the IO statement to be able to read stream files. Because they were so effective, I was called to many client sites to run scans against COBOL/ALC files when commercial software packages were failing or stumped.

    Because I have long stopped programming and am in management now after a years of being on the road and some down time due to the 2007 slump, I threw out all my code because I had not need in years to even look at it. To my disappointment an opportunity came up that someone needed to be able to part some text files and I wished I had them because all the fields I scanned for came from table type files I built. Wished I would have saved them now.

    I do have a question though. Although I agree with your article, due to lack of interest, I think REXX has become somewhat obsolete even though I would use it. I have been looking into other languages to get into that are the closest to being an English based syntax and flexible and powerful like REXX. Ruby seems to be the closest. Many are starting to use PowerShell to do many of the things I used REXX for.

    What do you think? For an old time REXX lover, what would you recommend as a current language that’s the closest to REXX?
    Thanks,
    John

  • René Jansen

    John,
    thanks for your kind words. I can recommend to look into ooRexx and NetRexx and then reconsider your impression of Rexx becoming obsolete. I have used Python, Ruby and Powershell and although they all have elements that I like, they are not Rexx. I cannot get used to the indentation of Python (emacs indents for me when I press tab in NetRexx mode) and Ruby is elegant, but too slow for my taste and has some of the Perl oddities in naming and typing variables with punctuation; Powershell is also very slow and handicapped by security officers at the sites where I encounter it. Things that work in Powershell at home do not work in corporate environments – it has an odd security design that really handicaps it and I am afraid that it only has cost me a lot of time and did not help me a lot.

    But I am the first to admit that I am biased – (Net)Rexx is the language I enjoy to program in, while the others are just – “work”. So if you forgive me my biased answer, the current language closest to Rexx is Open Object Rexx – download it and enjoy – even your old exec will run.

    And if you develop for the JVM, the closest to Rexx is NetRexx – it smokes the other JVM languages performance-wise (the JVM improvement make my programs faster without me doing anything about it) , and the translator can interpret and compile code – just use what you prefer – I quite like the short edit/run cycle that the interpreter gives me.

    best regards,

    René. 

blog comments powered by Disqus