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.
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
|
UTF8 | 3
Also, when UTF-8 is specified, each character in Mechanism-data-ptr requires between one and three bytes. |
UTF16 | 4
Also, when UTF-16 is specified, each character in Mechanism-data-ptr requires two bytes. |