Comparing DBCS fields in a logical file
When you compare two fields or compare a field and constants, fixed-length fields can be compared to variable-length fields if the types are compatible. The table shows the 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
|
Timestamp | 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
|
|
Parent topic:
Double-byte character set considerations