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 the following is true:
- 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.
The ERROROUT command is valid in a Teradata SQL macro.
Example 1 – ERROROUT
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 2 – ERROROUT instigated by a macro
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';