|
Home | Switchboard | Unix Administration | Red Hat | TCP/IP Networks | Neoliberalism | Toxic Managers |
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and bastardization of classic Unix |
|
Rexx is a scripting language that was invented at IBM years ago by Mike Cowlishaw. Firs description was publishe in IBM Systems Journal in 1984. That means that REXX older then Perl (end of 1987), but younger then AWK (1977).
|
What distinguishes Rexx is that it blends use of macrolanguage (and it is used in Xedit and its derivatives) with the use of OS shell. In the latter role Rexx was bundled with the Amiga OS and OS/2. Many thousands of developers and end users learned the language through these desktops of yesteryear and still remember it fondly today. Rexx has a proven track record as the driving language for major desktop systems.
Rexx's power has enabled it to be the dominant scripting language on mainframes for two decades. To this day no other scripting language challenges it on any mainframe operating system.
Languages like Perl have a unique appeal due to ease of learning, ease of use, and user-friendliness for the desktop user or casual script writer.
Perl is way too complex even for professionals and everybody is just using small subset of it.
Python is easier to learn but suffer from way too much OO junk. New users and occasional programmers don't think in object-oriented terms. One must be taught to think this way. My friend, a high school computer science teacher, tells me that new users state their programming problem and then ponder the steps to resolve it. They don't identify the objects of a problem space and then consider the methods they need. At the end of the semester, a few advanced students love object-oriented programming and are off and coding Java. The vast majority would have been better served by having learned to script procedural solutions for common programming problems.
I have great respect for the enthusiastic Python developers who tell me that anyone can program in the language, and that ease of use is one of Python's big advantages. But I believe they are wrong in thinking that even casual users must love (or be made to love) the OO paradigm.
TCL/Tk is another great language, and one that is easy to learn and use. But Tcl/Tk doesn't offer Rexx's wide-ranging ties to other systems, from handhelds to mainframes. Tcl niche became networking. Tk was ported and now use with all major scripting language in existence so it is no longer TCL-world phenomenon.
"Classic" Rexx is a simple procedural language.
|
Switchboard | ||||
Latest | |||||
Past week | |||||
Past month |
- Rexx examples
- During the last couple of years I created some useful - and some less-than-useful - tools and other programs that I will share here.
Start any of these commands without parameters or with /? as the only parameter to get a help screen.
Most of my Rexx scripts use RexxUtil (native in OS/2, Windows version can be downloaded from Patrick McPhee's site), and many Windows Rexx scripts use W32Funcs as well (also available at Patrick McPhee's site).- Rexx tools for OS/2 LAN Server administrators
- These scripts are intended -- surprise -- for OS/2, OS/2 LAN Server, OS/2 Warp Server and eCS (OS/2 Warp 4.5*) only.
Unlike most of the other scripts, they cannot be ported to Windows easily because they depend heavily on IBM's LSRexxUtil library.- Rexx tools and other scripts for Windows NT and Citrix WinFrame administrators
- Most of the Rexx scripts on this page were created during my years as OS/2 LAN Server/Windows NT 4 Terminal Server Edition administrator at a small Dutch bank.
I added other scripts, some in other scripting languages, that I guessed might be useful for Windows administrators.
With the current version of RegUtil (Patrick McPhee's Windows port of RexxUtil) many scripts that were originally written for OS/2 may now require little or no modification at all to run on Windows systems.- Rexx books
- Several titles on Rexx.
- Rexx bookmarks
- Find more Rexx related information by following these links.
by Howard Fosdick (May 28, 2005)
Foreword: This article by Howard Fosdick, author of the Rexx: Programmer's Reference, tells you everything you need to know to get started using Rexx on your Linux desktop. Linux features powerful scripting languages like Bash and Perl, but these may not be suitable for end user scripting. Rexx, on the other hand, has proven ideal for desktop Linux users, according to Fosdick, yet it combines both ease of use and power, and is available in a three basic forms including procedural ("classic" Rexx), object-oriented, and Java-compatible versions.
Using Rexx for easy Desktop Linux scripting
by Howard Fosdick
Linux runs a plethora of free shell languages. These include Bash, the KornShell, the C shell, and their supporting tools such as awk, sed, and yacc. Linux also offers an exceptional selection of powerful free scripting languages such as Perl, Python, and Ruby.Linux developers dwell in hog heaven. Who wouldn't love this set of powerful scripting tools?
The answer, of course, is the desktop user. This person is not a professional developer. He doesn't have the time or inclination to learn an advanced language like Bash or Perl. Nor does he program full-time. This person might be an IT professional who is employed somewhere other than in desktop development. Or she might be a "sophisticated user" -- a professional employed outside of IT, such as a business person or administrator or engineer or scientist.
Users script to tailor their systems, automate repetitive tasks, or solve simple programming problems. Languages that base their power on complex syntax, such as Bash or Perl, are difficult for them to learn, master, and remember. Users require a language they can script from memory, since they don't program every day. They like languages with minimal syntax, forgiving formatting, and easy interactive debugging. Their language has to be designed for quick learning and ease of use while still supplying power.
Rexx fulfills this role. Rexx was bundled with both OS/2 and the Amiga OS based on its exceptional ease of learning and ease of use. But Rexx yields power: the language drives mainframes, where it has been the default scripting language for over twenty years.
Ease of use and power conflict. Rexx reconciles them through its tiny instruction set surrounded by a large set of built-in functions. As in C language, this design allows users to quickly code in the language while expanding their knowledge into the function set at their own pace. But Rexx differs from C in that scripts contain almost no punctuation or syntax. Rexx instructions and functions are high-level.
Rexx is a glue language. Scripts easily stitch together existing programs, scripts, operating system commands, APIs, DLLs, shared libraries, objects, widgets, components, and the like. Rexx supplies power through easy extensibility: external functions are coded just like internal ones (after a statement sets up access to the external library). Scripts leverage existing code to increase productivity and give power to casual programmers.
Rexx capitalizes on its interpreted nature to avoid the programming restrictions that frustrate non-professionals. Take data typing and storage allocation, for example. Rexx does not type variables; all variables contain variable-length strings. Variables containing valid numbers may be used in computations, while the others are simply character, bit, or hex strings. Variables may either defined by use or declared in advance. Rexx automatically manages all aspects of variable sizing and storage allocation.
Consider how this applies to arrays. An array does not have to be declared. Its size automatically expands and contracts as required. Arrays can contain like or varied data elements. They can be homogeneous or heterogeneous, sparse or dense, indexed by numbers or arbitrary strings or variables, and subscripted to any degree.
This flexibility yields power. Yet it is all based on the simple syntax of variable names separated by periods, such as: my_array.1 or my_array.1.4.
Arrays may be indexed by variables and arbitrary character strings as well as numbers, as in my_array.my_subscript. This allows users to create any imaginable data structure with them, including lists, key-value pairs, look-up tables, trees, balanced trees, linked lists, doubly-linked lists, and more. All this is achieved with the simple "dot notation" of arrays. No other syntax is necessary. The result is power without complexity.
Rexx varieties
Rexx comes in three basic varieties: Procedural or Classic Rexx; Object-oriented Rexx; and NetRexx.
- Procedural or Classic Rexx -- this variety of Rexx features a strong international standard to which all interpreters adhere. It's a cross-platform scripting tool that runs on every imaginable platform, from handhelds to PCs to servers to mainframes. Users can run the same scripts on desktop Linux as on their handhelds, for example. Rexx even integrates desktop Linux into mainframe sites because it is the predominant mainframe scripting language.
When using Procedural (Classic) Rexx, Linux users can choose among three available Rexx interpreters:
- Regina features many built-in extensions to the language and comes with book-quality documentation. Regina runs under all varieties of Linux, BSD, and Unix as well as all other major operating systems. Regina has a large user community and is a great place to start with Rexx.
- Rexx/imc was specifically designed for Linux, BSD, and Unix. It is a standard Rexx with a few well-chosen additional features for the Linux user. Rexx/imc has been around for a decade. It's a rock-solid interpreter with a proven, long-term track record for support.
- BRexx is the smallest and fastest Rexx interpreter. It runs in tiny and embedded Linux systems (as well as on the Mac OS, Windows CE, DOS, BSD, Unix and Amiga OS). BRexx runs like a bandit with the cops on his tail in memory-resident Linuxes like Knoppix.
- Object-oriented Rexx -- this variety of Rexx was originally developed by IBM Corporation. Called Object REXX, it was released as open source and turned over to the Rexx Language Association in late 2004. The Rexx L.A. renamed it Open Object Rexx or ooRexx for short. ooRexx is fully object-oriented. It supports inheritance, multiple inheritance, classes, messages, polymorphism, overloading, intra-object concurrency, and a powerful class library. Open Object Rexx runs under all versions of Linux, Unix, and Windows.
What makes ooRexx unique is that it is 100 percent upwardly-compatible with classic Rexx. Users can work under ooRexx immediately, coding procedural scripts, then wander into object-oriented scripting at their own pace. Companies preserve their investment in traditional Rexx scripts even as they migrate to object-oriented scripting.
Are object-oriented languages the best choice for desktop users? The question is debatable. If you believe they are ooRexx presents an easy-to-learn alternative to Python or Ruby.
- NetRexx -- this final variety of Rexx brings Rexx's traditional user-friendliness to the Java environment. It either runs under the Java Virtual Machine (JVM) or stand-alone. NetRexx scripts use Java classes and may be used to create classes used by Java programs. NetRexx can be used to develop applets, applications, servlets, classes, and beans. NetRexx is not a standard Rexx and can best be described as a "Rexx-like language." Most consider it a developer tool rather than an end-user language.
NetRexx's big advantage is that it provides an easy scripting alternative to traditional Java programming. An IBM study showed that NetRexx reduced the number of lexical tokens versus Java source for a typical class by about 35 percent while requiring 20 percent fewer keystrokes. With complete JVM compatibility, NetRexx can be intermixed to any degree desired into Java-based systems. NetRexx can even generate fully commented Java code.
Rexx For Desktop Linux?
With its very different personality, Rexx nicely complements Linux's power scripting languages. Rexx offers ease of use and ease of learning while supplying power and flexibility. It is especially suitable for end user programming and for use by computer professionals who script only on occasion. Rexx addresses the needs of the desktop Linux user.
Rexx has hundreds of thousands of users world-wide. Yet it's little-known within the American Linux community because its heaviest use has been on other platforms. Rexx earned itself a role as the bundled language of operating systems like the Amiga OS and OS/2. It fulfills a real need for desktop Linux users.
Learn More
This short article omits the most important item in your understanding of Rexx -- example scripts. You can download several dozen example scripts in a single compressed file. These examples run under Linux and/or Windows. They include a half-dozen Open Object Rexx scripts for Linux.
My new book Rexx Programmer's Reference covers everything about free Rexx. It starts with a simple tutorial, then progresses into advanced scripting, tools and interpreters, and a complete language reference.
What about support? The Rexx Language Association is an international organization devoted to Rexx. Along with the web sites above for specific interpreters, it's a great source of tools and information. Rexx forums offer support in a half dozen languages. Check them out in English, French, German, Russian, and Japanese. An international platform like desktop Linux needs international support -- and Rexx provides it.
About the Author: Howard Fosdick is an independent DBA contractor who's worked with most major scripting languages. His book Rexx: Programmer's Reference is the complete tutorial and reference for Rexx. It covers all aspects of the language, its tools and interfaces -- in 700 pages for under $30.
yagu some issues....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:
- Are there any performance issues with REXX, especially for large implementations?
- How much can you do self-contained in REXX today? One of the things I like about a language like perl is it really abstracts a lot of utilities otherwise passed outside of perl's purview, shielding coders from having to write platform specific snippets for portability. From the examples it looks like REXX takes the other philosophy and encourages dropping out momentarily to execute a native system command or utility.
- Like perl, are there ways to be strict with REXX (it wasn't totally apparent from the article)?
- 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).
- Is anyone else uncomfortable with case insensitive languages? That was one of the things I'd hoped REXX would address when it came out as a replacement for EXEC, I've always thought aside from the confusion factor of ignoring case (ever lose a file in Windows because of this?), not distinguishing case throws away an entire semantic of elegance for creating better and more maintainable code.
Anonymous Coward Re:some issues....
RetroGeek, you are a little too retro. Windows has had a central, language-independant scripting system for many years now. Look up Windows Script Host. (IBM even sells a REXX that will plug into it.)
Re:some issues.... (Score:3, Interesting)
by on Saturday May 28, @10:59AM (#12663946)I can't name a single other programmer I've known who writes/has written REXX applications.*raises hand* I used to use REXX extensively when I worked at Toyota. I used it on the OS/2 machines as well as the mainframe. I even used Visual REXX occasionally.
I loved REXX. Gave it up when I moved to perl though. It is a very nice scripting language with a rich feature set.
-- Gary F.
RetroGeek (206522) Re:some issues....
I also used REXX a lot, along with Visual REXX.
REXX has a wonderful String parsing capability.
And as for OS/2, as Rexx was the official scripting language, many applications came with REXX aware libraries. You could script directly for the application.
For instance you could write a script for an email program to manage incoming mail. Or for a FAX program, etc.
Yes other programs in the Windows (and Linux) world have macro languages, but each syntax is different. With OS/2 and REXX you only needed to learn ONE syntax, then use the libraries.
It was a great idea.
GTIrc had hooks in it for REXX scripts to handle inbound and outbound IRC commands. PMMail was REXX aware as well. I wrote some scripts for both of those way back in the OS/2 3.x and Warp days. It was my first dive into scripting languages and I found it to be very useful.
Google matched content |
Sample Scripts -- Download scripts for Linux and/or Windows plus Open Object Rexx scripts for Linux. The interpreters below also come loaded with sample scripts.
Books -- The Rexx Programmers Reference covers all aspects of free Rexx and its tools in 690 pages for $25. Rexx books are available in dozens of languages.
Free Rexx interpreters For Linux
Regina: Highly portable, professional, runs everywhere.
Open Object Rexx: Fully object-oriented superset of classic procedural Rexx.
BRexx: Fastest Rexx with the smallest footprint.
Rexx/imc: Proven interpreter with a track record extending back a decade for support.
NetRexx: A "Rexx-like" language for Java environments. Use NetRexx to develop Java-compatible applications, applets, servlets, beans and components.
Free Rexx interpreters for other platforms
Reginald: Offers a high degree of Windows integration with Windows hooks and access to all DLLs.
r4: Adds tools for Windows programming from the command line.
Rexx for Palm OS: Standard Rexx for the Palm OS.
roo!: Fully object-oriented superset of classic procedural Rexx for Windows only.
Users Group -- Rexx Language Association
Forums -- In English, French, German, Russian, and Japanese. For Windows users and for mainframe users.
Society
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
Quotes
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Bulletin:
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
History:
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
Classic books:
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D
Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|
You can use PayPal to to buy a cup of coffee for authors of this site |
Disclaimer:
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.
Last modified: March, 12, 2019