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.
Related terms
- REXXA readable scripting language used across the mainframe for automation, tooling and quick one-off tasks.
- MemberOne named item inside a partitioned dataset, such as a single program, job or copybook within a library.
- Partitioned datasetA dataset that works like a library or folder, holding many separately named members inside one dataset.
- TSO commandA command typed at a TSO prompt or on an ISPF command line to ask the system to do something directly.
- ISPFThe full-screen, menu-driven workbench most people use to do their day-to-day work on z/OS.