O'Reilly on the Virtues of Rexx
gaijincory writes "O'Reilly's ONLamp has written an interesting article on the history and virtues of Rexx, the first widely used scripting language concocted 25 years ago. According to the review, 'Rexx employs decimal rather than binary arithmetic' and 'You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.'
I'd be interested to hear about any success (or failure) implementation stories."
We tried working with Rexx
An employee suggested to me that we load Rexx on a few machines here as an evaluation. I was skeptical at first but he explained the benefits of using it for our employee's day-to-day scripting. So I decided to let him install the interpreter onto 5 machines to see how the users got on. Besides, our IT manager had been using it on his system and it seemed to work fine, why not try it on the client machines?
Once he'd got the machines up and running with Rexx we let the users try it out. It all seemed fine to start with: Rexx was a pretty good replacement for batch files and the users could still do their work as normal.
Alas it did not stay that way. After a few days, I had lost count of the number of complaints received from users who could find things they were used to or tasks they could not perform that they previously could with batch files. The final straw came when one employee lost several hours work when Rexx suddenly had an error reading from our intranet file server and corrupted his project.
Needless to say, the Rexx team offered no support whatsoever. I made the employee uninstall Rexx from the machines and lets just say he's not with us anymore, because we had him killed.
Rexx employs decimal rather than binary arithmetic. [...] You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them. Are these supposed to be positive points? Because it kind of flies in the face of coding best practices...
Okay, I'm probably dating myself here (illegal in Nebraska, btw), but I remember REXX when it emerged as a replacement for EXEC which I had coded extensively in (written entire app systems) on IBM mainframes. There were a lot of benefits to REXX back then, notably it cleaned up and made transparent a lot of garbage and system management chores required to write clean EXEC code (e.g., strings tokenized at 8 chars, awkward variable interpolation)... I used REXX for a while on the mainframe and can't remember why I abandoned it.
Fast forward 2 or 3 hundred years, and I found myself dropped into a Unix universe, and quickly self taught myself the ins and outs of shell. Haven't looked back since. Now, I'm looking back and am intrigued... REXX really does have some interesting features. And, since I have a little free time on my hands, maybe I'll re-visit REXX, but from userland out there, any feedback would be useful:
I'm a first year programming student at an Ivy League school and I've
just finished my Visual Basic classes. This term I'll be moving onto
C++. However I've noticed some issues with C++ that I'd like to
discuss with the rest of the programming community. Please do not
think of me as being technically ignorant. In addition to VB, I am
very skilled at HTML programming, one of the most challenging
languages out there!
C++ is based on a concept known as Object Oriented Programming. In
this style of programming (also known as OOPS in the coding community)
a programmer builds "objects" or "glasses" out of his code, and then
manipulates these "glasses". Since I'm assuming that you, dear reader,
are as skilled at programming as I am, I'll skip further explanation
of these "glasses".
Please allow me to make a brief aside here and discuss the origins C++
for a moment. My research shows that this language is one of the
oldest languages in existence, pre-dating even assembly! It was
created in the early 70s when AT&T began looking for a new language to
write BSD, its Unix Operation System (later on, other companies would
"borrow" the BSD source code to build both Solaris and Linux!)
Interestingly, the name C++ is a pun by the creator of the language.
When the first beta was released, it was remarked that the language
would be graded as a C+, because of how hideously complex and unwieldy
it was. The extra plus was tacked on during a later release when some
of these issues were fixed. The language would still be graded a C,
but it was the highest C possible! Truly a clever name for this
language.
Back to the topic on hand, I feel that C++ - despite its flaws - has
been a very valuable tool to the world of computers. Unfortunately
its starting to show its age, and I feel that it should be
retired, as COBOL, ADA and Smalltalk seem to have been. Recently I've
become acquainted with another language that's quite recently been
developed. Its one that promises to greatly simplify programming. This
new language is called C.
Although syntactically borrowing a great deal from its predecessor
C++, C greatly simplifies things (thus its name, which hints at its
simpler nature by striping off the clunky double-pluses.) Its biggest
strength is that it abandons an OOPS-style of programming. No more
awkward "objects" or "glasses". Instead C uses what are called
structs. Vaguely similar to a C++ "glass", a struct does away with
anachronisms like inheritance, namespaces and the whole
private/public/protected/friend access issues of its variables and
routines. By freeing the programmer from the requirement to juggle all
these issues, the coder can focus on implementing his algorithm and
rapidly developing his application.
While C lacks the speed and robustness of C++, I think these are petty
issues. Given the speed of modern computers, the relative sluggishness
of C shouldn't be an issue. Robustness and stability will occur as C
becomes more pervasive amongst the programming community and it
becomes more fine-tuned. Eventually C should have stability rivaling
that of C++.
I'm hoping to see C adopted as the de facto standard of programming.
Based on what I've learned of this language, the future seems very
bright indeed for C! Eventually, many years from now, perhaps we'll
even see an operating system coded in this language.
Thank you for your time. Your feedback is greatly appreciated.
The author of 4DOS/4NT/etc?
IBM is still using REXX widely on z/OS.
If only this was possible in C#, about 25 years later...
You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.
Gah! No-strong-typing is *NOT* a feature!
Rexx automatically allocates them when you first refer to them.
Well, thanks for the heads up. I imagine that they are variant types too.
IBM made it available for nearly all of its operating systems. In particular, it was extremely handy if you were on a VM/CMS system.
(S(SKK)(SKK))(S(SKK)(SKK))
you feel uncomfortable without case sensitivity in languages? hmm... given that it's only differentiating factor is that it allows you to declare two objects/vars/functions with identical names, whose only difference is the case of one letter, i would have thought the case for clarity was overwhelmingly against! genuinely good semantics would involve well chosen names or prefixes as differentiating factors.
still, case-sensitivity in languages doesn't really bug me _that_ much (primary language at work is c++) but what i genuinely _loathe_ is case-sensitivity in operating systems. ughh!!
aaaannnyywayyy...
>You don't need to declare or predefine your variables.
Isn't this a bad thing? You would never catch typos when using variables. I start using a variable named "myBigNumber" then the next day I mistakenly start using a "myBigNum" variable even though I mean the same thing.
The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
I had moved over to the OS-360 to do do PL1/COBOL/RPG in the 80's. REXX was there to play with. I found myself doing all sorts of fun stuff with it. Fairly easy to use. I still think of it like being a very very skinny perl.
I prefer the "u" in honour as it seems to be missing these days.
I'm a sucker for bleeding edge.
.bat files.
I was using OS/2 back in the day (I used Linux too). Windows was just too mainstream.
I found that OS/2 had a new scripting language that I hadn't seen before. Wow, a new thing I can learn to stay ahead of the curve.
I spent quite a bit of time learning it before I found out that it was old even then (1994).
Well, it wasn't bleeding edge, but it was still fun and it beat the pants off of DOS
Good times.
The Internet is full. Go Away!!!
Hearing about REXX brings up memories about sitting on an IBM 3178, finishing an assignment, going to print it, only to realize that some prof decide to sent about 3000 pages of data to the line printer ahead of me.
It also brings up the nightmares of having to use XEDIT to do the work...
(S(SKK)(SKK))(S(SKK)(SKK))
T-Rex was king. And there are loads of articles on that too.
Thanks for the laugh riot, fuckwit.
Some olde ex-mainframe guys at work have some Rexx manuals and one guy wrote a small utilitiy in Rexx. (these were the same people that had extensions to vi (.exrc's) to make it work like their mainframe editors...uhm, get out of the past?)
So thats great and all, but why are you programming in a professional capacity in a language that no one can maintain? Thats worse than hacking code in perl and not "using strict"!
In the future, I would want to not be isolated from my friends in the Space Station.
Why does this sound like Visual Basic?
I thought Rexx was the name of the animated doggie on the MS search dialog.
Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
What truth?
There is no dupe
Check out Ruby, the language. It runs circles around Rexx, is free and very cool. True objects, all the time. Garbage collection built in, as well as everything is an object. The best of Smalltalk, Lisp, BASIC, C, and more.
--- Old Time NeXThead
Among its GUI editing features I find essential for everyday work are (1) an underlying model where the screen is a giant xy plane of characters, like a paint program, rather than a sequence of varying-length lines - if I click on column 50 after the end of a 30-character-long line, the cursor sticks there and I can start typing - I don't have to type spaces or tabs to get to column 50; and (2) seamless block cut and paste - even when the block goes beyond the end-of-line.
I have tried many editors, commercial and not, including Emacs with various macros, in an attempt to emulate these simple features, and although some come close, there's always some problem where they just don't quite hack it, because their underlying model of how lines are treated is just too deeply embedded in the fundamental design. I just can't deal with anything that's almost, but not quite there; a text editor exactly like I want is crucial to my existence since it's where I spend 90% of my time. As far as I know, this product has 0 bugs; at least I have not found one in many years of use.
On the other hand, I dislike the company that owns it. The product is annoyingly expensive ($159) and despite the price, they haven't updated it in years - for example, there is no scroll wheel support. I don't even know if the company is actively doing anything except acting as a shell to sell this product. They have 0 interest in porting it to Linux or anything else; I have asked and even offered to help them port it.
Sadly, for me this is the one final piece that I need to go full time to a Linux desktop. Over the years I have tried to get it run under Wine; it "almost works" but eventually craps out. (I haven't tried in a couple of years; time to do that again.)
People will probably respond with a list of editors claimed implement the GUI features I mentioned. This happened the last time (a few years ago) I posted about this; I tried them all and they all came up short for one reason or another. But list them again, and I'll try them again!
I used to be the VM/ESA systems programmer (king geek) for a state university (I'm still at that university, it's been over 21 years).
REXX was the first serious scripting language that IBM delivered for VM (EXEC was awful and EXEC2 not much better). Our systems development (applications) staff wrote quite a number of in-house REXX applications interfaced to DMS/CMS (this was before ISPF was very usable under VM). Most of these were working with CUFS (later Advantage). I used REXX extensively to match-merge two files, generate reports, and reformat data. I also rewrote some programs in REXX that had originally been implemented in SNOBAT (a snobol4 dialect for System/370).
Roll forward a few years. All the sudden, I'm responsible for Unix servers as well as VM. Although I installed regina on our Unix servers, I figured out pretty quickly that perl was the preferred script language for Unix (I first installed 4.0.36). I saw that there were a lot of facilities and working scripts in perl that I'd have to build for myself in REXX, so I made a point to learn perl. I still used REXX for things that interacted with our VM/ESA and z/OS & TSO/ISPF environment.
Roll forward a few more years. IBM drops HESC, and VM becomes prohibitively expensive to keep. Meanwhile, our academia is moving to Unix and PC-based teaching, and a Unix-based ERP is on the horizon. We decided to eliminate VM. I spent quite a few hours writing perl scripts to parse DMS/CMS panel sources and REXX programs, to build ISPF panels and generate ISPF-friendly REXX from the DMS/CMS REXX code (fortunately most of the code was cookie-cutter so it was easy to do a find/replace). I knew these programs would be eliminated when the ERP was in place.
Now I'm so neck-deep in Oracle (database, application server, and other toys) and SCT Banner that I maybe spend 10 minutes a day on our z/OS system, and haven't written a new program there (in any language, much less REXX) in six months. I still maintain or help debug a REXX program now-and-then.
REXX was a success, but for us VM died. I still like REXX, but perl has pretty-well replaced it for me. The last time I wrote a REXX program I caught myself writing perl-isms into it that I had to fix.
Doug
What I remember about REXX is that it was one of the few languages (along with Model 204 User Language) that made programming IBM mainframes FUN. Of course, nowadays IBM mainframes can be tweaked to run Linux and that opens up a whole slew of scripted languages to choose from.
-- SKYKING, SKYKING, DO NOT ANSWER.
I'd rather there be little to no exposure of variables. Remember programming is about what you do TO the data. The nature of the data itself is important so far as what you can' and can't do with it.
REXX's history isn't even really mentioned.
First of all, REXX is hardly the first popular scripting language, there were lots of them before it. REXX was designed as an alternative to EXEC2 which was a replacement for EXEC and that's just on IBM's VM mainframe systems. Listing other scripting systems prior to REXX is left as an exercise for the reader.
As for history, REXX wasn't developed as an official IBM project. It was developed as an internal tools project by Mike Cowlishaw at IBM's research lab in Hursley, England (the VENTA lab) because EXEC2 basically sucked. It was distributed on IBM's internal tools system (VMTOOLS and IBMVM) and became hugely popular inside IBM.
It was made available as an unsupported tool through the IBM VM user group and became so popular that despite IBM managment wanting EXEC2 to be the "official" scripting language, nobody in their right minds used EXEC2 and REXX became almost universal. Pressure from their commercial VM/CMS and VM/XA users forced IBM to make REXX a supported product.
In the mid 1980s, a PC version became available internally on the IBMPC and PCTOOLS systems and quite a few internal tools were written in REXX but despite internal popularity, IBM didn't release the PC version of REXX until much later when a vastly expanded (some would say bloated) version was released as a fairly expensive commercial product.
As a side note, REXX was released as a scripting language for PCs with later versions of OS/2 but by that time OS/2 was insignificant in the PC industry.
One unrelated note, Cowlishaw is also famous as the keeper of the IBM Jargon Dictionary - a tongue firmly in cheek listing of IBMisms.
Here's a failure:
Logic operators:
& == and
| == or
&& == xor
How the hell did they get && for XOR, I wrote testing scripts in Rexx and this was one of the most hidden bugs that could be introduced.
I mean cmon some forms of logic had used & for and for a long time, just find a different character for XOR.
blakespot
-- Heisenberg may have slept here.
iPod Hacks.com
... are we going to pretend that rexx isn't dead?
I mean, perhaps this romantic nostalgia should just be gotten over with at some point.
There are better alternatives around these days, with significant developer communities.
Save your wrists today - switch to Dvorak
have made Rexx open source: get yourself some of that here
Is REXX really that popular out there? The article seems to think REXX is one of the most popular languages, but other than me I can't name a single other programmer I've known who writes/has written REXX applications. Maybe this is only a European seed for now (in the article).
Yes I can name a single other programmer who has written REXX apps, my dad when he worked at IBM about 20 years ago
Tell me about O'Reilly on the Virtues of Rexx. Is it good or is it whack?
pasxkbb
indeed. you fail it!
The most obvious drawback in REXX is that the standard I/O calls don't work on the mainframe (where you have to use EXECIO calls), so it's not very portable. Really, REXX's biggest benefit is its tight integration with TSO (the mainframe command interpreter) and ISPF (the screen interface and editor). When REXX is by itself on other platforms, these benefits disappear. I use REXX on MVS (now called z/OS), but it just pales in comparison to Perl or Python for other environments.
Keep in mind REXX predates the adoption of C-ish syntax (C, C++, Java, Perl, Python, PHP, etc), so it's not as easy to switch gears mentally as it would be among the C-ish family. As you'd expect, the syntax has its quirks, especially if you don't use it much. None of the standard library functions has names like C's, unlike Perl and PHP. Truth be told, REXX looks a whole lot like structured BASIC.
REXX is quirky. You can use stems as associative arrays, but there is no mechanism to iterate over them. (I'm not joking.) No regular expressions built into the language like Perl has. No built-in systems programming interfaces (you have to ADDRESS the operating system to run commands, like bash, etc. - more of a flow control language like bash than an environment like Perl) While there are modern extensions like OO for REXX, they're not standard in all REXX interpreters, and are as clumsy as adding OO to BASIC, Fortran, COBOL, and other pre-C languages.
WROX has a REXX book, the only new one in ages and ages. Unfortunately, it concentrates on non-mainframe platforms where there frankly isn't as much to talk about because you don't have the tight integration with the OS.
If anyone's interested in REXX for Windows, please visit http://www.quercus-sys.com/. There appear to be various *nix implementations available, but I have no experience with these.
I spent about three years writing REXX apps and interfaces after a new IBM mainframe was installed at a heavily VAX-bigotted research facility for a large household name type company.
I felt that REXX made me extremely productive in comparison with my peers. Upon leaving that position I counted over 32,000 lines of code, most of it in daily use and believed to be error-free by the users and me.
Fast forward 20 years - I'm retired and do <flamebait>
MS Access/VBA design/development
</flamebait>
for fun and profit. Over the years I've coded in C, PHP, JavaScript, and assorted other languages. None of them have the ease of use of REXX, IMHO.
One nice thing about REXX is its "outside environment" concept. This basically anables it to be added to about anything which accepts commands. For example, EMX's gdb port for OS/2 added REXX support. This way, you could actually write "debug scripts". See an example in this usenet posting.
The Tao of math: The numbers you can count are not the real numbers.
Needless to say, the Rexx team offered no support whatsoever. I made the employee uninstall Rexx from the machines and lets just say he's not with us anymore, because we had him killed.
:-P
Aaah... so *that's* what happens when programmers on those Russian-based DDOS attack blackmail schemes mess up. (^_^)
Seriously, funny twist on an otherwise cut-and-pasted troll article... you still deserve to stay at -1 though
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
REXX is by far the best for templating strings. I used it a lot to prototype stuff on the mainframe before writing the, well, you know...
It was also great for writing quick mf applications (code generators, code behind ispf panels, etc.). And, like so many other posts already said, it's somewhat portable to other platforms but without compilation. Very cool indeed.
GOBACK.
Uh, in the post above, please read 'string' as 'text'.
GOBACK.
OS/2 2.0 and up had facilities to automatically install an operating system using a boot ROM on the LAN card, and a boot server with a REXX script. When I did testing of hardware, that was the technique I used to speed OS installation. Although I only used it with OS/2, I think it could have worked with other OS's, too.
Best regards.
One of the reasons I like Perl, especially for prototypes, is automatic variable memory management. The interpreter automatically instantiates/allocates variables whenever you first use them, then deallocates them when they go out of scope (which is global unless otherwise directed), or when directed to "undefine" them. Memory leaks, double frees, "should I free this copy now that I'm done, or does something else use it?", duplicate pointers... none of that hell gets in the way of the algorithm, unless you want it to :P.
--
make install -not war
REXX seems historically interesting but little in the article makes it clear why one ought to care about it today.
The first example is telling - munge a file and do something depending on the content of each line. This has been such a common problem for so many years that the number of very capable solutions exceeds the number of lines in the file it is often applied to. The usual suspects of unix command line utilities (easily available or shipping with many platforms in common use) handle 80% of this stuff with a command or two. For the rest, the entire battery of sed, awk, shell, perl, python, ruby, etc is available and easily applicable. For most basic file and text processing problems, you can just google for a solution and you'd probably have to constrain your search to your favourite tool or language in order not to be overwhelmed by the multitude of solutions.
The fact is, basic text processing and data sctructures beyond a simple integer indexed array (imagine that, a hash table keyed with strings!) are so deeply ingrained in most popular 'glue' languages that demonstrations of a particular tool's proficiency at such things seems quaint.
A less dated way to put a scripting language through its paces might be something like logging into a website, tracking the cookied session, navigating to some location without a stable URL (say, dependent on form posts) and parsing out some piece of data from the resulting page. Simple things in a few lines of perl or python. What about REXX?
-pvg
I did GUI test automation, for Atrial defibrilator control software, in Rexx. Rexx was very cool at the time but was hard to extend. I would never go back to it now. It is primitive compared to modern scripting languages, like Python. I would say that the only way it would become popular is if OS/2 made a startling come back. There is about as much chance of that as Microsoft going out of business next month.
Sorry my bullshit sensor overloaded.
who read it as "O'Reilly on the Virtus of Sex"?
The AACS key is NOT 0xF606EEFD628B1CA427BEA93A9CA9773F
In Ruby, variables are case sensitive, and with good reason, iirc, they are (recommended to be)named like this:
O NSTANT_HAS_A_NAME_LIKE_THIS
myClassNameInCamelCase
my_local_variable
MY_C
i cant remember what variables local to classes are though.
Its very useful as if you are reffering to A_STRING you know its a constand, etc.
i cant speak for rexx because ive never bothered to learn it.
This is a funny folks. If I had any mod points I'd do it.
Too lazy to create a sig...
Not arguing one way or the other, but that has nothing to do with case sensitivity. It's common convention, in both case sensitive and insensitive languages for constants to be UPPERCASE, and for variables to be camelCase or under_scored. Whether the language is case sensitive or not has nothing to do with the matter.
NZ Electronics Enthusiasts: Check out my Trade Me Listings
Gah. That sounds like "Build a house using sausage and slide rules with a Quantel PaintBox!"
I forget what 8 was for.
I first used ARexx which was Amigas port(?) or possibly a rename(?)
It was awesome for programming games used in BBS systems or for even writing a BBS.
I loved it.
Karma means nothing to me, so suck it...
Yes, but you should generally avoid having a variable A_STRING, and another one named a_string
Raises hand here, if only to lament that Rexx, at least in the form of the linux regina clone, is a poor, no, poor to the point of starving to death, comparison to ARexx, written BY William Hawes for the amiga.
It was extensible by writing libraries for it, libraries that allowed it to do anything you were of a mind to.
When I was still running a big box amiga, Jim Hines and I (we were both working at a tv station, http://www.wdtv.com/> ) and needed a cron to run some of the very time consuming rendering jobs that lots of video people were running on amiga's a decade back.
So we wrote a cron in ARexx, and by carefull coding, its cpu hit was less than we could measure. Most of the wannabe cron apps for the amiga were coded to wait in busy loops till the clock matched, and of course used 20% or more of the cpu.
Eventually I bought a copy of rexx-plus, the only actual compiler for arexx there ever was, which could build standalone programs out of your arexx scripts.
You can yet, I think, download that to run on your old amiga, from Aminet.net, search for EzCron, latest version. IIRC the archive contains both the arexx script itself, and the compiled binary.
We did things in a couple of days using arexx that would have taken weeks in C. Repeatedly.
There is yet today, a headless old 2000/040 amiga there, running EzCron, and its executing additional arexx scripts to grab the prompter files for our newscasts from the news server in the news dept., and make them available for you to read at the above site. Incomplete sometimes because the news folks get lazy and don't transcribe to the prompter, whats said in a taped segment.
But when we looked at making those arexx scripts run on linux, regina upchucked all over the place because they were doing things that Rexx never had in its repertory. If that miggy ever dies for good, we'll have to rewrite them in bash, and that will take a couple of weeks to translate I expect. Bash I believe does have all the tools to do it. But its going to take a concerted effort we haven't found the time to do yet. Normal life keeps happening...
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
... REXX is yet another interpretive scripting language, one that is exceedingly clear and non-cryptic -- one can return to a REXX script you wrote a decade ago and understand it (try that with perl!).
And REXX has a much easier learning curve than something like perl, even easier (IMHO) than plain vanilla unix hell scripting. If you're in a large group or a group with a high turnover, you could do a lot worse than selecting REXX as a scripting standard.
For specifics as to why you might choose REXX over another scripting language in your toolkit, it has tremendous parsing capabilities (you can specify a template when you read text from the input stream, and have REXX bust up the incoming text to fit the template, adjusting case if desired) as well as very nice ways of dealing with arrays ("stems" in REXX parlance).
One of the niceties of using REXX in the mainframe world was that you could specify the environment a command string would be interpreted in. Not quite AppleScript, where you can direct scriptable apps to do your bidding, but the next best thing.
This allows you to co-opt other portions of your system to do the work for you, and not reinvent the wheel at every turn. Think of this as the "script as conductor" philosophy of scripting.
But REXX is also capable of functioning as a standalone programming environment. In the mainframe realm, I've done socket programming, dynamic sql, screen painting and more file conversions than I want to think about using REXX. I do code using a fair assortment of compiled languages, but when it's crunch time, nothing beats a good interpretive scripting facility to deliver the goods in a timely manner.
Sadly, aside from the unix/dos command shell, I don't believe many other environments are generally supported under non-mainframe REXX (I don't believe I've ever seen REXX operating as an EMACS macro, for example), but given the flexibility of the unix shell environment, that is generally sufficient.
It's still used in IBM mainframes, and is the scripting language of choice in OS/2 (which is _still_ in heavy use, though not at home).
:
For those of you NOT clued in, Rexx also comes as ObjectRexx, which, as you might guess is fully object oriented.
IBM has completely open-sourced it, and there is also a second open-source implementation (Regina Rexx).
Check out what's been going on at
http://www.rexxla.org/>
For 90% of what people use a scripting language for, Rexx beats the pants of Perl. it's easy to use and it's _readable_.
On many platforms, you can construct full GUI apps with it too, from paint programs, to GUI unzippers, etc.
Oh, it's nice enough! My preferred scripting language along with Python. I've easily written stuff like converters from BSDL (boundary scan description language) to XML, even a simulation of 3-d nuclear spin diffusion in sparsely abundant cubic lattice.
Seriously, I was concerned for a moment there. I read the article title and thought, "What does Fox News' Bill O'Reilly know about anything practical?"
I almost forgot. The main reason it was handier than sliced bread on the amiga is that NO other language on any other platform had the concept of an ARexx "port" for direct communication from one process to another.
I don't think it was anything but a name to address translator where the buffer named had to be read before another write to it was performed else the system went up in copious clouds of profanity. But if you paid attention to your housekeeping it was at least as stable as writing to a disk file, and a heck of a lot faster.
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
In an earlier case, I once worked in a facility with honest-to-God 132-column green-bar line printers, and one of them, for higher speed, was upper-case only. Luckily our in-house proprietary languages were all case-insensitive.
Frankly I always figured that case-sensitivity was primarily a product of system programmers who didn't feel like writing upper filters, and later made it seem like a virtue. In the same vein, clearly nobody at Bell Labs could type very well.
This next song is very sad. Please clap along. -- Robin Zander
sadly, in the last 2 years OS/2 use in ATM and POS systems went from over 80% to under 30% as a version of Windows replaces it. The mainframe market from IBM continues to grow at over 20% per year, but of course that's not many machines (just a heck of alot of users)
You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.
ye, that's good stuff at all! I remember looking for a bug in a F77 program for one hour and a half, just because variable don't have to be declare and someone (understand : me), name a variable difffpres, instead of diffpres.
To not declare variable is _bullshit_ (like in PHP)
I used to program on a VM/CMS machine, and we used REXX. The first line in every file had to be a comment. My usual comment was: /* IBM REXX LIVES! */
which changed meaning depending on how you pronounced the third word...
Baz
Aparrently REXX will call an OS command if it doen't recognise a keyword. So just plain including grep and uniq and so forth as if they were functions is allowed. How quaint! Just think of the hacks, if you misspell pront or writte or opne or some random thing, you could be running any random black-hat code and perhaps never even knowing.
Sorry, nostalgic folks. The state of the art has moved on, and not accidentally.
I think this is the main point: IPC.
You open ports to other apps, remotely controlling them, swapping from one environment to another with the ADDRESS keyword.
That is one thing that LUA do too, for those who don't know REXX. (you can embed a REXX ports in any app, giving validation of messages, parsing, one-liner or entire scripts, say, the same functions as those from menus).
REXX isn't another Shell, it is more an inter app postal service.
Not in ruby. Because this is a dynamic typed language you do not declare variable. So to specify to the interpreter that a variable is a const, you have to name it with uppercases. But you are right for java, c, c++, ...
The BitNET RELAY server for VM/CMS was written in REXX.
Damn, I feel old.
If the slashdot submitter had just bothered to google for "rexx", then that would've answered all of his problems.
RTFG.
"Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
For someone who HATES programming, and I really do, I started playing around with it when it came as the scripting language in a TELNET program I used years back called ZOC before I used Linux and was stuck on Windows.
I also was heavily into online MUD realms, and ran a Worldgroup/Galacticomm BBS with MajorMUD - a very expensive addon MUD realm. Well I came up with the idea to create an online database that combined all the data from all the realms and put it together in a nice ranked website of all the top players and worlds. The entire engine was coded in REXX and I called the site MUDSentry, its been recently recoded in PHP and renamed to TurboSentry, but keep in mind, I programmed it in 2002 and Im not a fan of learning curves.
One thing, IMHO, for someone who HATES programming, learning this language was EASY. And since it was included in the TELNET client I was using, well that was the motivation behind the site and using the language.
Would I ever do that again? Never.
Uh. You mean sh.
It saved by butt in the 90's to monitor and reboot e-mail routers the got hung up.
We had rows of 486 servers running a very early version of Windows NT as enterprise mail routers. Unfortunately, they'd hang-up, then so would the e-mail in some regions. Our initial solution was to keep a person monitoring the mail routers every five minutes and sign off on a quality assurance clipboard that everything was running.
This is not the kind of work that makes you want to get up and go to work every day. (It eliminated my at-work modem-surfing time.) A Lotus tech told me you could use REXX on OS/2 Warp to periodically test the state of the router software and if the session didn't respond back, reboot the individual instance of the router that failed on an OS/2 box. After a couple of weeks of frustrated swearing I got it working beautifully, eliminating several machines and the near full time job of walking down the rows checking machine hang-up states. The downside is I had to spend at least a couple of weeks studying/experimenting with REXX and this wierd Windows-like thing called OS/2 on my own, because no one could help me with it. OS/2 was the first OS I used that come with everything in one box (wordprocessor, spreadsheet, dialer, browser, etc.)
It was good preparation for becoming a Linux geek!
and CLISTs in TSO. I had the same experience. REXX under VM/CMS came first, of course, and that was quite a pleasure from switch from EXEC/2. on TSO it became available at some later point, but I was able to create some fairly complex apps before dropping into Ultrix and Sun/OS word and never going back.
As I remember REXX was fairly concise and compact and easy to deal with (kind of reminds me PASCAL), certainly neater and better organized than PERL (but what is NOT better organized than PERL anyway?). Yet since there are some many choices in Un*x world (many scripts, and then PERL and PYTHON), I doubt REXX would ever achieve that level of acceptance it did in mainframe world.
IBM's Mainframes (even the new ones), and SNA network mgmt. tools still use REXX as there primary language for scripts and batch jobs.
Even the newest versions of the stuff released last year.
Problem with MS is that it takes them 3 decades to rip off other companies.
I prefer the "u" in honour as it seems to be missing these days.
When I think of ARexx I keep going back to the time I had to bang out several lines of code to reinvent an xor fuction, because the builtin seemed absolutely broken.
ARexx definitely had its moments, it also seemed very sloppy in implementation though.
Someone set us up the bomb, so shine we are!
Back in 1989 , I wrote an entire Email application for inhouse email on IBM VM mainframes using REXX (with Assembler/370 for display, and RSCS for moving the mail to different users mailboxes ). The email system was one the most widely used inhouse application in the company
I probably used every single feature REXX provided.
Good language and easy to debug
No, REXX is shit. It sucks, it bites, it blows syphilitic goats through coffee stir-sticks. I'd compare it to the aborted offspring of third-generation addiction research monkeys if the Crackmonkey Defense League wouldn't picket me for it.
Why, I hear you ask, am I so violently opposed to this allegedly powerful "scripting" "language"? It's because I once had to use it.
I wrote a test harness with it. You know, one of those things that scripting languages are supposed to be good for? You'd think REXX would make such a task easy, wouldn't you? You'd be wrong.
How do I hate REXX? Let me count the ways:
You know? Procedures, aka functions aka subroutines? Those handy little things that let you subdivide your complex tasks into lots of simple ones? Ain't gottem'.
What it has is a kind of GOSUB-with-arguments that it pretends are real procedures and look enough like them that they fooled me until it was too late.
See, when you find a procedure definition in a reasonable scripting language, it's a no-op, right? It's either an expression that creates the procedure then and there or it's a thing that the interpreter finds in the source code before it starts running the program. Either way, when running through the code, the interpreter just sort of does nothing immediate when it finds a procedure definition.
So all we scripting hacks need to remember to do is to define our procedures before we use them, right?
Well, in REXX, they're labels. As soon as the thread of execution reaches a fake procedure, it wanders right in, up until it hits the RETURN statement, at which point it's an error if you're lucky or a return from some unexpected function if you're not.
And kazam! Good programming habits go unpunished.
And let's not think about the sort of spaghetti code this, uh, feature can lead to. No, really, let's not.
Since the pretend procedures are just labels, there has to be some way to monkey around with the scope to get something like local variables, right? There is. And it's vile.
There's a command (whose name I've mercifully forgotten) which creates a new global scope. You call it in your pretend-procedure and ta-da, everything's local now. Hooray, unless you want to actually access a real global variable. But they thought of that--the command lets you list the variables from the previous scope that you want to access and they get stuck into the new scope.
So far, so good, right?
The problem is that these scopes nest. So if fake-procedure FOO needs to write to global variable BLAT and declares it in its scope-creation thingy, this works fine if you call FOO from the mainline.
But what if function BAR calls FOO? Well then, the BLAT that FOO writes to will belong to BAR's scope unless BAR also declares BLAT to belong to the previous scope. And if QUUX calls BAR, the same thing happens.
So if you want to modify a global variable from a function you have to make sure that every function that can conceivably be part of its call chain cooperates. And if you mess up and don't find all of those cases, there's no warning or error message.
Y'know, there are other problems with REXX but they're not as bad. At least, I could have worked around them if I'd had a decent procedure system. A lot of language brokenness is tolerable if you only ever need to solve it once. REXX doesn't give me even that capability.
To be balanced, I should say some nice things about it:
There we go. That's nice, isn't it?
apt-get install regina3 regina3-dev
./configure --with-rexx=regina --with-rexxincdir=/usr/include/regina
./the
tar -xzf THE-3.2B1.tar.gz
cd THE-3.2
make the
works as a curses application but I have no clue as to how to use it. But, it compiles pretty easy and seems to run.
LoB
"Anyone who stands out in the middle of a road looks like roadkill to me." --Linus
"If that miggy ever dies for good, we'll have to rewrite them in bash, and that will take a couple of weeks to translate I expect."
Nah. Just run an Amiga emulation box and keep going:
http://www.amigaforever.com/
@variable for an instance local variable.
@@variable for an object local (static) variable.
IBM open sourced Rexx. It's available here: oorexx.org.
That's why God put the % symbol in the shift-5 key...
It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
I've worked in the computer programming trade since 1965 when I learned COBOL '65 in the Air Force. This year, in semi-retirement, in an equally demanding role, I taught three classes of Java Programming in a local high school. I enjoy Java but I must admit a love for REXX.
I presented a paper on REXX at a REXX conference at Stanford University, May 1990. The topic of the paper was on the ease of portability between platforms. Subsequently to that, I working as a programmer at Bank of America's campus in Concord, CA, I trained all programmers there who wanted to stay late in how to program in REXX on MVS, VM, OS/2, DOS, and Windows platforms, the main differences being how I/O was handled.
The course I taught at BofA was about three hours long, an hour and 1/2 for two late afternoon sessions. So the learning curve was quite low.
In addition to teaching everything they needed to know, I also showed them how to code dynamic SQL statements in REXX code. I had already used REXX in a good bit of the code used for utilities and one-time jobs for the Cash Vault System that I was working on there.
There are few languages that one can learn completely in 3 hours. The Java classes (one AP and two general) took an entire high school year and I only scratched the surface even though I covered all 19 chapters of Cay Horstmann's "Java Essentials".
Those that turn their noses up at REXX I have found to be the same sort of people who think writing code is an IQ test and if they don't write code that no one else can maintain that they have somehow failed. I don't think programming has to be difficult and the best languages are those that are easy to learn and easy to program in while being able to get the job done and run efficiently. For quick and dirty code or seldom run utilities in production, REXX is an ideal language to use. Of course, for a program that is processing 10+ million records sequentially or updating a DB2 database for millions of transactions for real time access you want to use a compilable language.
I always though Rexx was a programming language and now I hear it called scripting? Which is it? And for what it's worth, what's the difference between either?
I recall that for that to work, one must first format the number into a binary 10011001 style format, and that worked correctly.
Later versions tightened up the perceived sloppiness a bit. By later, I'm refering to actually buying after commodedoor soured the relationship with Bill. Being 'on the scene' as a power user at the time, commie shoved it to Bill big time. According to the rumors then, Bill never actually saw a check from commie for all that...
Strange, I see he has a directory on kernel.org, but its empty & dated many years ago now.
Does anyone know what has become of William R. Hawes?
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
it doesn't match human readable languages or other human experience
Not true! Case is important in many systems for writing natural languages. In English prose, case provides information for every letter except the first in a sentence.
More importantly, specialized written notations tend to make case significant. Physics books don't arbitrarily switch back and forth between e and E to represent an electron, and no one writes CL to indicate chlorine. or hCl for hydrochloric acid. You'll fail math if you expect a to be the same as A.
Examples abound: case is almost always significant.
Case insensitivity makes reading code more cognitively challenging by forcing developers to mentally map a large set of possible names to a single entity. It's much easier if you know that each symbol has a unique name. Consider the task of scanning up from the line you're writing to find the previous call to a function named Buf_Check. In a case-sensitive language, you're looking for a single name with a unique shape and appearance. In a case-insensitive language, you're looking for any one of many representatives of a class of names that have many different shapes and appearances.
That's a high price to pay just to avoid correcting typos.
When they switched over to Windows on the desktop, one of the hard parts was moving the apps to VB. They ended up taking twice as long to port as they took to write and about four times the size.
Thanks for the trip down memory lane :-)
I did a lot of coding in Rexx both in OS/2 and on Windows NT. I even did some CGI scripts in Rexx, and liked the language quite a bit. The reality is, however, that Perl has a far deeper penetration and if you're working on systems that others are going to have to maintain, using small players like Rexx isn't going to be too popular.
The world's burning. Moped Jesus spotted on I50. Details at 11.
He's not fired. He's dead.
I still use VXREXX and REXX daily. I've done a website backend and an interactive site in REXX...all run on a LDGW (Lotus Domino Go Web) Server running with DB/2 as well. I like using OS/2 to this day, and really don't feel compelled to move to anything else. It's what works for me and does what I need. Saw a previous poster list ZOC (Zap-O-Comm) as one of his old apps, well, that's on here too. For that occassional app I may need that doesn't run in OS/2, I can fire up Virtual PC and run that linux app or windows app. I see all you posters saying both OS/2 and REXX are dead, but it'll only die when noone uses it anymore, and not any sooner than that. I find it amusing folks say OSes are dead- esp because they know noone who uses them,or they aren't popular. But to each their own. REXX will contine to live on here.
The company I work for uses a configuration control system written in Rexx. It is a GUI application that enables a user to manage configuration control of items stored in CVS, RCS or MS Visual SourceSafe.
Versions of applications can be compared, even across different source code control systems.
It interfaces to an extract our change control system data stored in MySQL.
On Windows it allows version numbers to be inserted into Word documents when they are released.
The application runs on Windows, X11 and OS/2.
Being as insecure as *sh is hardly a selling point! Shell scripts are either traditional and tested, small and heavily debugged, or never put into a position where they can be used for privilege elevation. Nobody sane writes serious user-facing apps in shell. People who put .sh files in their cgi-bin directory deserve to be hacked.
Compare serious scripting languages. Perl supports taint mode, Ruby has $SAFE. They all force you to be explicit when you want to call a an OS command, even if only via backticks.
REXX is worse than all of the above because it pretends to be a serious script language, then stabs you in the back with automatic handoff to OS commands.
Honestly, if your knowlege of a programming language is older then 12 month you should not write a comment any more since programming language evolve rather fast.
And the current version Rexx:
does have procedures.
does have local variables.
is object orientated.
Martin
Actualy REXX does not call a OS command - Rexx established a two way communication with the parent process and passes the command on. So it's not an OS command but a command to the shell used.
This is interesting if the Rexx interpreter is embedded inside an editor instead of an command line shell. In which case all un-recognised commands become editor instructions instead of shell commands.
Martin
REXX has good cross-platform support. That is, one can write a rexx script, and use it anywhere. It is also relatively tiny: the whole processor + script is tiny enough to fit on a floppy disk.
None the same, it makes no system-derived registry or config.sys changes, so it's handy to run in a repair environment.
With a couple of DLL files, one can do interesting and useful things to the OS/2 or Windows shell. I have a script that processes the OS/2 shell (replace long names with shorter ones), and a script that does Windows shells.
Rexx scripts can be used as a target for the OS/2 "extproc" process, a process supported by Windows. Unix has the "/#" convention or something.
This allows one to write rexx scripts as command processors, and write the input as batch files. REXX has some wonderful string handling, and makes then an ideal command processor language. Herein lies its power.
You can write some interesting command languages, starting from the relatively straight forward "simple list" to a more complex language supporting subroutines etc.
The simplest one has only one command, eg $$x. The idea here is that you insert lines into an RTF document, and then have rexx processs this as a batch. All lines are fed through to output, except for the $$x lines, which contain commands to calculate certian lines etc.
A program like this was simple enough to use and write, and useful enough for handling form-letters.
One can then do things like change the default action (handy, for example for stripping external comment), etc. So a nicely documented input file complete with debug elements becomes a single output text ready to run.
And yet it is ultimately the capacity to handle strings much easier, to deal with binary data, and to deal with big numbers, that makes REXX intensly powerful.
OS/2 - because choice is a terrible thing to waste.
We used to have substantial sysstems at Hampshire County Council which were REXX based. Users in the low thousands, spread all over the county.
When we couldn't parse user input we used to print to the screen a simple error message readin "ERROR: Cannot parse input; you have entered ''
Now, I sometimes used to parse user input into a variable called 'shit' because I was 23 and it amused me. Then one day I wrote a bug which missed out the read from console step, so the variable was never set. Now, REXX returns the upper case variable name if you reference an unset variable. So what did the user see? Yep, with the last word in upper case, just when it was coming to mean shouting, they got:
ERROR: Cannot parse input; you have entered SHIT
Didn't amuse me any longer, I can tell you.
Justin.
You're only jealous cos the little penguins are talking to me.
Stupid people can write rubbish code in any language.
The more caffeine-influenced among them tend to complain about the system they used rather than face the fact that they are bad at programming.
Among those poor programmers are a subset that so lack verbal skills that they resort to the kind of gibbering vulgarity of the poster, who obviously has experience of fellating syphillitc goats if he can make the comparison. I suggest he find one of those goats and stick his head up its rectum.
The value of REXX was as an alternative to EXEC2 which was all that was available in CMS prior to REXX. I'm not sure all this talk about functions and scope is terrifically important in a scripting language but to each his own. There was also a marvelous add-on for REXX, PIPES, with lots of superb prebuilt functions ... after all, CMS under VM was a mainframe system, not *NIX with lots of little programs lying around nor the inherent ability to pipe. I guess I'm just old and able to put things into perspective.
Nothing clever
First of all, bash is not so much a general purpose programming language as it is an interactive shell program with scripting capabilities.
Also, at the time he was talking about (perl 4), bash would probably not have existed (or at least not been common). csh or sh would have been more prevalent.
My other first post is car post.
REXX runs on the AS/400 (IBM's midrange server line); I believe it was originally intended to replace CL, the (command and) control language for As/400. However, the users objected to that as CL is a great language for utilities and such, so IBM added REXX and didn't take away CL. If you want an interactive interpreter you have to do a PRPQ to request one from IBM (or write your own) but OS/400 will happily run your REXX script even without one.
Also, Mike Cowlishaw wrote NetREXX which is REXX running on the Java VM. It was featured in an IBM DeveloperWorks series on dynamic languages for the Java platform quite recently.
But the best one is I think is this. On IBM's VM operating system there is an editor called kedit. It had all kinds of really usefull hooks that you could write scripts for to write macros etc. While we liked kedit, it was line oriented and several of us missed editing commands from other editors, like those on the VAX (delete word, end of line, cut and paste, etc). So we emulated the VAX EDT editor in REXX and assigned keys to the keypad. Was truly a life saver.
If IBM had been smarter about REXX, I am not convinced we would have python and perl today. That said, I do like Python a lot.
...I'd encounter another ex-HANTSNET coder.
I heard on the grapevine recently that HCC retired their last mainframe a couple of years ago, sadly.
Back in the 80s and 90s HCC had an entire intranet coded in Rexx, back before anyone had ever thought of the word "intranet".
We used to use REXX all the time in an OS/2 Client Server environmet. One of the first programs I wrote was usiing IBM's Comm mgr to do Ehllapi. I loved Rexx.