SHOW CONTROLS - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

SHOW CONTROLS

Purpose  

Displays the current value for all BTEQ settings or for a specific BTEQ setting.

Syntax  

 

<cmd>

CHARSET

LOGONPROMPT

RUN

DECIMALDIGITS

MAXERROR

SEPARATOR

ECHOREQ

MESSAGEOUT

SESSION CHARSET

ENCRYPTION

NOTIFY

SESSION RESPBUFLEN

ERRORLEVEL

NULL

SESSION SQLFLAG

EXPORT

OMIT

SESSION TRANSACTION

EXPORTEJECT

PACK

SESSION TWORESPBUF

FOLDLINE

PAGELENGTH

SESSIONS

FOOTING

PREPAREMODE

SIDETITLES

FORMAT

PAGEBREAK

SKIPDOUBLE

FORMCHAR

QUIET

SKIPLINE

FULLYEAR

RECORDMODE

SUPPRESS

HEADING

REPEAT

TDP

IMPORT

REPEATSTOP

TIMEMSG

INDICATORMODE

REPORTALIGN

TITLEDASHES

LARGEDATAMODE

RETCANCEL

UNDERLINE

LIMITS

RETLIMIT

WIDTH

LOGMECH

RETRY

 

LOGON

RTITLE

 

Usage Notes  

Use the SHOW CONTROLS command to verify the BTEQ format settings that users control. (The QUIET command does not suppress the SHOW CONTROLS display.)

Note: The command SHOW, used without any options, displays the last SQL statement.

The SHOW CONTROLS command can be used in a Teradata SQL macro.

Optionally, the SHOW CONTROLS command can be used at the settings level.

For example, SHOW CONTROLS <cmd>; where "cmd" can be any setting that is reflected in the show controls as [SET] <cmd> = <value>.

The keyword “limits” can be used at the settings level with the SHOW CONTROLS command. SHOW CONTROLS lists the predefined defaults, minimums and maximums for applicable settings like Maximum number of sessions or the Maximum request size.

The line “Client Platform Byte Order” in the output of the SHOW CONTROLS command depicts the endianness type of the client machine. The key phrase “byte order” used with the SHOW CONTROLS command displays the output at the settings level.

Example  

To see the current value of all controls, specify:

   .SHOW CONTROLS

BTEQ Response

Mainframe- and workstation-attached systems return different information.

Following is an example of the information returned when using BTEQ for z/OS:

 .show controls ;
     Default Maximum Byte Count          = 1048500
     Default Multiple Maximum Byte Count = 2048
     Current Response Byte Count         = 32725
     Maximum number of sessions          = 200
     Maximum request size                = 32725
     Maximum IMPORT/USING data size      = 32725
     Maximum number of returnable columns= 2048
     Maximum number of WITH clauses      = 10
     Maximum number of times in a REPEAT = 2147483647
     Maximum number of script files      = 30
     Maximum number of lines in a TITLE  = 10
     Maximum number of lines per page    = 2147483407
     Maximum string length               = 254
     Maximum number of WIDTH in a report = 65531
     Minimum number of WIDTH in a report = 20
 
     Maximum Notify MSG text Byte Count  = 254
     Maximum number of bytes saved for
     SUPPRESS, PAGEBREAK, SKIPLINE,
     UNDERLINE, or SKIPDOUBLE commands,
     or for &n substitutions             = 256
 
     Client Platform Byte Order          = BIG ENDIAN
 
     EXPORT  RESET
     IMPORT  RECORD
     LOGMECH                 = default
     LOGON
     REPEAT                  = 1
     RUN
     [SET] AUTOKEYRETRIEVE   = OFF
     [SET] DECIMALDIGITS     = 0 (SPB DEFAULT)
     [SET] ECHOREQ           = ON
     [SET] ENCRYPTION        = OFF
     [SET] ERRORLEVEL        = ON
     [SET] EXPORTEJECT       = ON
     [SET] FOLDLINE          = OFF ALL
     [SET] FOOTING           = NULL
     [SET] FORMAT            = ON
     [SET] FORMCHAR          = DEFAULT
     [SET] FULLYEAR          = OFF
     [SET] HEADING           = NULL
     [SET] INDICATORMODE = OFF
     [SET] LARGEDATAMODE     = OFF
     [SET] MAXERROR          = OFF
     [SET] NOTIFY            = OFF
     [SET] NULL              = ?
     [SET] OMIT              = OFF ALL
     [SET] PACK              = 0
     [SET] PAGEBREAK         = OFF ALL
     [SET] PAGELENGTH        = 55
     [SET] PREPAREMODE       = OFF
     [SET] QUIET             = OFF
     [SET] RECORDMODE        = OFF
     [SET] REPEATSTOP        = OFF
     [SET] RETCANCEL         = OFF
     [SET] RETLIMIT          = Rows: No Limit  Columns: 100
     [SET] RETRY             = ON
     [SET] RTITLE            = NULL
     [SET] SEPARATOR         = two blanks
     [SET] SESSION CHARSET        = EBCDIC
           import/export encoding = EBCDIC
           stdin/stdout encoding  = EBCDIC
     [SET] SESSION RESPBUFLEN  = 32767
     [SET] SESSION SQLFLAG   = NONE
     [SET] SESSION TRANSACTION = Unknown
     [SET] SESSION TWORESPBUFS = ON
     [SET] SESSIONS          = 1
     [SET] SIDETITLES        = OFF for the normal report.
           And, it is   ON for results of WITH clause number: 1 2 3 4 5 6 7 8 9 10.
     [SET] SKIPDOUBLE        = OFF ALL
     [SET] SKIPLINE          = OFF ALL
     [SET] SUPPRESS          = OFF ALL
     [SET] TDP               = NULL
     [SET] TIMEMSG           = DEFAULT
     [SET] TITLEDASHES       = ON for the normal report.
           And, it is   ON for results of WITH clause number: 1 2 3 4 5 6 7 8 9 10.
     [SET] UNDERLINE         = OFF ALL
     [SET] WIDTH             = 75

Resetting Defaults by Logging Off

The LOGON and LOGOFF commands do not reset the format command default values. If logging off from the initial BTEQ session and then using another LOGON command, the resulting sessions inherit the format command values from the prior session. The DEFAULTS command must be used to reset the format commands to their initial default values.

The only times the format commands are at the values listed above are when the first LOGON command is executed after invoking BTEQ, and when the DEFAULTS command is used.

The following list shows the initial default condition of BTEQ at the first LOGON. When the DEFAULTS command are used, it resets these formats to the initial default value.

where:

 

Control Element

Specification

Default Maximum Byte Count

Default starting size of the request buffer for single-session operations.

Default Multiple Maximum Byte Count

Default starting size of the request buffer for multiple-session operations.

Current Response Byte Count

Current size of the request buffer.

Maximum request size

Absolute maximum size for a request buffer. This is the maximum number of bytes that can be sent to the database for a pre-internal form request.

Example 2

The Example 1 SHOW CONTROLS command in a Teradata SQL macro appears as:

   ECHO '.SHOW CONTROLS'; 

Teradata BTEQ 14.00.00.00 for WIN32. Enter your logon or BTEQ command:

 .show controls ;
     Default Maximum Byte Count          = 1048500 
     Default Multiple Maximum Byte Count = 2048 
     Current Response Byte Count         = 32705 
     Maximum number of sessions          = 200 
     Maximum request size                = 32705 
     Maximum IMPORT/USING data size      = 32705 
     Maximum number of returnable columns= 2048 
     Maximum number of WITH clauses      = 10 
     Maximum number of times in a REPEAT = 2147483647 
     Maximum number of script files      = 30 
     Maximum number of lines in a TITLE  = 10 
     Maximum number of lines per page    = 2147483647 
     Maximum string length               = 254 
     Maximum number of WIDTH in a report = 65531
     Minimum number of WIDTH in a report = 20
    
     Maximum Notify MSG text Byte Count  = 254
     Maximum number of bytes saved for 
     SUPPRESS, PAGEBREAK, SKIPLINE,    
     UNDERLINE, or SKIPDOUBLE commands,
     or for &n substitutions             = 256 
    
     Client Platform Byte Order          = LITTLE ENDIAN
    
     EXPORT  RESET 
     IMPORT  FIELD 
     LOGMECH                 = default
     LOGON   
     MESSAGEOUT FILE=win32.txt
     REPEAT                  = 1
     RUN     
     [SET] AUTOKEYRETRIEVE   = OFF
     [SET] DECIMALDIGITS     = 0 (SPB DEFAULT)
     [SET] ECHOREQ           = ON  
     [SET] ENCRYPTION        = OFF
     [SET] ERRORLEVEL        = ON  
     [SET] FOLDLINE          = OFF ALL
     [SET] FOOTING           = NULL   
     [SET] FORMAT            = OFF
     [SET] FORMCHAR          = OFF
     [SET] FULLYEAR          = OFF
     [SET] HEADING           = NULL   
     [SET] INDICATORMODE = OFF
     [SET] LARGEDATAMODE     = OFF
     [SET] LOGONPROMPT       = ON
     [SET] NOTIFY            = OFF
     [SET] NULL              = ?   
     [SET] OMIT              = OFF ALL
     [SET] PACK              = 0
     [SET] PAGEBREAK         = OFF ALL
     [SET] PAGELENGTH        = 55   
     [SET] PREPAREMODE       = OFF
     [SET] QUIET             = OFF   
     [SET] RECORDMODE        = OFF
     [SET] REPEATSTOP        = OFF  
     [SET] REPORTALIGN       = COMPATIBLE
     [SET] RETCANCEL         = OFF  
     [SET] RETLIMIT          = Rows: No Limit  Columns: 100 
     [SET] RETRY             = ON
     [SET] RTITLE            = NULL
     [SET] SEPARATOR         = two blanks
     [SET] SESSION CHARSET        = ASCII
           import/export encoding = ASCII
           stdin/stdout encoding  = ASCII
     [SET] SESSION RESPBUFLEN  = 8192 
     [SET] SESSION SQLFLAG   = NONE
     [SET] SESSION TRANSACTION = Unknown
     [SET] SESSION TWORESPBUFS = ON
     [SET] SESSIONS          = 1
     [SET] SIDETITLES        = OFF for the normal report.
           And, it is   ON for results of WITH clause number: 1 2 3 4 5 6 7 8 9 10.
     [SET] SKIPDOUBLE        = OFF ALL
     [SET] SKIPLINE          = OFF ALL
     [SET] SUPPRESS          = OFF ALL
     [SET] TDP               = dbc
     [SET] TIMEMSG           = DEFAULT
     [SET] TITLEDASHES       = ON for the normal report.
           And, it is   ON for results of WITH clause number: 1 2 3 4 5 6 7 8 9 10.
     [SET] UNDERLINE         = OFF ALL
     [SET] WIDTH             = 75