Hexadecimal string format
The format for coding a hexadecimal string constant is:
X'yy...yy'
The value yy represents any pair of hexadecimal digits. You can specify up to 256 pairs of hexadecimal digits.
Because the first digit and sign are ignored in a PD0 field, you should not include the first digit or sign in a hexadecimal constant to be compared to a PD0 field. For example, 3-byte PD0 values like X'01234C' and X'01234D' would be equal to a hexadecimal constant of X'1234'.
Examples of valid and invalid hexadecimal constants are shown in the following table.
Valid | Invalid | Explanation |
---|---|---|
X'ABCD' | X'ABGD' | Invalid hexadecimal digit |
X'BF3C' | X'BF3' | Incomplete pair of digits |
X'AF050505' | 'AF050505' | Missing X identifier |
X'BF3C' | 'BF3C'X | X identifier in wrong place |