A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: Definition

collating sequence, ASE sort order, sort order

The term collating sequence describes the sort order of a character set in ASE®.

collating sequence files

There are numerous ways to sort a character set. The sort order depends mainly on teh character set and is managed by the files ending in .srt in the subdirectories of $SYBASE/charsets/. CAVEAT: If the sort order is to be changed through these files, make sure to create a backup of the original file!

Example for a collating sequence file

Example file: $SYBASE/charsets/ascii_8/binary.srt

    ; semi-colon is the comment character
[sortorder]
;=================================================================
;
; @(#)binary.srt 84.1 6/23/93
;
; Sort Order Overview:
; --------------------
; Based on the ASCII-8 character set, this is a binary sort order.
;
;=================================================================

class = 0x01 ; Class `1' sort order
id = 0x32 ; id = 50
name = bin_ascii_8
menuname = "Binary ordering, for use with any ASCII-based 8-bit (ascii_8) environment."
charset = ascii_8 ; Use with the ascii_8 character set

description = "Binary Sort Order for the 8-bit ASCII Character Set (ascii_8)."

binary = "true"

Description of the collating sequence files *.srt

Keyword Description Required Value
class The class of the sort order.
Class 1 is currently the only class available for an eight bit character set supported class
Yes 0x01d
id A unique hexadecimal number identifying the sort order. Yes For all user defined collating sequences the id needs to be in the range between 0xC9 and 0xFF.
The id ranges reserved for Sybase are located between 0x00 und 0xC8.
menuname The label for the collating sequence. The sort order will appear under this name in the sybinit executable. Yes A string, which should not be longer than 64 characters, because the sybinit executable will not display anything after the 64th character.
name The name of the collating sequence. No A string which must not be longer than 30 characters.
charset The character set that should be used by the sort order.
This corresponds to the directory name in which the collating sequence file is stored.
Yes The name must be equivalent to the name of a subdirectory in $SYBASE/charsets.
preference For the non case sensitive sort order No false: no preference.
true: preference for characters on the left side of the equal-sign of a select statement. "true" might have a higher performance impact than "false" Default is "true."
description Description of the collating sequence. No The description must not be longer than 255 characters.