BINTOSTR( ) function

Returns Unicode character data converted from ZONED or EBCDIC character data. Abbreviation for "Binary to String".

Note

This function is specific to the Unicode edition of Analytics. It is not a supported function in the non-Unicode edition.

Syntax

BINTOSTR(string, string_type)

Parameters

Name Type Description
string character The ZONED or EBCDIC value that you want to convert to Unicode character encoding.
string_type character

The format to convert from. You must specify one of the following values:

  • "A" – convert from ZONED (ASCII) data
  • "E" – convert from EBCDIC data

Output

Character.

Examples

Basic examples

The expression ZONED(-6448,4) converts the value -6448 to the character format "644Q", however the Unicode edition of Analytics requires that you convert the output of ZONED( ) to Unicode characters using BINTOSTR( ).

Returns "644Q" in Unicode format:

BINTOSTR(ZONED(-6448,4), "A")

Remarks

When to use BINTOSTR( )

Use this function to convert return values from the ZONED( ) and EBCDIC( ) functions to a Unicode value.

Note

If this function is not applied to the return values of ZONED( ) and EBCDIC( ) in Unicode editions of Analytics, then they are displayed incorrectly because the encoding is not interpreted correctly.