PL/I for OpenVMS and Tru64
•  Welcome
•  Hobbyist
•  Kits
•  Examples
•  Resources
•  Editors
•  Benchmarks
•  Rexx
•  Contact
•  Site Map

[PREV]    [NEXT]

[PRINT]

VWcms
WASD
OpenVMS …empowered

Rexx

Overview

Rexx is a programming language developed at IBM by Mike Cowlishaw in 1979.  It is largely based on PL/I.  Cowlishaw's original intention was to develop a language similar to PL/I, but easier for beginners and non-programmers to grasp.  Since its creation Rexx has been extended and implemented on many platforms in different ways.  This page is a repository for all OpenVMS related Rexx activity.

NetRexx

NetRexx is IBM's Java based version of Rexx.  It is entirely written in Java and consists of a compiler and run-time.  Rexx code is compiled to Java which is then compiled to Java byte-code.  Although not officially supported by IBM, it is possible to run NetRexx under OpenVMS.

After downloading and unpacking the IBM binary kit you should be left with a [.NetRexx...] directory tree.  Download the OpenVMS NetRexx setup procedures and unpack the, in the [.NetRexx] directory.  In this kit are two procedures.  The first is NETREXX_STARTUP.COM, to be included in the system startup procedure. It defines the system-wide product logicals.  The second is NETREXX_LOGIN.COM, to be included in the user's login procedure. It sets up the nrc and netrexxc compiler commands.  When adding NETREXX_LOGIN.COM to the user's login procedure it is important to run the Java setup procedure first.  An excert from a typical login procedure might look like this:

    $ if (f$search("SYS$MANAGER:JAVA$142_SETUP.COM") .nes. "")
    $ then
    $    @sys$manager:java$142_setup
    $    if (f$search("NETREXX_ROOT:[000000]NETREXX_LOGIN.COM") .nes. "") then -
    $        @netrexx_root:[000000]netrexx_login
    $ endif

NetRexx is a Java application so it responds to all the Java and DECC$* feature logicals.  At a minimum the following should be configured:

    $ set process/parse_style=extended
    $ define DECC$ARGV_PARSE_STYLE "TRUE"
    $ define DECC$EFS_CASE_PRESERVE "TRUE"
    $ define DECC$EFS_CASE_SPECIAL "TRUE"

To run a compiled program, simply use the Java VM, making sure to include the NetRexx run-time in the classpath.  The following example demonstrates compiling and running a NetRexx program.

    $ type hello.nrx
    /* This is a fully documented NetRexx program */

    say 'Hello World!'
    $ netrexxc hello.nrx
    NetRexx portable processor, version 2.05
    Copyright (c) IBM Corporation, 2005.  All rights reserved.
    Program hello.nrx
    Compilation of 'hello.nrx' successful
    $ java -classpath /netrexx_runlib/NetRexxR.jar:. hello
    Hello World!

It is also possible to run the program in the NetRexx Interpreter, with a couple extra options:

    $ netrexxc hello.nrx -exec -nojava
    NetRexx portable processor, version 2.05
    Copyright (c) IBM Corporation, 2005.  All rights reserved.
    Program hello.nrx
    ===== Exec: hello =====
    Hello World!
    Processing of 'hello.nrx' complete

Links

The following are a collection of links to other Rexx resources around the internet.

  • comp.lang.rexx is a forum for discussing Rexx. It is a usenet newsgroup so it can be accessed from either Google or your favourite NNTP client.
  • RexxLA is The Rexx Language Association.  They are an independant, non-profit organization dedicated for futhering the Rexx Programming Language.  They have been involved in the release of Open Object Rexx and the upcoming open source release of NetRexx.
  • Mike Colishaw's Rexx Page was once the definitive reference for all things Rexx, it has been preserved by RexxLA.

[PRINT]  [PRINT]