The DQLOCALEGUESS function evaluates an input character value using the specified
locale guess definition in each of the locales that are loaded into memory. An applicability
score is generated
for each locale in the
locale list. The locale with the highest applicability score is returned by the function. The
return value is the five-character abbreviation of the locale name, such as ENGBR
for English, as used in Great Britain.
The name of the locale that is returned depends on the locales that are loaded into
memory. The locales
that are loaded into memory are determined by the value of
the DQLOCALE= system option..
If multiple locales receive the highest applicability score, then the locale that
is returned is determined by the value of DQLOCALE= system option. The function
returns the highest-scoring locale that appears last in the list of locales that is
specified for the DQLOCALE= system option. See Example 2.
If all locales receive an applicability score of zero, then the return value is determined
in part by a setting within the specified locale guess definition. Each locale guess
definition can be enabled for the setting Select the last
locale given if no score can be computed. When
all applicability scores are zero, the last locale in the DQLOCALE=
list where this option is enabled will be the locale guessed. See
Example 3.