If you write a REXX program to run in TSO/E, it is likely that
you will have to alter the REXX program to run it in a
z/OS shell environment.
Some of the differences between the two environments that you need
to consider are:
- You can use the spawn syscall command
to run z/OS shell commands
from the TSO/E environment.
- Using the syscalls('ON') function at
the beginning of the REXX program is required in TSO/E, but not in
a z/OS shell environment.
If you use syscalls('ON') in a z/OS shell environment,
it clears the __argv. and __environment. stems.
For this reason, it is not recommended that you use syscalls('ON') in
a z/OS shell environment.
Using syscalls('ON') in a z/OS shell environment
also sets up the REXX predefined variables and blocks all signals. On
entry to a REXX program in a z/OS shell environment,
the REXX predefined variables are already set.
- In TSO/E, the syscalls('OFF') function
ends the process, but the REXX program continues to run. In the z/OS shells, the syscalls('OFF') function
undubs the task and the REXX program continues.
- PARSE SOURCE returns different tokens in TSO/E and in a z/OS shell environment.
A REXX program uses the tokens to determine how it was run.
- In TSO/E, the variables __argv.0 and __environment.0 are
set to zero (0).
See The TSO command environment for information about
running TSO/E commands from a REXX program.