Character String Padding - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

C strings are padded differently in the Teradata compatible and ANSI compatible environments, as shown in the next table.

 

TRANSACT Mode

Padding Character

ANSI

blanks

Teradata

  • BTET
  • COMMIT
  • 2PC
  • nulls

    For example, consider the following comparison in which the EBCDIC string ABCDE is fetched into a host variable defined as char[7].

     

    TRANSACT Mode

    Host Variable Data

    ANSI

    X’C1C2C3C4C54000’

    Teradata

  • BTET
  • COMMIT
  • 2PC
  • X’C1C2C3C4C50000’

    The ANSI string is padded with blanks, while the non-ANSI string is padded with nulls. The process is similar for ASCII strings.