Comparing Strings

If you do not specify <CHARACTERS> in the control file's Environment tag group, Enrichment uses the binary values of characters to compare strings.

  • On mainframe systems, characters are represented by the EBCDIC character set. In EBCDIC, the lowercase characters have lower binary values than the uppercase characters.
  • On UNIX, Linux, and Windows, characters are represented by the ASCII character set. In ASCII, the lowercase characters have greater values than the uppercase characters. For example, the word cat would compare as shown below.
Note: Trailing blanks are ignored when comparing strings. Therefore, "ABC " equals ABC.

As the following example shows, the EBCDIC hexadecimal value of the word "cat" may be X'8381A3', X'C381A3', or X'C3C1E3' while the ASCII hexadecimal value of the word may be X'636174', X'436174', or X'434154', each depending on how the word is capitalized.

cat < Cat < CAT cat < Cat < CAT 
88A C8A CCE 667 467 445
313 313 313 314 314 314

EBCDIC Hexadecimal ASCII Hexadecimal
TranslationTranslation

You can use the <CHARACTERS> tag to avoid the hexadecimal translation differences and to enable proper comparison of international characters.