SHOW ERRORMAP - Basic Teradata Query - 16.20

Basic Teradata Query Reference

prodname
Basic Teradata Query
vrm_release
16.20
category
Programming Reference
featnum
B035-2414-108K

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 details about altering the map, refer to the ERRORLEVEL command.

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 Example 1 SHOW ERRORMAP command in a Teradata SQL macro appears as follows:

ECHO '.SHOW ERRORMAP';