Types of Bteq commands
Commands Over view:

                       BTEQ commands in Teradata provide great flexibility.

They can be used in four levels of controls.

1.Session Control  Examample :Logon, Quit
2.File Control          Example  : IMPORT,EXPORT
3.Sequence Control    Example: If Else
4. Format Control  :  Format,Suppress

Bteq Commands Notes:

Ø  All Bteq commands must be preceded by a dot ‘.’ Character
Ø  BTEQ cmds may end with a semicolon ‘ ; ’
Ø  Any cmd that does not start with a dot is assumed to be a DBC/SQL query and it will be submitted to the DBC/1012.
Ø  Bteq cmds may be executed in a DBC/SQL macro by using the ECHO statemenet,

For example, 
                       ECHO  ‘.HELP BTEQ’;

  A)   Commands for Session Control:

    1)    Abort:  Abort any and all active running requests and transactions, but do not exist in BTEQ

    2)    Defaults: Reset all  the BTEQ format command options to their defaults. This will use the default configurations.

    3)    Exit:  Immediately end the current session or sessions and exit BTEQ.

    4)    Halt Excution: Abort any and all active running requests and transactions and EXIT BTEQ

   5)    LogOff: End the current session or sessions, but do not exit BTEQ

   6)    LogOn:  Starts a BTEQ Session. Every user, Application, or Utility have to  LOGON to Teradata to start a session.

    7)    Quit:  End the current session or sessions and exit BTEQ

    8)    Security: Specifies the security level of messages between a network-attached system and the Teradata Database.

    9)    Sessions:  Specifies the no.of sessions to use with the next LOGON Command.

    10) Session CharSet: Specifies the name of a character set for the current session or sessions

   11) Session SqlFlag: Specifies a disposition of warnings issued in response to violations of syntax. The SQL will still run, but a warning message will be provided. The Four settings are given as FULL, INTERMEDIATE, ENTRY, and NONE.

   12) Session Transaction:  Specifies whether transaction boundaries are determined by Teradata Sql or ANSI Sql semantics

   13) Show Controles: Displays all of the BTEQ control command options currently configured

   14) Show Versions: Displays the BTEQ software release versions

   15) TDP: Used to specify the correct Teradata Server for Logons for a particular session.

B) Commands for File control:
These commands will govern incoming and outgoing information.

1)CMS: Excute a VM CMS command inside the BTEQ environment.

2)ErrorOut: Write error messages to a specific output file.

3)Export: Open a file with a specific format to transfer information directly from the Teradata Database

4)Halt Excution: Abort any and all active running requests and transactions and EXIT BTEQ.

5) Format: Enable/Inhibit the page-oriented format command options.

6) Import: Open a file with a specific format to Import Information into teradata.

7) IndicData: One of multiple data mode options for data selected from Teradata. The mode are INDICDATA, FIELD, or RECORD MODE.

8) OS: Excute an MS-DOS, PC-DOS, Or UNIX command from inside BTEQ.

9) Quiet: Limit BTEQ output displays to all error messages and request processing statistics.

10) Repeat: Submit the next  Request a certain amount of times.

11) Run: Excute teradata Sql requests and Bteq commands directly from a specified run file.


12) TSO: Excute an MVS TSO command from Inside the BTEQ Environment.