z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The TSO command environment

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

The TSO command environment (ADDRESS TSO) can be used from a z/OS UNIX REXX environment, and is initialized with:
address tso [command]
where command can be any TSO/E command, CLIST, or REXX exec that can run in a batch TSO TMP.

Commands addressed to TSO are run in a TSO 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. It does not provide you with the capability to 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 10 thru 99. This inheritance stays in effect as long as the TSO process is active. Removing this inheritance can be accomplished by unsetting BPXWRFD and stopping 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 10 thru 99 will not be inherited.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014