UNICODE
The UNICODE function returns the Unicode UTF-16 code value of the leftmost character of the argument as an integer.
The schema is SYSIBM.
string-expression can be of any built-in string data type that is not a LOB.
The argument can also be a numeric data type. The numeric argument is implicitly cast to a VARCHAR data type.
If the argument is ASCII, EBCDIC, or Unicode UTF-8, it is first converted to a Unicode UTF-16 string (CCSID 1200) before the function is executed.
The result of the function is an INTEGER.
The result can be null; if the argument is null, the result is the null value.
Example: The following example returns the Unicode value of as an integer and assigns the value to the host variable hv:
Set :hv = UNICODE('');hv is set to an integer with a value '23792'.