z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the tso command

z/OS UNIX System Services User's Guide
SA23-2279-00

To run a TSO/E command from the shell or in a shell script, you may preface the TSO/E command with the tso shell command; for example:
tso -t tso_command
There are two options you can use:
  • Specify the -t option to run a command through the TSO/E service routine. The command output is written to stdout. If you specify a relative pathname, the command looks for the file in your current directory.
    Restrictions: TSO/E has some restrictions on the type of commands that can be run using the TSO/E service routine (mini-TSO environment). In summary, you cannot run the following commands in this environment:
    • Commands that run authorized
    • FIB (foreground initiated background) commands
    • Other commands that require the TSO/E task structure, i.e., interactive commands such as oedit, where interactive means that the user can interact with the command processing while issuing additional terminal input (subcommands, function keys). For example, once the oedit command is entered, the user can enter additional subcommands to add more lines and then quit or exit the command.
    For a full description of the restrictions, see the information on IKJTSOEV in z/OS TSO/E Programming Guide.
  • Specify the -o option to run a TSO command as if it had been entered on the OMVS command line and run using the TSO subcommand or function key. If you use a relative pathname, the command looks for the file in the working directory of your TSO/E session, which is typically your home directory.

If no option is specified, the following rules are applied in this order:

  1. If stdout is not a tty, the TSO service routine is used since it is possible that the command output is redirected to a file or piped to another command. Otherwise,
  2. If the controlling tty supports 3270 pass-through mode, OMVS is used. Otherwise,
  3. The TSO service routine is used.

See Understanding standard input, standard output, and standard error for more information about stdin, stdout, and stderr.

The tso command supports several environment variables. For more information about the tso command and the environment variables associated with it, seez/OS UNIX System Services Command Reference.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014