SHOW ERRORMAP Command | Basic Teradata Query - SHOW ERRORMAP - Basic Teradata Query

Basic Teradata® Query Reference

Product
Basic Teradata Query
Release Number
17.00
Published
December 2020
Language
English (United States)
Last Update
2020-12-12
dita:mapPath
zqt1544831938740.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Lists BTEQ's severity levels currently mapped for database errors and warning codes.

These severity levels are used to set the ERRORLEVEL status keyword value which in turn gets used as BTEQ's default return code at process exit. For more information about altering the map, see ERRORLEVEL.

Syntax



Usage Notes

Two maps can be listed. The first, labeled "System Error Mapping", reflects the severity levels assigned by default by BTEQ to specific codes. The second, labeled "User Error Mapping", only gets listed when the ERRORLEVEL command has been used to map additional codes.

The mapped severity values can be changed using the ERRORLEVEL command. At the top of the first list, the word "UNKNOWN" appears with a default severity of 8. This is the default severity for all unmapped codes. It can also be changed using the ERRORLEVEL command.

Example 1 – SHOW ERRORMAP

Use the following command to display the contents of the tables that map error codes to severity levels:

.show errormap
.set errorlevel 4155 severity 12
.set errorlevel 4800 severity  8
.show errormap

BTEQ Response

The following is an example of the output of the second .SHOW ERRORMAP command:

SYSTEM ERROR MAPPING
Errorcode     Errorlevel
        1             12
        2             12
        3             12
        4             12
        5             12
        6             12
        7             12
        8             12
        9             12
       10             12
      530              8
     2123              8
     2538              8
     2541              8
     2580              4
     2631              0
     2632              8
     ....              .
     ....              .
     ....              .
     3807              8
     3824              8
     3873              8
     3877              8
     3897              8
     3916              8
    
        USER ERROR MAPPING
     4155             12
     4800              8

Example 2 – SHOW ERRORMAP Instigated By a Macro

The SHOW ERRORMAP command in an SQL macro appears as follows:

ECHO '.SHOW ERRORMAP';