Purpose
Restores initial default settings for commands used to control:
- Report mode output format
- Response data format
- Import process message verbosity
- SQL request retries
Syntax
Usage Notes
The DEFAULTS command does not reset all BTEQ command settings. It only resets those deemed most likely to get used as part of large group of commands issued collectively to establish a particular desired combination state. Rather than having to reissue each command again to undo the settings established, BTEQ provides the DEFAULTS command as a simpler way to accomplish what could typically be the same end result using just one command. To be certain DEFAULTS command use has had the desired effect, the SHOW CONTROLS command can be used to display a specific setting's current value or the following table, which lists the commands which will get their setting state reset, can be referred to.
The EXPORT command settings are not completely reset because an active export is not deactivated. However, an active export's option state is significantly altered by use of the DEFAULTS command. As a result of the default response being reset back to field mode, an active export's data format option will be changed to REPORT and if a NOEJECT option was used from it, that will be changed to EJECT.
If connected to a database, BTEQ will reset the current RECORDLENGTH command settings based on the defaults for that database instead of the original values when BTEQ was first invoked. However, current RECORDLENGTH command settings will not be reset during an active import or export.
BTEQ commands:
- ECHOREQ
- ERROROUT
- EXPORT (altered but not completely reset)
- EXPORTEJECT
- FOLDLINE
- FOOTING
- FOOTING
- FORMAT
- FORMCHAR
- FULLYEAR
- HEADING
- INDICATORMODE
- LARGEDATAMODE
- NULL
- OMIT
- PAGEBREAK
- PAGELENGTH
- PREPAREMODE
- QUIET
- RECORDLENGTH
- RECORDMODE
- REPEATSTOP
- REPORTALIGN
- RETCANCEL
- RETLIMIT
- RETRY
- RTITLE
- SEPARATOR
- SIDETITLES
- SKIPDOUBLE
- SKIPLINE
- SUPPRESS
- TIMEMSG
- TITLEDASHES
- TRANSLATECTRLSTOSPACES
- TRIMTRAILINGSPACES
- UNDERLINE
- WIDTH
Resetting Defaults by Logging Off
The LOGON and LOGOFF commands do not alter format settings. Use the DEFAULTS command to reset format settings to their initial defaults.
The only times that the format commands are the default 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 is used, it resets these formats to the initial default value.
Show controls ; Maximum Instruction Bytes = 32704 Maximum Record Bytes = NA Maximum Request Buffer Bytes = NA Maximum Response Buffer Bytes = NA Maximum Packed Records = NA Activity Count Bytes = NA Maximum Sessions = 200 Maximum Repeat Factor = 2147483647 Maximum String Length = 254 Maximum Report Columns = 2048 Maximum WITH Clauses for a Report = 10 Maximum Report Title Lines = 10 Maximum Report Page Lines = 2147483647 Minimum Report Width = 20 Maximum Report Width = 1048575 Maximum Notify MSG Text Bytes = 254 Maximum Bytes Saved for SUPPRESS, PAGEBREAK, SKIPLINE, UNDERLINE, and SKIPDOUBLE Commands, and for &n Substitutions = 256 Client Platform Byte Order = LITTLE ENDIAN EXPORT RESET IMPORT RESET LOGMECH = default LOGON MESSAGEOUT RESET REPEAT = 1 RUN [SET] AUTOKEYRETRIEVE = OFF [SET] DECIMALDIGITS = 0 (SPB DEFAULT) [SET] ECHOREQ = ON [SET] ENCRYPTION = OFF [SET] ERRORLEVEL = ON [SET] ERROROUT = STDERR [SET] EXITONDELAY = OFF [SET] FOLDLINE = OFF ALL [SET] FOOTING = NULL [SET] FORMAT = OFF [SET] FORMCHAR = OFF [SET] FULLYEAR = OFF [SET] HEADING = NULL [SET] INDICATORMODE (alias INDICDATA) = OFF [SET] LARGEDATAMODE = OFF [SET] LOGONPROMPT = ON [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] RECORDLENGTH = Import/Export: MAX64 Stdout: MAX1MB [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 spaces [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] STATEMENTINDEPENDENCE = OFF [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] TMSMMSG = OFF [SET] TRIMTRAILINGSPACES = ON [SET] UNDERLINE = OFF ALL [SET] WIDTH = 75
Example 1 – Reset Defaults
To reset the BTEQ format commands to their default values, enter the following command:
.SET DEFAULTS
Example 2 – DEFAULTS instigated by a macro
To have a Teradata SQL macro issue the DEFAULTS command, embed it within the string portion of an SQL ECHO statement as follows:
ECHO '.SET DEFAULTS';