EXIT or QUIT - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
16.00
Published
November 2016
Language
English (United States)
Last Update
2018-04-25
dita:mapPath
hyz1479325149183.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Logs off all Teradata Database sessions and then exits BTEQ. The highest severity value encountered during BTEQ's execution will by default be used as BTEQ's return code value unless an argument is explicitly supplied.

Syntax



where the following is true:

n
A decimal number as the job step return code.

To avoid existing codes, do not use numbers 1 through 10.

status_value_keyword
One of the following status value keywords: ACTIVITYCOUNT, ERRORCODE, ERRORLEVEL, WARNINGCODE or SYSTEMRETURNCODE. SYSTEMRETURNCODE can be specified only when using Windows BTEQ. ACTIVITYCO will also be accepted in place of ACTIVITYCOUNT. See Status Value Keywords for full descriptions of each value.

Usage Notes

The EXIT and QUIT commands are identical. The alternate command name, QUIT, is supplied to enable users to employ stylistic conventions that differentiate normal versus non-normal exit paths in input scripts submitted in batch mode. For example, some users prefer to use QUIT when the BTEQ process exit is to come at the end of an error-handling portion of their input script. Another example is that some users prefer to use an EXIT command after explicit use of the LOGOFF command and use QUIT where a LOGOFF command has not used but sessions might still be logged on.

The EXIT command cannot be used in a Teradata SQL macro.

The maximum value supported for a return code can vary from one vendor's OS to another. This should be taken into consideration when changing default return code behavior to prevent BTEQ from returning possible corrupted values.

Example - EXIT

To exit BTEQ, type:

.EXIT