Submits a TSO command in z/OS TSO only. Not valid on workstation-attached systems.
where the following is true:
- Any TSO command or program
Use the TSO command to allocate files, list catalogs, or perform other TSO activities. The TSO command requires an interactive TSO environment. The command cannot be run within a z/OS batch environment, regardless if the TSO terminal monitor program (TMP) is being used or not.
BTEQ removes all trailing semicolons before submitting the command.
The TSO command can be used in a Teradata SQL macro, but only for one command at a time.
For consistency with BTEQ's OS command behavior, the return code from the last submitted system call through TSO command use also gets stored in the SYSTEMRETURNCODE status value. But since the TSO command can only be used interactively, the ability to refer to that keyword has insignificant value for mainframe BTEQ users.
Example 1 – TSO
To allocate a file named ABC, specify the following:
.TSO ALLOC DDNAME(ABC) DSNAME(ABC) SHR
Example 2 – TSO instigated by a macro
The Example 1 TSO command in a Teradata SQL macro appears as follows:
ECHO '.TSO ALLOC DDNAME';