Globalized input and output support functions

The input( ) and output( ) support functions convert the opaque data type from its internal to an external representation, and vice versa.

The internal representation of an opaque data type is the C structure that stores the opaque-type data. Each opaque type also has a character-based format, known as its external representation, which is received by the database server as an LVARCHAR value. This can hold single-byte (ASCII and non-ASCII) and multibyte character strings, depending on the locale of the client application. (The data length of an LVARCHAR external representation is limited only by the operating system, not by the 32,739 byte maximum size of LVARCHAR columns in HCL OneDB™ databases.)

Client applications perform code-set conversion on LVARCHAR data types. The ability to transfer the data between a client application and database server, however, is not sufficient to support locale-sensitive data in opaque data types. It does not ensure that data values are correctly manipulated at the destination.

The input() and output() support functions convert the opaque data type as follows:
  • The input() function converts the external representation of the data type to the internal representation.
  • The output() function converts the internal representation of the data type to the external representation.
Opaque-type support functions written as C UDRs must ensure that these functions correctly handle any locale-sensitive data, including these tasks.
Locale-sensitive task For more information
Any code-set conversion on character data Code-set conversion and the DataBlade API
Any handling of multibyte or wide characters in character data The HCL OneDB GLS library
Any formatting of locale-specific date, numeric, or monetary data Locale-specific data formatting