In response to the BTEQ commands and Teradata SQL statements, BTEQ produces two kinds of output:
- Error messages
- Output data
By default, Mainframe BTEQ writes both error messages and output data to the stdout (SYSPRINT) stream, while Workstation BTEQ writes output data to the stdout stream and error messages to the stderr stream. These streams are then directed to either the user terminal or some other device, according to the file definitions that are in effect when BTEQ is invoked.
The ERROROUT command allows a user to direct error messages either to the stdout or stderr streams. For example:
.errorout stderr *** Error messages now directed to STDERR.
Before submitting an ERROROUT STDERR command through Mainframe BTEQ, the user must define the ddname of SYSTERM for the STDERR device in the JCL or use the BTEQ TSO command.