Progress
Report Builder
User’s Guide


Collation

Report Builder and Report Engine use collation tables when performing sorts and some comparisons. On startup, Report Builder identifies one particular collation table to use, according to the following rules:

  1. If the Collation Code Page (-cpcoll) parameter is specified on the command line for Report Builder and Report Engine, they go into the convmap.cp file and locate the collation table named by the -cpcoll parameter, for the -cpinternal code page. For example:
  2. -cpcoll LOCAL -cpinternal iso8859-2 
    

    directs Report Builder and Report Engine to find the collation table named LOCAL for the code page ISO8859-2.

  3. If there is no -cpcoll parameter specified, but the command line contains one or more databases (for example, using the -db startup parameter), then Report Builder and Report Engine (generally) use the collation table stored in the first database they find while processing the command line. In actual detail, what they do is:
    • Look in the first database for the name of the database’s code page and collation table.
    • Extract from convmap.cp the collation table that matches the database’s code page and collation name.
    • If the database’s code page is different from -cpinternal, Report Builder and Report Engine convert the extracted collation table to the -cpinternal code page, using the appropriate code page conversion table from convmap.cp.
    • That is, Report Builder and Report Engine do not actually take the collation table from the first database. Instead, they get the name of the collation from the first database and then get the collation table (with the same name) from convmap.cp. For almost all users, the collation table in convmap.cp is identical to the one stored under that name in the first database. If this is not the case, then use the -cpcoll parameter to explicitly name a collation table in convmap.cp.

      NOTE: Report Builder and Report Engine choose a collation using the first database that they encounter when processing the command line. This might not be the first database that is actually identified on the command line. In particular, if the first startup parameter is a Parameter File (-pf) parameter, and the parameter file (.pf file) contains a Physical Database Name (-db) parameter, Report Builder and Report Engine encounter the -db parameter in the .pf file first, and therefore, use the collation information in that database — even if there are other databases identified explicitly on the command line (following the -pf parameter).

  4. If the command line contains neither a -cpcoll parameter nor any databases, then Report Builder and Report Engine use the “BASIC” collation in convmap.cp for the -cpinternal code page.

Once Report Builder and Report Engine identify a collation table, they use it in doing the following sorts:

Also, Report Builder and Report Engine use the collation table to make string comparisons in certain situations. That is, there are two types of string comparisons: sort-weighted (using the collation tables) and what might be called “numeric-weighted” (based solely on the ASCII code for the character). Report Builder and Report Engine make sort-weighted comparisons (using the collation table) in the following situations:

In all other string comparisons, such as the MATCHES built-in function, Report Builder and Report Engine make numeric-weighted string comparisons. Note that the choice of string comparison techniques (sort-weighted vs. numeric-weighted) might change in future releases of Progress and Report Builder.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095