Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

REXX lab

Step through a small REXX program line by line and watch its variables, output and calls.Use this when you are learning REXX, or want to see how a short exec works one statement at a time.

Simulation, confirm on z/OSON THIS DEVICE · NOTHING UPLOADEDCounting requests…
How to use this tool

What it does

Runs a small REXX program one statement at a time and shows its variables, output and calls.

How to use it

  1. Paste a small REXX program, or press Example.
  2. Press Start, then Step for one statement or Run to the end.
  3. Watch the variables, the output and the calls change.

What it cannot do

  • It supports a documented subset; anything outside it is named and the run stops.
  • It has no host commands, files or data stack.

REXX · paste a small program
STEP=one statementRUN=to a breakpoint or the endon this device

Input for PULL and ARG

What this page remembers

To save you retyping, this page keeps your program and input lines in this browser on this device (never sent anywhere). On a shared computer, clear them when you finish.

A learning lab for a subset of REXX. Anything outside the subset (host commands, files, the data stack and more) is named and the run stops there; nothing is guessed. Variables, SAY output and the call stack are shown after every step.

READY · paste a program or load an example
●=Breakpoint▶=Statement that just ran

Variables

Press START to see every variable.

Call stack

Press START to follow CALLs.

OUTPUT · SAY

    

Covers: A documented subset of REXX: assignment, SAY, IF, DO in all its forms, SELECT, CALL and RETURN of routines in the same program, PROCEDURE, PARSE, ARG, PULL, NUMERIC DIGITS, EXIT, and string, number and word built-in functions such as SUBSTR, WORD, POS and LEFT.

ACCURACY · SIMULATION · CONFIRM ON Z/OS

A step-through lab for a subset of REXX, not the z/OS interpreter. Host commands, files, the data stack and anything else outside the subset stop the run with a plain message. Confirm on z/OS.

What it checks

  • ConfirmedDecimal arithmetic with NUMERIC DIGITS (default 9), including % and //, exponential notation and the error for division by zero.
  • ConfirmedOperator priority, number versus string comparison, and the value of a variable that was never set (its own name in capitals).
  • ConfirmedStem and compound variables, DO with TO, BY, FOR, WHILE and UNTIL, LEAVE and ITERATE, and SELECT.
  • ConfirmedCALL and RETURN for routines in the same program, with PROCEDURE and EXPOSE, and the call stack at every step.
  • Depends on your systemPARSE templates by words, literal strings and columns, and PULL taking the input lines you supply.

What it does not check

  • UnsupportedADDRESS and host commands, EXECIO, OUTTRAP, files and the data stack (PUSH, QUEUE): the run stops with a message instead.
  • UnsupportedINTERPRET, SIGNAL, CALL ON, TRACE, NUMERIC FORM and FUZZ, DATE and TIME, and external routines or functions.
  • Depends on your systemHexadecimal strings and string order use EBCDIC code page 037; other code pages are not modelled.
  • Depends on your systemPowers that need more than DIGITS digits are rounded once, so the last digit can differ from z/OS.

Source

  • IBM z/OS TSO/E REXX Reference: REXX instructions, built-in functions, parsing, numbers and arithmetic, expressions and operators

Simulation, confirm on z/OS. Status labels: Confirmed Depends on your system Unsupported (a rule with an official source; depends on your catalog, security, installation defaults or compiler options; not parsed and shown instead of guessing).

Input limits and example

  • Program text: 200,000 characters.
  • Each run stops after 100,000 statements, 10,000 lines of output, 200 nested calls or 2.0 MB of variable data.

EXAMPLE INPUT

total = 0
do i = 1 to 3
  total = total + i * 10
  say 'step' i 'total' total
end
call show total
exit
show: procedure
  parse arg n
  say 'done:' n
  return

Check it yourself in one minute

  1. Open your browser's developer tools: in Chrome or Edge press F12 or right-click and choose Inspect; in Firefox press Ctrl+Shift+E for the Network Monitor; in Safari first turn on Show features for web developers under Settings, Advanced. Then open the Network tab.
  2. Keep the log across page loads (Chrome: Preserve log; Firefox: Persist Logs), then use the tool: paste your text or open a file and press the button.
  3. Look at the list. You will see only this page and its own files, loaded when the page opened. Nothing new appears when you use the tool.
  4. Still unsure? Switch Wi-Fi off and try again. The tool still works.

What the badge counts: requests the browser logged after this page finished loading, other than the site's own files. It reads the browser's own record and makes no request of its own. If your browser cannot give that record, the badge says so. The badge is a convenience; the developer tools are the proof.

The rule that enforces it

Every page carries this Content Security Policy. The browser itself refuses any request outside it; connect-src 'none' blocks fetch, XHR and WebSocket.

default-src 'none';
script-src 'self';
style-src 'self';
img-src 'self' data:;
font-src 'self';
connect-src 'none';
object-src 'none';
form-action 'none';
base-uri 'none';
manifest-src 'self';
worker-src 'self'