Both the DataBlade API library and the ESQL/C library provide functions that convert the binary representation for DECIMAL (mi_decimal) or MONEY (mi_money) values.
The DataBlade API library provides the following functions that convert between a text (string) representation of a decimal or monetary value and its binary (internal) equivalent.
The mi_decimal_to_string( ), mi_money_to_string( ), mi_string_to_decimal( ), and mi_string_to_money( ) functions are useful in the input and output support function of an opaque data type that contains mi_decimal or mi_money values. They allow you to convert fixed-point (DECIMAL or MONEY) values between their external format (text) and their internal format (dec_t) when transferred to and from client applications. For more information, see Conversion of Opaque-Type Data Between Text and Binary Representations.
The mi_decimal_to_string( ), mi_money_to_string( ), mi_string_to_decimal( ), and mi_string_to_money( ) functions use the current processing locale to handle locale-specific formats in the decimal or monetary string. For more information, see the IBM Informix: GLS User's Guide.
The ESQL/C function library provides the following functions to convert a DECIMAL (or MONEY) value to and from some C-language data types.