TSO Command | Basic Teradata Query - TSO - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

Purpose

Submits a command to the z/OS interactive TSO environment.

For Workstation BTEQ, see BTEQ's OS command.

Syntax



where the following is true:

tso_command
Any TSO command or program

Usage Notes

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 of 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 an 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 an SQL macro appears as follows:

ECHO '.TSO ALLOC DDNAME';