<<

The Universal Language By Howard Fosdick

EVERYONE WHO WORKS WITH MAINFRAMES KNOWS ABOUT REXX. IT’S THE or “scripting” language that’s been shipped with all main- Classic frames for years. It’s versatile, flexible, and powerful. Somehow it still procedural Rexx manages to be very easy to learn and use. Runs on any In recent years, Rexx has spread its wings. It now runs as an open platform source language on virtually every platform and . Object-oriented Moreover, it comes in object-oriented and -compatible forms. This Rexx article gives you a quick tour of modern Rexx. We’ll summarize the Runs on Windows, different versions of Rexx. We’ll describe the many free Rexx inter- , Java-compatiable preters and tools that are available, and tell you where you can down- NetRexx load them. Before we proceed, you might ask: why should I care? The answer Runs on any Java Virtual Machine comes down to two key benefits: Figure 1: Three Rexx Flavors

▼ Transferability of skills Platforms Quick Profile ▼ Transportability of code Regina All major operating The most popular free procedural Rexx. Its large user community systems means good support and it interfaces to most free tools and inter- If you know Rexx, you know a universal pro- faces. Comes with many extra built-in functions and excellent, pro- gramming language. Since it runs everywhere, fessional documentation. Download from: this makes your Rexx skills transferable to http://regina-rexx.sourceforge.net/ other platforms. For example, you work on the Rexx/imc Linux, Unix, BSD Unix, Linux, and BSD -oriented with nice extensions for Unix pro- mainframe but use a PC. Rexx gives you a way grammers in these environments. A rock-solid interpreter with a to program both without having to learn a new proven track record for long-term support. Includes a free Rexx tuto- . You can even program rial. Download from: your handheld with Rexx. And those new http://users.comlab.ox.ac.uk/ian.collier/Rexx/rexximc.

Linux blade servers the manager wants to bring BRexx Linux, Unix,Windows Extremely fast and light, runs on many platforms including resource- in? Administer them with Rexx scripts and you CE, Mac OS, 16- and limited systems like Windows CE, embedded Linuxes, DOS. Many won’t have to spend your weekends learning 32- bit DOS, others. extra functions and interfaces. Long-term track record of support. or . A language that runs everywhere Download from: http://bnv.home.cern.ch/bnv/ gives you skills that apply everywhere. Reginald Windows Customizes and extends Rexx for Windows . Includes This same principle applies to your code. A many Windows tools such as a GUI, speech, MIDI, and media func- standard Rexx runs anywhere, from hand- tions, etc. Provides a standard language alternative to proprietary helds to laptops to desktops to servers to main- tools like VBScript. Nicely documented with examples and easy to use. frames. Portable code gives you a of Download from: www.borg.com/~jglatt/rexx/rexxuser.htm platforms and reduces costs. Rexx has evolved r4 Windows Rexx extended for Windows with many tools for developers includ- into a “universal programming language.” ing a GUI forms tool, color text file viewer and editor, over 135 win- As figure 1 shows, Rexx comes in three fla- dows command tools, visual accessories, XML to HTML vors: “classic,” procedural Rexx; object-ori- auto-converter, GUI widgets, and others. Excellent tutorials and example scripts. Download from: ented Rexx; and, Java-compatible Rexx. Let’s www.kilowattsoftware.com/ discuss them. Rexx for Palm OS Palm OS Glues Palm OS applications and together in scripts that run without leaving the current application. Scripts can access all CLASSIC REXX Palm data and resources, including TCP/IP,Infrared, USB and serial communications, console, , etc. Runs natively. Good exam- Classic Rexx was defined back in the 1980s. ple scripts with easy-to-follow tutorials. Download from: This procedural language ships bundled with www.jaxo.com/rexx/ all IBM mainframe operating systems, i5/OS, Figure 2: Free Classic Rexx Interpreters

Technical Support | March 2006 ©2006 Technical Enterprises, Inc. Reproduction of this document without permission is prohibited. OS/400, OS/2, PC-DOS, and OS and Interpreter Platforms Quick Profile other systems. Open Object Windows, Linux, Unix Fully object-oriented superset of classic Rexx. Developed by IBM, it Classic Rexx gained its ANSI standard in Rexx became open source in early 2005. Now enhanced and maintained 1996. Since then, two major trends have hit the by the Rexx Language Association.The most widely-used object-ori- software world: open source software and free ented Rexx interpreter. Runs on Windows, Linuxes, and . scripting languages. These two trends con- Download from: www.oorexx.org/ verge in Rexx and this has led to a proliferation of Rexx interpreters across many platforms. roo! Windows Fully object-oriented superset of classic Rexx. From the same com- Today free Rexx is available for any main- pany as the standard r4 Rexx interpreter, it comes with the same stream operating system, including all versions extensive set of Windows tools. Includes quick, easy tutorials that nicely bridge the gap between standard and object-oriented Rexx of Windows, Linux, and Unix, and even most programming. Download from: “second-tier” operating systems, including the www.kilowattsoftware.com/ Mac OS, Palm OS, Windows CE, BSD, NetRexx Any JVM A Rexx-like language that integrates with the Java environment. /EPOC, VAX/VMS, DOS, OS/2, NetRexx uses Java classes and can be used to develop classes, appli- Amiga OS, i5/OS, OS/400, and many others. cations, applets, servlets, and beans. Download from: You can download and install free Rexx for www-306..com/software/awdtools/netrexx/library.html any of these operating systems in a jiffy. Figure Figure 3: Free Object-oriented and Java-compatible Rexx Interpreters 2 tells you where to get the interpreters. For most operating systems, you have a choice of Interpreter Platforms Quick Profile than one free Rexx interpreter. Figure 2 briefly profiles each interpreter, but you’ll want Open Object Windows, Linux, Unix Fully object-oriented superset of classic Rexx. Developed by IBM, it Rexx became open source in early 2005. Now enhanced and maintained to download the ones available for your plat- by the Rexx Language Association.The most widely-used object-ori- (all are free) and evaluate them yourself. ented Rexx interpreter. Runs on Windows, Linuxes, and Unixes. Rexx also offers hundreds of free tools. Download from: These support graphical user interfaces, data- www.oorexx.org/ base access, web programming, controlling roo! Windows Fully object-oriented superset of classic Rexx. From the same com- web servers, text processing, XML, communi- pany as the standard r4 Rexx interpreter, it comes with the same cations, and almost any other programming extensive set of Windows tools. Includes quick, easy tutorials that function. The tools typically come in the form nicely bridge the gap between standard and object-oriented Rexx of “function libraries,” so after issuing a com- programming. Download from: www.kilowattsoftware.com/ mand to access them, your Rexx program uses them just like the built-in functions that come NetRexx Any JVM A Rexx-like language that integrates with the Java environment. with the language. This easy extensibility NetRexx uses Java classes and can be used to develop classes, appli- cations, applets, servlets, and beans. Download from: makes Rexx ideal as a “glue” language. You www-306.ibm.com/software/awdtools/netrexx/library.html can use it for quick programming with many interfaces. Figures 2 and 3 list sites where you Figure 4: To Get Further Information can download free Rexx tools. single and , classes and lists where to download the free object-ori- OBJECT-ORIENTED REXX methods, data encapsulation, polymorphism, ented Rexx interpreters. operator overloading, and a large class The fact that object-oriented Rexx is a Rexx joined the object-oriented revolution library. ooRexx runs under Windows, Linux, super-set of classic Rexx means that if you with the advent of IBM’s Object Rexx inter- and Unix. know classic Rexx, you can immediately into the object-oriented world. Use the object- The fact that object-oriented Rexx is a super-set of oriented Rexx interpreters and program proce- durally. Then add in object-oriented features as classic Rexx means that if you know classic Rexx, you you learn them. Over , whatever pace can immediately move into the object-oriented world. suits you, you can leverage Rexx to transition to fully object-oriented programming. This is preter a decade ago. IBM has since open- A company named Kilowatt Software offers an ideal way for mainframe scripters to grow sourced this interpreter and turned over its an alternative object-oriented free Rexx. into object-oriented programming. enhancement and maintenance to the Rexx Called roo!, this interpreter is also a true Language Association. Renamed “Open super-set of standard, classic Rexx. It offers JAVA-COMPATIBLE REXX Object Rexx,” or “ooRexx” for short, this the same features as Open Object Rexx, but is product is a true super-set of classic Rexx. based on an entirely different class library and As Java programming spread in the late Any standard procedural Rexx program will uses different syntax for object-oriented fea- 1990s, the inventor of Rexx, Michael run, without change, under Open Object Rexx. tures. Those interested in object Rexx will Cowlishaw, saw another opportunity. Java ooRexx adds all the features of object-ori- want to check out both ooRexx and roo! to see brought key benefits to programmers, through ented programming to Rexx. These include which product best meets their needs. Figure 3 its virtual machine technology and other

Technical Support | March 2006 ©2006 Technical Enterprises, Inc. Reproduction of this document without permission is prohibited. advances. But Java inherited a somewhat diffi- GOING FORWARD download a couple for your platform and see cult C-like syntax. Could there be a better way? which you prefer. Each has its strengths. The result was NetRexx, a variant of Rexx Since its definition twenty-five years ago, Figure 4 gives you pointers to further infor- that brings Rexx’s traditional ease of use to the Rexx has grown and diversified. From its begin- mation. These include user groups, books, Java environment. NetRexx reduces the num- nings as one of the first scripting languages, online forums, tutorials, and other resources. ber of lexical tokens versus Java source for a Rexx has evolved into object-oriented and Java- Like the Rexx interpreters and tools, these typical class by about 35% and it requires 20% compatible forms. These augment the original resources are either free or very inexpensive. fewer keystrokes. Yet, NetRexx uses all Java’s procedural language; they do not supplant it. The open source revolution offers great classes, and can itself be used to cre- value to IT organizations and pro- ate classes used by Java programs. fessionals. It’s led to the revival of one of the You can create applications, applets, From its beginnings as one of the first and most powerful scripting languages. servlets, and beans in NetRexx. You first scripting languages, Rexx We hope you’ll look into how you can lever- can even use NetRexx to generate age free Rexx. fully-commented Java code. has evolved into object-oriented NetRexx completely integrates into and Java-compatible forms. Java development. NetRexx differs from all other Rexx interpreters in that it does not meet the Today there are six free classic Rexx inter- ANSI 1996 Rexx standard. Unlike object-ori- preters that run on nearly any platform and ented Rexx, NetRexx is not an upwardly-com- operating system. There are two free object- patible super-set of standard Rexx. NetRexx is oriented Rexx interpreters and the Java-ori- best called a “Rexx-like” language. Those ented NetRexx. Rexx is popular worldwide. NaSPA member Howard Fosdick authored the Rexx who know Rexx can switch to NetRexx Web forums discuss Rexx in many spoken lan- ’s Reference, a book that starts with an easy tuto- quickly; like Rexx, NetRexx is easy to learn. guages including English, French, German, rial and then covers everything you’ll want to know about Rexx, Programs can be converted from classic Rexx Russian, Japanese, and Turkish. available at www.amazon.com/rexx. to NetRexx by running an automatic “Rexx to Figures 2 and 3 briefly profile the free Rexx NetRexx” conversion tool. Figure 3 lists the interpreters and where you can download them. download site for free NetRexx. Since the interpreters are free, we urge you to

©2006 Technical Enterprises, Inc. Reproduction of this document without permission is prohibited. Technical Support | March 2006