In response to the BTEQ commands and Teradata SQL statements, BTEQ produces two kinds of output:
- Error messages
- Output data
Normally, by default, BTEQ writes both error messages and output data to the standard STDOUT file. From there, the output is directed to either the user terminal or some other device, according to the file definitions that are in effect when BTEQ is invoked.
By using the BTEQ ERROROUT command, the user can direct the error messages to some other file or device using the STDERR file. Before doing so, however, the user must define the ddname of SYSTERM for the STDERR device in the JCL before logging on to BTEQ, or by using the BTEQ TSO command.
Then, to specify a different output file for error messages, enter the ERROROUT command as follows:
.errorout stderr *** Error messages now directed to STDERR.