How to Identify the Script as the Standard Input File | Basic Teradata Query - Identifying the Script as the Standard Input File - Basic Teradata Query

Basic Teradata® Query Reference

Product
Basic Teradata Query
Release Number
17.10
Published
February 2022
Language
English (United States)
Last Update
2022-02-03
dita:mapPath
nnw1608578382132.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

After creating and saving a script file, it must be identified as the standard input or SYSIN file before invoking BTEQ.

System Type Description
Mainframe-attached systems Use the BTEQ TDSBTEQ JCL procedure or a DD statement in a standard JCL file.
Workstation-attached systems* Use the following command syntax at the system prompt:

BTEQ < SAMPFILE

where < identifies SAMPFILE as the standard input file.

*The use of the -c and -e command line options or the “charset_id” value in the clispb.datfile is highly recommended when a Unicode input file is used. Otherwise, BTEQ interprets the input file as Unicode and sets the session character set accordingly, as follows. BTEQ checks the input file for a UTF-16 or UTF-8 BOM and automatically changes the session character set to the appropriate Unicode encoding. The endianness (16-bit output) syntax of a UTF-16 BOM must match that of the machine BTEQ is running on. If a BOM-less UTF-16 input file is used, BTEQ validates the first character and automatically changes the session character set to UTF16. Note that BTEQ does not automatically change the session character set for a BOM-less UTF-8 input file. If none of the above apply, BTEQ detects the input file is not a Unicode file and defaults the session character set to ASCII.