Converts an arithmetic or string value to a wide character string.
WIDECHAR(s)
or
WIDECHAR(s, l)Abbreviation(s): WCHAR for WIDECHAR
s is an arithmetic or string value, and l is a positive integer value.
DECLARE X FIXED BINARY (15); DECLARE Y WIDECHAR (14) VARYING; X = 2; Y = WIDECHAR(X); PUT SKIP LIST (HEXIMAGE(ADDRDATA(Y), LENGTH(Y)*2)); /* 002000200020002000200020002000200032 */
Description
The WIDECHAR function converts an arithmetic or string value s to a wide character string of an optionally specified length l. s is first converted to a wide character string whose length is determined by the rules for data type conversion given in the Data Type Conversions chapter. Then, if i is given, s is either truncated on the right or extended on the right with blanks to be i characters long.