by H. Fosdick © 2024 RexxInfo.org CC: BY-ND
These charts enumerate the exact differences between ANSI-standard Rexx and mainframe Rexx. They may be helpful in language conversions, or if you know one of these two language variants and want to learn the other. Click here for a PDF version.
ANSI Rexx | Mainframe Rexx | |
---|---|---|
Usage | * A superset of the original TRL-2 language definition defined in 1996
* Runs on all platforms from cell phones to supercomputers * Several open source interpreters available |
* Default scripting language for all IBM mainframe operating systems
* The only high-level language that interfaces to all mainframe environments and address spaces |
Compiler Available | No | Yes |
Open Source | Yes | No |
Programming Paradigms | Scripting, Procedural, Functional
(not object-oriented) | Scripting, Procedural, Functional
(not object-oriented) |
User Group | Rexx Language Association | Rexx Language Association |
Quick Online Lookup | Quick Lookup | Quick Lookup |
Reference Card (printable PDF) | ANSI Rexx | Mainframe Rexx |
Forum | RexxLA forum |
RexxLA forum,
Mainframe Experts Forum (Rexx Thread) |
Further information | RexxInfo.org | RexxInfo.org |
ANSI Rexx | Mainframe Rexx | |
---|---|---|
Requires "Rexx" in 1st line comment | No | Usually |
ANSI Symbols (aka character set) | Yes | Yes, a superset |
ANSI standards for case-insensitivity, free formatting, etc | Yes | Yes |
ANSI String Notations (character, hexadecimal, and binary) | Yes | Yes |
ANSI Notations for statement separator, line continuation, comments, assignment, etc | Yes | Yes |
ANSI Notation for Parentheses (following functions and for expression evaluation) | Yes | Yes |
ANSI Notation for Operators (Arithmetic, Comparison, Logical/Boolean, and Concatenation) | Yes | Yes |
ANSI Notation for Compound Variables | Yes | Yes |
Instructions Conform to ANSI-1996 | Yes | Largely, but there are many small differences from ANSI, listed below |
Functions Conform to ANSI-1996 | Yes | Largely, but there are many small differences from ANSI, listed below |
Includes Instructions beyond ANSI | No | UPPER |
Includes Functions beyond ANSI | No | EXTERNALS, FIND, INDEX, JUSTIFY, LINESIZE, USERID |
Stream I/O | Yes |
z/OS: yes, if Stream I/O Package is installed
z/VM: yes |
EXECIO | No | Yes |
Array Read & Write | No | Yes with EXECIO |
DBCS Support | No | Yes via 13 functions |
TSO/E External Functions | No | z/OS: yes, 19 External Functions
z/VM: covers many of these through similar VM commands |
TSO/E Rexx Commands | No | z/OS: yes, 10 Rexx Commands
z/VM: covers many of these through similar VM commands |
Explicit Terminal Buffer/Stack Manipulation Commands | No | Yes |
Run an Operating System Command | Just issue the command string | Just issue the command string |
Instruction | Mainframe Rexx |
---|---|
ADDRESS | z/OS and z/VM do not support two formats introduced by ANSI-1996:
ADDRESS [ environment ] [ command ] [ redirection ] ADDRESS [ [ VALUE ] expression [ redirection ] ] |
CALL | z/OS does not support NOTREADY |
PARSE | z/OS and z/VM add two more template options: EXTERNAL and NUMERIC. z/OS only supports the LINEIN option if the Stream I/O package is installed, while VM supports this natively. |
SIGNAL | z/OS supports the conditions ERROR, FAILURE, HALT, NOVALUE, and SYNTAX. z/VM supports ERROR, FAILURE, HALT, NOTREADY, NOVALUE, and SYNTAX. Neither support LOSTDIGITS. |
TRACE | z/OS and z/VM support the additional flags: ! and S. They also support this alternative format for the trace instruction: TRACE [string] | [symbol] | [ [value] expression] |
UPPER | A mainframe-only instruction (not in ANSI) |
Function | Mainframe Rexx |
---|---|
ADDRESS | z/OS and z/VM do not support this format: ADDRESS([option]) |
CHANGESTR | Unsupported by z/OS and z/VM |
CHARIN | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively. |
CHAROUT | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively. |
CHARS | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively. z/OS and z/VM only support the format of the CHARS function without the C or N option. Returns 1 if there is at least one character available in the stream and 0 otherwise. |
COUNTSTR | Unsupported by z/OS and z/VM |
DATATYPE | z/OS and z/VM add two more TYPES to the list: C -- returns 1 if string is a mixed SBCS/DBCS string D (Dbcs) -- returns 1 if string is a DBCS-only string enclosed by SO and SI bytes |
DATE | z/OS and z/VM add two more OPTION_OUT parameters: C (Century) -- the number of days, including the current day, since and including January 1 of the last year that is a multiple of 100 in the form: ddddd (no leading zeros) J (Julian) -- date in the format: yyddd |
EXTERNALS | A mainframe-only function (not in ANSI)
z/VM: returns the number of elements in the terminal input buffer (system external event queue) z/OS: there is no equivalent buffer. Therefore, in the TSO/E implementation of REXX, the externals function always returns a 0 |
FIND | A mainframe-only function (not in ANSI) |
INDEX | A mainframe-only function (not in ANSI) |
JUSTIFY | A mainframe-only function (not in ANSI) |
LINEIN | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively. |
LINEOUT | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively. |
LINES | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively.
z/OS and z/VM only support this format: LINES([name]) z/VM: the function returns the number of completed lines remaining in the character input stream. |
LINESIZE | A mainframe-only function (not in ANSI).
z/VM: returns the current terminal line width. Returns 0 in any of these cases: * Terminal line size cannot be determined. * Virtual machine is disconnected. * The command CP TERMINAL LINESIZE OFF is in effect. z/OS: if the script runs in foreground, returns the current terminal line width minus 1 (the point at which the language processor breaks lines displayed by the say instruction). If the script runs in background, this function always returns 131. In non-TSO/E address spaces, this function returns the logical record length of the OUTDD file (default is SYSTSPRT). |
QUALIFY | Unsupported by z/OS and z/VM |
STREAM | Supported by z/OS if the Stream I/O Package is installed, while VM supports this natively. Options are implementation and platform dependent, refer to the manual for your interpreter. |
TIME | z/OS and z/VM support solely this format: TIME(option_out) |
TRACE | z/OS and z/VM support two additional settings: ! and S |
USERID | A mainframe-only function (not in ANSI) |
Based on RexxInfo.org charts, TSO/E REXX Reference, and REXX VM Reference.
Back to RexxInfo.org