Use Collation-Sensitive Operator (-collop) to turn on collation-sensitivity for the BEGINS operator.

Operating system and syntax UNIX / Windows -collop n
Use with Maximum value Minimum value Single-user default Multi-user default
Client Session, Database Server 0 0
n

Indicates whether collation-sensitivity is applied for the BEGINS operator:

  • 0 — The AVM does not apply collation-sensitivity. This is the default.
  • 1 — The AVM applies collation-sensitivity for the BEGINS operator.
  • 2 — The AVM applies collation-sensitivity for the MATCHES operator.
  • 3 — The AVM applies collation-sensitivity for the BEGINS and MATCHES operators.
Note: The -collop option only applies collation-sensitivity for the MATCHES operator when using UTF-8 codepages.

By default the BEGINS or MATCHES operator does not use a collation to compare character expressions. The startup parameter -collop 1 turns on collation-sensitivity for the BEGINS operator. In collation-sensitive mode the BEGINS operator works with the session collation (usually specified with the -cpcoll startup parameter). This enables the desired results to be achieved in some cases, such as when special characters are involved. For example, an expression might contain the character ç (c-cedilla), which is assigned the same value as c in many collations. By default, “Françoise” BEGINS “Franc” returns NO. With -collop 1, it returns YES.

In a client/server environment, both the client and the server must be run with the same -collop option to ensure that a BEGINS or MATCHES expression is evaluated the same on both client and server.

If connected to an older version (pre-12) of an OpenEdge database, any BEGINS expressions are not collation-sensitive.

Note: When BEGINS is used in a search operation on an indexed field, and the search operation uses the index on that field to search the records in the table, BEGINS automatically returns a collation-sensitive result. This is because index keys are based on the collated values (rather than the raw values) of fields. The -collop parameter does not change this behavior, and has no effect in this scenario.