Using REXX
In addition to being a versatile general-purpose programming language,
REXX can interact with TSO/E, MVS™,
APPC/MVS, and ISPF, which expands its capabilities. This part of the
book is for programmers already familiar with the REXX language and
experienced in TSO/E. The chapters
in this part cover the following topics.
- Entering Commands from an Exec — A REXX exec can issue different types of host commands within the same exec.
- Diagnosing Problems Within an Exec — Several debugging options are available in an exec.
- Using TSO/E External Functions — TSO/E external functions are provided to interact with the system to do specific tasks.
- Storing Information in the Data Stack — The data stack is useful in I/O and other types of special processing.
- Processing Data and Input/Output Processing — You can process information to and from data sets by using the EXECIO command.
- Using REXX in TSO/E and Other MVS Address Spaces — You can run execs in other MVS address spaces besides TSO/E foreground and background.
Note: Although you can write a REXX exec to run in a non-TSO/E address
space in MVS, the chapters
and examples in this part, unless otherwise stated, assume the exec
will run in a TSO/E address space. If you want to write execs that
run outside of a TSO/E address space, keep in mind the following exceptions
to information in this part of the book.
- An exec that runs outside of a TSO/E address space cannot include TSO/E commands, ISPF commands, or ISPF/PDF edit commands. An exec that runs outside of a TSO/E address space can include TSO/E commands if you use the TSO/E environment service (see note).
- An exec that runs outside of TSO/E cannot include most of the TSO/E external functions. For information about the functions you can use in TSO/E and non-TSO/E address spaces, see Services Available to REXX Execs.
- In TSO/E, several REXX instructions either display information
on the terminal or retrieve information that the user enters at the
terminal. In a non-TSO/E address space, these instructions get information
from the input stream and write information to the output stream.
- SAY — this instruction sends information to the output DD whose default is SYSTSPRT.
- PULL — this instruction gets information from the input DD whose default is SYSTSIN.
- TRACE — this instruction sends information to the output DD whose default is SYSTSPRT.
- PARSE EXTERNAL — this instruction gets information from the input DD whose default is SYSTSIN.
- An exec that runs outside of TSO/E cannot interact with CLISTs.
Note: You can use the TSO/E environment service, IKJTSOEV, to
create a TSO/E environment in a non-TSO/E address space. If you run a REXX exec in the TSO/E
environment you created, the exec can contain TSO/E commands, external functions, and services that
an exec running in a TSO/E address space can use. That is, the TSO host command environment (ADDRESS
TSO) is available to the exec with some limitations. For more information about the TSO/E environment service, limitations on the environment it creates,
and the different considerations for running REXX execs within the environment, see z/OS TSO/E Programming Services.