A binary-string constant specifies a varying-length binary
string.
The two forms of a binary-string constant are:
- A BX followed by a sequence of characters that starts and ends
with a string delimiter. The characters between the string delimiters must
be an even number of hexadecimal digits. Blanks between the string delimiters
are ignored. The number of hexadecimal digits must not exceed 32740. A hexadecimal
digit is a digit or any of the letters A through F (uppercase or lowercase).
- An X followed by a sequence of characters that starts and ends with a
string delimiter. The characters between the string delimiters must be an
even number of hexadecimal digits. Blanks between the string delimiters are
ignored. The number of hexadecimal digits must not exceed 32740. A hexadecimal
digit is a digit or any of the letters A through F (uppercase or lowercase).
The CCSID assigned to the constant is 65535.
Note
that the syntax of the second form of binary string constant is identical
to the second form of a character constant. A constant of this form is only
treated as a binary string constant if the standards option is specified.
For information on the standards option, see Standards compliance.
Examples
BX'FFFF'
X'FFFF'