Show Menu
Cheatography

REXX Scripting Language Cheat Sheet (DRAFT) by

REXX Scripting Language (taken from IBM VSE/REXX Reference 6.1)

This is a draft cheat sheet. It is a work in progress and is not finished yet.

REXX Language Logo

This cheat sheet was made with inform­ation gathered from IBM's VSE/REXX Reference 6.1.

Arithmetic Operators

+
Add
-
Subtract
*
Multiply
/
Divide
%
Integer Divide
//
Remainder (not modulo)
**
Power (raise to whole-­number)
Prefix -
Same as: 0 - number
Prefix +
Same as: 0 + number

Comparison Operators

=
Equal (numer­ically or padded)
\=, /=
Not equal
>
Greater than
<
Less than
<>, ><
Greater than or less than (same as not equal)
>=
Greater than or equal to
<=
Less than or equal to
\>
Not greater than
\<
Not less than
==
Strictly equal (ident­ical)
\==, /==
NOT strictly equal
>>
Strictly greater than
<<
Strictly less than
>>=
Strictly greater than or equal to
<<=
Strictly less than or equal to
\>>
Strictly NOT greater than
\<<
Strictly NOT less than

Boolean Operators

&
AND
|
Inclusive OR (either is true evaluates to 1)
&&
Exclusive OR (either but not both is true evaluates to 1)
Prefix \
Logical NOT (Negates: 0->1 and 1->0
 

Concat­enation Operators

(blank)
Concat­enate terms with one blank in between
||
Concat­enate without an interv­ening blank
(abuttal)
Concat­enate without an interv­ening blank
You can force concat­enation without a blank line by using the || operator.

The abuttal operator is assumed between two terms that are not separated by another operator. This can occur when two terms are syntac­tically distinct, such as a literal string and a symbol, or when they are separated only by a comment.

Concat­ena­tion: A (Z)
Function Call: A(Z)

Other Operators

/*
Begin Comment
*/
End Comment
A-Z, a-z, 0-9, @ # $ . ! ? _
Valid Symbol Characters
,
Contin­uation Character
.
Constant Symbol (at beginning of string)
Valid Symbols:
Fred
Albert.Hall
WHERE?
Valid Numbers:
12
'-17.9'
127.0650
73e+128
' + 7.95E5 '

Constant example: .12345

Negative numbers in expres­sions must use quotes.

The contin­uation character is used to continue a clause onto the next line.

Common Commands

DROP
unassigns variable: ex. drop variable name
EXIT
leaves program uncond­iti­onally
INTERPRET
processes instru­ctions that have been built dynami­cally by evaluating the expres­sion: ex. interpret expression
LEAVE
causes an immediate exit from one or more repetitive DO loops (anything other than simple DO)
SAY
writes line to current output stream