If the BINARY COMPARISON option is designated, an indexed set is organized according to the binary sequence of the characters in the set. If the LOGICAL COMPARISON option is designated, an indexed set is organized according to the collating sequence of the characters in the set. If the EQUIVALENT COMPARISON option is designated, an indexed set is organized according to the ordering sequence of the characters in the set.
If the ASeriesNative coded character set is being used, the default ordering and the only ordering that can be specified is binary comparison. If any other coded character set is being used, the default ordering is logical comparison.
The unsigned integer parameter is used to indicate the maximum alpha key length for any substitution characters. By default the length is the declared key length. If the length cannot contain the translated sequence value, an exception is returned. If a value of 0 (zero) is assigned to the unsigned integer, the alpha key is truncated when the translated sequence value is larger than the key size.
If a value is assigned to the unsigned integer parameter, and the ccsversion in use does not allow substitution, a syntax error is issued at compile time.
The following is an example of DASDL syntax that includes comparison designators:
S21 SET OF D2 KEY IS D2-ID2 LOGICAL COMPARISON (20); S22 SET OF D2 KEY IS D2-ID3 EQUIVALENT COMPARISON; S23 SET OF D2 KEY IS D2-ID3 BINARY COMPARISON;