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. |