
BIT-TO-CHAR
The BIT-TO-CHAR function returns a character string consisting of bytes that correspond to the bit pattern indicated by the sequence of "0" and "1" characters in the input argument.
The function type is alphanumeric.
- argument-1
- Must be an alphanumeric literal, alphanumeric data item, or alphanumeric group item. argument-1 must consist only of the characters "0" and "1". The length of argument-1 must be a multiple of 8 bytes.
The returned value is a character string consisting of bytes that correspond to the bit pattern indicated by the sequence of "0" and "1" characters in argument-1. The length of the result string is equal to the length of the input string divided by 8.
Example
MOVE '1111110010001000' TO MY-BIT-DATA
FUNCTION
BIT-TO-CHAR(MY-BIT-DATA) returns a character string with value x'FC88'.