Compare DBCS fields in a logical file

When comparing two fields or a field and constants, fixed-length fields can be compared to variable-length fields as long as the types are compatible.

Table 1 describes valid comparisons for double-byte character set (DBCS) fields in a logical file.

Table 1. Valid comparisons for DBCS fields in a logical file
  Any numeric Character Hexadecimal DBCS-open DBCS- either DBCS-only DBCS- graphic UCS2- graphic UTF-8 UTF-16 Date Time Timestamp
Any numeric Valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid
Character Not valid Valid Valid Valid Valid Not valid Not valid Not valid Valid Valid Not valid Not valid Not valid
Hexa- decimal Not valid Valid Valid Valid Valid Valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid
DBCS- open Not valid Valid Valid Valid Valid Valid Not valid Not valid Valid Valid Not valid Not valid Not valid
DBCS- either Not valid Valid Valid Valid Valid Valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid
DBCS- only Not valid Not valid Valid Valid Valid Valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid
DBCS- graphic Not valid Not valid Not valid Not valid Not valid Not valid Valid Not valid Valid Valid Not valid Not valid Not valid
UCS2- graphic Not valid Not valid Not valid Not valid Not valid Not valid Not valid Valid Valid Valid Not valid Not valid Not valid
UTF-8 Not valid Valid Not valid Valid Not valid Not valid Valid Valid Valid Valid Not valid Not valid Not valid
UTF-16 Not valid Valid Not valid Valid Not valid Not valid Valid Valid Valid Valid Not valid Not valid Not valid
Date Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Valid Not valid Not valid
Time Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Valid Not valid
Time- stamp Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Not valid Valid