IBM SC34-5764-01 Server User Manual


 
BITAND('12'x) -> '12'x
BITAND('73'x,'27'x) -> '23'x
BITAND('13'x,'5555'x) -> '1155'x
BITAND('13'x,'5555'x,'74'x) -> '1154'x
BITAND('pQrS',,'BF'x) -> 'pqrs' /* EBCDIC */
BITOR (Bit by Bit OR)
 BITOR(string1
,
string2 ,pad
) 
returns a string composed of the two input strings logically inclusive-ORed together, bit by bit. (The
encodings of the strings are used in the logical operation.) The length of the result is the length of the
longer of the two strings. If no pad character is provided, the OR operation stops when the shorter of the
two strings is exhausted, and the unprocessed portion of the longer string is appended to the partial result.
If pad is provided, it extends the shorter of the two strings on the right before carrying out the logical
operation. The default for string2 is the zero length (null) string.
Here are some examples:
BITOR('12'x) -> '12'x
BITOR('15'x,'24'x) -> '35'x
BITOR('15'x,'2456'x) -> '3556'x
BITOR('15'x,'2456'x,'F0'x) -> '35F6'x
BITOR('1111'x,,'4D'x) -> '5D5D'x
BITOR('pQrS',,'40'x) -> 'PQRS' /* EBCDIC */
BITXOR (Bit by Bit Exclusive OR)
 BITXOR(string1
,
string2 ,pad
) 
returns a string composed of the two input strings logically eXclusive-ORed together, bit by bit. (The
encodings of the strings are used in the logical operation.) The length of the result is the length of the
longer of the two strings. If no pad character is provided, the XOR operation stops when the shorter of the
two strings is exhausted, and the unprocessed portion of the longer string is appended to the partial result.
If pad is provided, it extends the shorter of the two strings on the right before carrying out the logical
operation. The default for string2 is the zero length (null) string.
Here are some examples:
BITXOR('12'x) -> '12'x
BITXOR('12'x,'22'x) -> '30'x
BITXOR('1211'x,'22'x) -> '3011'x
BITXOR('1111'x,'444444'x) -> '555544'x
BITXOR('1111'x,'444444'x,'40'x) -> '555504'x
BITXOR('1111'x,,'4D'x) -> '5C5C'x
BITXOR('C711'x,'222222'x,' ') -> 'E53362'x /* EBCDIC */
B2X (Binary to Hexadecimal)
 B2X(binary_string) 
returns a string, in character format, that represents binary_string converted to hexadecimal.
The binary_string is a string of binary (0 or 1) digits. It can be of any length. You can optionally include
blanks in binary_string (at four-digit boundaries only, not leading or trailing) to aid readability; they are
ignored.
The returned string uses uppercase alphabetics for the values AF, and does not include blanks.
Functions
Chapter 14. Functions 177