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 ACL. It is not a supported function in the non-Unicode edition.

Syntax

BINTOSTR(string, string_type)

Parameters

string

Character. The ZONED or EBCDIC value that you want to convert to Unicode character encoding.

string_type

Character constant. Specify A for ASCII if you are converting ZONED data, or E if you are converting EBCDIC data. The value specified must be enclosed in quotation marks.

Output

Character.

Remarks

You can use this function to convert return values from the ZONED( ) and EBCDIC( ) functions to a Unicode value. If this function is not applied to the return values of these functions they are displayed incorrectly because the encoding is not interpreted correctly.

Example

Displaying a Unicode string correctly

The expression ZONED(-6448,4) should return the value “644Q”. However, ACL will not display “644Q” until you convert the characters to Unicode by using the BINTOSTR( ) function:

zonedData = ZONED(-6448,4)
unicodeData = BINTOSTR(zonedData, "A")

The unicodeData variable stores the return value of the function (“644Q”), which is formatted correctly with Unicode encoding.



(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback