Field Mode Translation of Control Characters | Basic Teradata Query - Field Mode Translation of Control Characters - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-06-12
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

For Field Mode only, to ensure printability of columnar reports, BTEQ translates certain control characters found in database response data to spaces, based on the OS platform and the encoding of the output. The following table reflects which characters will get translated.

Field Mode output can be written to either stdout or an export report file.
Platforms Control Characters Translated to Spaces
Workstation For non-UTF16 encodings, the following control characters are translated to spaces (0x20):
  • 0x00 - 0x1F : The first 32 characters in the ASCII table
  • 0x7F : Del
For a UTF16 encoding, the following control characters are translated to spaces (U+0020):
  • U+0000 - U+001F : The first 32 characters in the Unicode table
  • U+007F : Del

Exception: The horizontal tab character (0x09 and U+0009) is translated to a space only for data rows, and not for title rows, regardless of the output encoding.

z/OS For non-Unicode encodings, the following control characters are translated to spaces (0x40). This is always the case for SYSPRINT:
  • 0x00 : Nul
  • 0x0B : Vertical tab
  • 0x0C : Form feed
  • 0x0D : Carriage return
  • 0x15 : Newline
  • 0x16 : Backspace

For a UTF8 export report, the following control characters are translated to spaces (0x20):

  • 0x00 : Nul
  • 0x08 : Backspace
  • 0x0B : Vertical tab
  • 0x0C : Form feed
  • 0x0D : Carriage return

For a UTF16 export report, the following control characters are translated to spaces (U+0020):

  • U+0000 : Nul
  • U+0008 : Backspace
  • U+000B : Vertical tab
  • U+000C : Form feed
  • U+000D : Carriage return
  • For encodings that support multi-byte characters, individual bytes within those characters are not subject to space translations. For example, in UTF16, the U+CF00 character is not converted to U+CF20 because the 0x00 byte is part of a valid multi-byte character.
  • Use TRANSLATECTRLSTOSPACES OFF to inhibit the translation of control characters to spaces for Field Mode columnar report's data rows (non-title) bound for stdout or an EXPORT REPORT file. For more information, see TRANSLATECTRLSTOSPACES (TCTS).
  • Use TRANSLATECTRLSTOSPACES OFF ALL to turn off the translation for Field Mode report's data rows as well as title rows bound for stdout or an EXPORT REPORT file. For more information, see TRANSLATECTRLSTOSPACES (TCTS).