16.20 - Mechanism-data-encoding - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

prodname
Teradata Tools and Utilities
vrm_release
16.20
created_date
September 2019
category
Programming Reference
featnum
B035-2417-108K

If additional data is required by the specified Mechanism-name, Mechanism-data-encoding optionally specifies the character set of the area addressed by Mechanism-data-ptr. If Mechanism-data-ptr is not specified, this option is validated but not otherwise processed. While the data may be encoded in any supported session character set, if overridden by this option, only UTF-8 and UTF-16 can be specified.

Mechanism-data-encoding exists only when DBCHINI had been called for a DBCAREA with Total-length set to at least 640 (that is, the returned DBCAREA Level value is at least 1). For a smaller DBCAREA, Mechanism-data-encoding is ignored.

Logon mechanisms are currently not supported for a mainframe-connected system.
In this language... The variable name for Mechanism-data-encoding is...
COBOL MECHANISM-DATA-ENCODING
PL/I MECHANISM_DATA_ENCODING
C, C++ mechanismDataEncoding
IBM Assembler DBCNIME
This routine... Does this for Mechanism-data-encoding...
DBCHINI writes
DBCHCL reads (CON)
Mechanism-data-encoding is used by... To...
applications write

One of the following numeric values can be set before establishing a connection:

Value Used Mechanism-data-encoding Settings and Mneumonics
Session character set default 0
  • SESSION for COBOL
  • DBC_MECH_CODING_SESSION for PL/I
  • DBC_MechCodingSession for C and C++
  • DBCNIMES for Assembler
UTF8 3
  • UTF8 for COBOL
  • DBC_MECH_CODING_UTF8 for PL/I
  • DBC_MechCodingUTF8 for C and C++
  • DBCNIMET for Assembler

Also, when UTF-8 is specified, each character in Mechanism-data-ptr requires between one and three bytes.

UTF16 4
  • UTF16 for COBOL
  • DBC_MECH_CODING_UTF16 for PL/I
  • DBC_MechCodingUTF16 for C and C++
  • DBCNIME2 for Assembler


Also, when UTF-16 is specified, each character in Mechanism-data-ptr requires two bytes.