ERROROUT - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

ERROROUT

Purpose  

Routes the standard error stream and the standard output stream to two files or devices for mainframe-attached systems, or to one file or device for workstation-attached client systems.

Syntax  

where:

 

Syntax Element

Directs Error Messages to

STDERR

Default and normal output file for workstation-attached client systems, called STDERR

STDOUT

Default and normal output file for mainframe-attached systems, called STDOUT

Usage Notes  

The ERROROUT command affects error and output streams differently for mainframe-attached client and workstation-attached systems.

Specifying STDERR on a mainframe-attached system, causes errors and output to split into two separate files or devices.

When specifying STDOUT on a workstation-attached system, both STDERR and STDOUT merge to one file or device.

Note: PC users can direct errors and output to one file or device by specifying STDOUT.

Note: If STDERR is specified in a z/OS batch environment on a mainframe-attached system, BTEQ writes error messages to the ddname SYSTERM. If STDERR is specified in a z/OS/TSO environment, BTEQ displays error messages on the terminal.

The ERROROUT command is valid in a Teradata SQL macro.

Example  

In this example, the standard error stream and standard output stream on a mainframe-attached system are directed to one file:

   BTEQ -- Enter your Teradata SQL request or BTEQ command: 
   .set errorout stderr
   .set errorout stderr
   *** Error messages now directed to STDERR.

Example  

To have a Teradata SQL macro issue the ERROROUT command, embed it within the string portion of an SQL ECHO statement as follows:

   ECHO '.SET ERROROUT STDERR';