Skip to content
REXX & automation

REXX exec

A REXX program, stored as a member in a library and run by name from TSO or ISPF.

Also written exec, EXEC library, SYSEXEC

An exec is a REXX program. It lives as a member in a library set aside for the purpose, and is run by typing its name, which makes site-written tools feel like built-in commands.

The first line of every exec is a comment containing the word REXX, which is how the system recognises what it is looking at. Leaving it out is the classic first error.

Execs can take arguments, so one tool serves many cases, and they return a value the caller can test, which is useful when one exec calls another or when an exec is driven from a job.

Where the library sits determines who can run it. A personal library makes an exec available to you; a shared team library makes it available to everyone, which is how useful scripts spread.

They can also run in batch rather than interactively, which is how REXX ends up doing housekeeping and reporting work inside overnight jobs as well as sitting behind an ISPF panel during the day.

Browse all 115 terms

Learn this properly.

Use REXX exec for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.