The TSO command environment
address tso [command] where command can
be any TSO/E command, CLIST, or REXX exec that can run in a batch
TSO terminal monitor program (TMP).Commands that are addressed to TSO are run in a TSO terminal monitor program (TMP) that is running in a separate address space and process from your REXX program. This provides you with the capability to run TSO commands. You cannot use TSO commands to affect your REXX environment, or to have REXX statements or other host command environments affect your TSO process.
The TSO process is started when the first TSO/E command is run, and persists until your REXX program terminates or you run the TSO LOGOFF command. You can use the ps shell command to observe this process as the program bpxwrtso. Unexpected termination of the TSO process causes the next TSO command to fail with return code 16. A subsequent command starts a new TSO process.
Specifying environment variable BPXWRFD in a REXX program before the TSO process is started causes the TSO process to inherit open file descriptors. This inheritance stays in effect as long as the TSO process is active. To remove this inheritance, unset BPXWRFD and stop the TSO process; for example, by issuing ADDRESS TSO LOGOFF. Subsequent ADDRESS TSO commands will then start with a new TSO process, and file descriptors will not be inherited.
- If the value of the environment variable is YES, open file descriptors 10 through 99 are inherited.
- If the value of the environment variable is a numeric value N, open file descriptors 10 through N are inherited.