Specifying Record or Indicator Mode - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.20
Published
October 2018
Language
English (United States)
Last Update
2020-02-20
dita:mapPath
kil1527114222313.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

By default, BTEQ initializes in Field Mode to support interactive operations. Field Mode is defined as: Both the RECORDMODE and INDICATORMODE command options are set to OFF. There is no corresponding FIELD command to specify the Field Mode.

However, Record or Indicator Mode can be used in interactive operations such as when testing scripts or macros that send responses to an export file. This displays the data on the terminal screen rather than sending the data to the export file. A “hex-dump” style output is generated. Leading asterisks might be placed in the results to indicate the end of a sequential set of result lines that are identical. For example, the asterisk following 2710 in the fourth line below indicates that the lines for 0010 through 2700 are identical.

*** Record#1. Dump of Data:
0000  0030 3510 2700 0000  0000 00AA BBCC 0000  *.05.'...........*
0010  0000 0000 0000 0000  0000 0000 0000 0000  *................*
2710 *0000 0000 0000 0000  DDEE FF              *...........*
Normally, Record Mode or Indicator Mode is specified in batch operations when performing the following tasks:
  • Using the BTEQ EXPORT command to direct output data from the Teradata Database to an export file either for reloading later or for transfer to another system.
  • Using the BTEQ IMPORT command to direct input data from a client system file to a Teradata Database.

Example – Record or Indicator Mode

Use the following BTEQ RECORDMODE or INDICATORMODE commands to specify Record or Indicator Mode. If the return data might have null values, use the INDICATORMODE command; if not, use the RECORDMODE command.
.SET RECORDMODE ON

or

.SET INDICATORMODE ON

Note that all of the fetched data gets returned. Unless displaying all of the return data, use the BTEQ RETCANCEL and RETLIMIT commands, as described in the following subsection, to limit the size of the display.

To return to Field Mode and resume normal batch operations, use the appropriate command to discontinue Record or Indicator Mode:

.SET RECORDMODE OFF

or

.SET INDICATORMODE OFF