ADDRESS instruction
The REXX instruction that decides which environment, such as TSO or ISPF, receives the commands an exec issues.
Also written ADDRESS, ADDRESS TSO, ADDRESS MVS, ADDRESS SYSCALL, host command environment
In REXX, any line that is not a REXX instruction is treated as a command and sent somewhere else to run. ADDRESS decides where. Each destination is called a host command environment.
The common ones on z/OS: ADDRESS TSO sends commands to TSO, and is the default for an exec running in TSO. ADDRESS ISPEXEC sends them to ISPF dialog services. ADDRESS ISREDIT sends them to the ISPF editor, from inside an edit macro. ADDRESS MVS runs a smaller set of commands, such as EXECIO, without TSO. ADDRESS SYSCALL calls Unix System Services functions.
ADDRESS ISPEXEC on its own changes the environment for all the lines that follow. ADDRESS ISPEXEC "DISPLAY PANEL(MENU)" sends just that one command and leaves the environment as it was.
After each command, the variable RC holds its return code, so the exec can check whether it worked. Putting commands in quotes is good practice, because otherwise REXX may treat parts of them as variables and change them before they are sent.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- REXXA readable scripting language used across the mainframe for automation, tooling and quick one-off tasks.
- REXX execA REXX program, stored as a member in a library and run by name from TSO or ISPF.
- TSO commandA command typed at a TSO prompt or on an ISPF command line to ask the system to do something directly.
- ISPF dialog servicesThe ISPF functions a program or exec can call to show panels, keep tables and use other ISPF features, through ISPEXEC.
- ISPF edit macroA REXX or CLIST program that runs inside the ISPF editor and changes the member being edited.