by H. Fosdick   © 2024

These charts are for those who know one of these languages and want to learn about the other. They may also be useful for conversions. Click here for PDF version.

The Basics

Easy to learn, use, and maintain  Yes  Yes
Very powerful  Yes  No (lacks common language features)
Open source  Yes  No
Portable  Yes  No
Runs on all platforms  Yes  No
Runs as the OS Shell  No  Yes
Interfaces to tons of tools  Yes  No (intended to issue OS commands)
ANSI or ISO Standard  Yes  (ANSI-1996)  No


DialectsTRL-2, ANSI, Mainframe, ooRexx, NetRexxCLIST
Unique Usage * Default scripting language for mainframes and several minor platforms
* Interfaces to all mainframe environments and address spaces
* Available on all z/OS mainframes
Programming paradigmsProcedural, scripting, object-oriented (ooRexx and NetRexx), functionalProcedural, scripting
OOP: classes, objects, multi-inheritance, polymorphism, encapsulationIn ooRexx and NetRexxUnsupported
User GroupRexx Language Association SHARE
Quick Online LookupQuick Lookup IBM TSO CLISTs Manual
Cheat Sheet (printable PDF)ANSI Rexx, Mainframe Rexx Only this one
ForumRexxLA forum Expert Forum @
Further IBM TSO CLISTs Manual

Language Comparison

FormatFree formFree form
Variable NamesValid Symbol that does not start with a digit (0-9) or a period (.),Start with &
Next character must be one of: A-Z, (a-z), _, #, $, @
CommentsEnclose inside /* and */Enclose inside /* and */. Or put comment at end of a line by starting it with /*
Line Continuation, (comma)- (minus sign) or + (plus sign)
Statement Separator; (semi-colon)None (implied by line end)
Code BlocksDefine by do - endDO-END, SELECT-END
Undefined VariablesAllowed. Use SYMBOL to determine if a variable has been definedAllowed until misused
Assignment Operators=SET =
Arithmetic Operators+  -  *  /  %  **  // +  -  *  /  **  //
Comparison Operators==  \==  >>  <<  >>=  \<<  <<=  \>>  =  \=  <>  ><  >  <  >=  \<  <=  \>
( \ can be replaced with ¬ in any of these)
=   EQ  ¬=   NE  <   LT  >   GT  <=   LE  >=   GE   ¬>   NG  ¬<   NL
Logical Operators&  |  &&  \ (prefix)  ¬ (prefix) AND   &&   OR   |
Concatenation Operators||  Or, concatenate with blank between
Or, concatenate by abuttal (no blank)
Bitwise OperatorsUse built-in functions Unsupported
Membership OperatorsUnsupported Unsupported
Regular ExpressionsUse RexxRE Regular Expressions external Library Unsupported
Built-in FunctionsAbout 70 functions 15 functions, plus about 55 Control Variables
Data TypesEverything's a string, types are reflected in usage Defined by usage
Function to Check Data Typedatatype&DATATYPE
Collections of VariablesUse compound variables Unsupported, you would have to program this
Associative ArraysUse compound variablesUnsupported
Multidimensional ArraysUse compound variablesUnsupported
Stack & Queue OperationsYes (push, pull, parse pull, queue, queued)Unsupported as a generalized feature, but can manage the terminal input buffer as a stack
Decimal ArithmeticDefaultUnsupported
Flow of Controlif, do, select, call, exit, return, iterate, leave, signal, nop IF-THEN-ELSE, DO, SELECT, GOTO, EXIT, RETURN, SYSCALL, ATTN, ERROR, TERMIN, TERMING
GOTOnone (use signal)GOTO
Calling SubroutinecallSYSCALL
Manage Scope of Variables to Subroutinesprocedure exposeUse PROC
Subroutine EndreturnEND
Getting Return Codespecial variable RC
RESULT set by subroutine RETURN
&LASTCC, &MAXCC for highest return code set
Trace Script Executiontrace (instruction), trace (function) Use CONTROL statement
Show Full Executiontrace aCONTROL LIST
Exception HandlingsignalERROR, ATTN
Standard Exceptionsnovalue, error, failure, halt, notready, syntax, lostdigits ATTN (attention key pressed), ERROR (traps any of more than 100 error conditions)
Attention Routinessignal on haltATTN
Run an Operating System CommandJust issue the command string
(Rexx passes unrecognized strings to the default active environment)
Just issue the command
Terminate ProcessexitEXIT
End with Return Codeexit 8EXIT(8)
Get User Inputsay "Enter your name:"
parse pull name
WRITE Enter your name:
Read Input Recordlinein
execio (mainframe only, not ANSI)
Write Output Recordlineout
execio (mainframe only, not ANSI)
Write without line feedUnsupportedWRITENR
Get Date and Timedate and time functions&SYSDATE, &SYSTIME
Get Length of a Stringlength("MYSTRING")&LENGTH(MYSTRING)
Get a Substringsubstr("MYSTRING",1,4)&SUBSTR(1:4,MYSTRING)

Based on Rexx Programmer's Reference and IBM TSO CLISTs Manual.

Back to    .     .