Field Mode Translation of Control Characters

Basic Teradata Query Reference

brand
Teradata Tools and Utilities
prodname
Basic Teradata Query
vrm_release
16.20
category
Programming Reference
featnum
B035-2414-108K

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 table below reflects which characters will get translated.

Field Mode output can be written to either stdout or an export report file.
Platforms Control Characters That Get 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 columnar report's data rows (non-title) bound for stdout or an EXPORT REPORT file. See TRANSLATECTRLSTOSPACES for details.