15.10 - Character String Padding - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

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.