Bitor (Bit By Bit Or); Bitxor (Bit By Bit Exclusive Or); B2X (Binary To Hexadecimal) - IBM SC34-5764-01 Manual

Cics transaction server for vse/esa
Table of Contents

Advertisement

BITAND('12'x)
BITAND('73'x,'27'x)
BITAND('13'x,'5555'x)
BITAND('13'x,'5555'x,'74'x)
BITAND('pQrS',,'BF'x)

BITOR (Bit by Bit OR)

BITOR(string1
,
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)
BITOR('15'x,'24'x)
BITOR('15'x,'2456'x)
BITOR('15'x,'2456'x,'F0'x)
BITOR('1111'x,,'4D'x)
BITOR('pQrS',,'40'x)

BITXOR (Bit by Bit Exclusive OR)

BITXOR(string1
,
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)
BITXOR('12'x,'22'x)
BITXOR('1211'x,'22'x)
BITXOR('1111'x,'444444'x)
BITXOR('1111'x,'444444'x,'40'x)
BITXOR('1111'x,,'4D'x)
BITXOR('C711'x,'222222'x,' ')

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 A–F, and does not include blanks.
->
'12'x
->
'23'x
->
'1155'x
->
'1154'x
->
'pqrs'
/* EBCDIC */
)
string2
,pad
->
'12'x
->
'35'x
->
'3556'x
->
'35F6'x
->
'5D5D'x
->
'PQRS' /* EBCDIC */
string2
,pad
-> '12'x
-> '30'x
-> '3011'x
-> '555544'x
-> '555504'x
-> '5C5C'x
-> 'E53362'x /* EBCDIC */
)
Functions
177
Chapter 14. Functions

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rexx

Table of Contents