As described above, you can run REXX execs in any MVS™ address space (both TSO/E and non-TSO/E).
Execs that run in TSO/E can use several TSO/E external functions,
commands, and programming services that are not available to execs
that run in a non-TSO/E address space. Writing execs that run in the TSO/E address space describes
writing execs for TSO/E.
If you write a REXX exec that will run in a non-TSO/E address space,
you can use the following in the exec:
- All keyword instructions that are described in Keyword instructions
- All built-in functions that are described in Functions.
- The TSO/E external functions SETLANG and STORAGE. See TSO/E external functions for more information.
- The following TSO/E REXX commands:
- MAKEBUF - to create a buffer on the data stack
- DROPBUF - to drop (discard) a buffer that was previously created
on the data stack with the MAKEBUF command
- NEWSTACK - to create a new data stack and effectively isolate
the current data stack that the exec is using
- DELSTACK - to delete the most current data stack that was created
with the NEWSTACK command
- QBUF - to query how many buffers are currently on the active data
stack
- QELEM - to query how many elements are on the data stack above
the most recently created buffer
- QSTACK - to query the number of data stacks that are currently
in existence
- EXECIO - to read data from and write data to data sets. Using
EXECIO, you can read data from and write data to the data stack or
stem variables.
- TS (Trace Start) - to start tracing REXX execs. Tracing lets
you control exec processing and debug problems.
- TE (Trace End) - to end tracing of REXX execs
- SUBCOM - to determine whether a particular host command environment
is available for the processing of host commands.
The commands are described in TSO/E REXX commands.
- Invoking an exec
You can invoke another REXX exec from an
exec using the following instructions (the examples assume that the
current host command environment is MVS):
"execname p1 p2 ..."
"EX execname p1 p2 ..."
"EXEC execname p1 p2 ..."
See Commands to external environments about using host commands in a
REXX exec.
- Linking to and attaching programs
You can use the LINK, LINKMVS,
and LINKPGM host command environments to link to unauthorized programs.
For example:
ADDRESS LINK "program p1 p2 ..."
You
can use the ATTACH, ATTCHMVS, and ATTCHPGM host command environments
to attach unauthorized programs. For example:
ADDRESS ATTACH "program p1 p2 ..."
For
more information about linking to and attaching programs, see Host command environments for linking to and attaching programs.
- TSO/E REXX programming services.
In any address space, you
can use the REXX programming services, such as IRXEXEC and IRXJCL,
IRXEXCOM, and IRXIC. The services are described in TSO/E REXX programming services.