How to Specify a Standard Error Output File | Basic Teradata Query - Specifying a Standard Error Output File - 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

By default, Mainframe BTEQ writes error messages to the standard output file (stdout), while Workstation BTEQ writes error messages to the standard error output file (stderr). This is controlled by the ERROROUT setting. For more information about specifying a standard error output file, see Error Handling and ERROROUT (EO).

Depending on the system configuration, a standard error output file can be specified either when BTEQ is invoked or before logging on a database user.

Use the following table to specify a standard error output file:

System Type Error Output File
Mainframe-attached Use either the BTEQ TDSBTEQ JCL procedure or a DD statement in a standard JCL file to define the ddname of SYSTERM for the STDERR device before invoking BTEQ.

Also use the BTEQ TSO command to define the ddname of SYSTERM for the STDERR device.

Workstation-attached For most shells, use 2> or 2>&1 when BTEQ is invoked to redirect stderr to a file.

For C shell, use >& when BTEQ is invoked to redirect stderr to a file.