To create a custom collation file, first use the DBCOLLAT utility to extract a collation from an existing database. A collation as close as possible to the wanted collation should be chosen.
The following statement extracts the collation from a database named collat.db into a file named CUSTOM.COL:
dbcollat -c "dbf=collat.db;uid=dba;pwd=sql" custom.col
When you use DBCOLLAT to extract a collation from an existing database, the database does not need to contain any information. If you do not currently have a database using the collation on which you want to base a custom collation, you can create such a database using the Sybase Central administration tool or the DBINIT command line utility.
You can see a listing of available collations using DBINIT with the -l (lowercase L) option.
dbinit -l
The following statement creates a database named COLLAT.DB using the Shift-JIS collation:
dbinit -z SJIS collat.db
Once you have extracted a collation file, you need to edit the file using a text editor to produce your custom collation file. The format of the custom collation file is described below.
To build a database that uses the custom collation file, use DBINIT with the -z switch. The following statement builds a database named COLLAT2.DB using the CUSTOM.COL custom collation file.
dbinit -z custom.col collat2.db