This is an introductory tutorial to the Rexx programming language.
Rexx provides exceptional capabilities for processing character text strings. All program values are strings. Some string values can be processed in arithmetic operations. String values can contain arbitrary byte values including binary zeroes.
The powerful parse instruction provides many ways for extracting string segments to variables.
Rexx programs are usually processed immediately by an interpreter, rather than a compile/link/execute sequence.
Rexx is very helpful for developing small programs that perform various text file transformations.
You are probably familiar with the two person game - Rock, Paper, Scissors. Paper beats Rock, Scissors beats Paper, and Rock beats Scissors. Some important historical negotiations were resolved by playing this game.
If you guess one of the three then the following simple Rexx program can respond to your choice:
/* REXX */
The Rock/Paper/Scissors program can be executed by an interpreter on all modern platforms.
say word( 'rock paper scissors', random( 1, 3 ) )
If you haven't used an interpreter before you will be surprised at how quickly the program works without compiling and linking.
Here are helpful indexes of Rexx language instructions, function, and a syntax summary.
The following links are organized to introduce concepts for new Rexx programmers. Proceed down the columns and then to the right. Advanced programmers can reference a specific link, as necessary.
Hint: you can use the Tab key to sequence through the links.
This tutorial describes classic features of the Rexx language. The intent of the tutorial is to enable you to become a proficient Rexx program developer, without any initial expense.
The tutorial is not a document of a specific Rexx implementation. Many implementation-specific considerations are highlighted within the tutorial.
Rexx is a programming language that was developed over a ten year period, with extensive personal effort by IBM's Michael Cowlishaw. Click here to review the background history of the Rexx language.
The tutorial is a condensation of details that are documented in Michael Cowlishaw's famous book:
The REXX Language A Practical Approach to Programming Second Edition Author: Michael Cowlishaw IBM UK Laboratories Ltd. Published in 1990 by Prentice-Hall, Englewood Cliffs, New Jersey 07632. ISBN 0-13-780651-5
The Rexx language, as documented in TRL-2, has numerous syntactic and semantic intricacies and nuances which are beyond the scope of this tutorial. You should obtain the above book if you plan to be an expert Rexx program developer.
The TRL-2 book can be obtained at one of the following internet sites:
TRL-2 was the basis of the American National Standards Institute's effort to standardize the definition of the REXX language. This standardization effort was identified as the ANSI X3J18 project. The American National Standard (ANSI Standard) for Rexx is called "Programming Language - REXX", and its number is X3.274-1996. Click here to learn about the ANSI REXX standardization project.
A 500 page Rexx's reference has just been written by Howard Fosdick. The book describes how to make the best use of Rexx tools and interfaces, with examples for both Linux and Windows. A tutorial is provided with lots of examples to help you get up and running with Rexx.
This book can be obtained by ordering ISBN: 0764579967 at the following online bookstores: