Create a user-defined character set

To create a user-defined character set, use the etx_CreateCharSet() routine to specify the name of the new character set and the location of the operating system file that contains the definition of the character set.

For example, to create a user-defined character set named my_new_charset from the definition stored in /local0/excal/my_new_char_set_file, execute the following statement:
EXECUTE PROCEDURE etx_CreateCharSet 
    ('my_new_charset', '/local0/excal/my_new_char_set_file');

The operating system file must consist of 16 lines of 16 hexadecimal numbers. Each position corresponds to a specific ASCII character. If you want the character in the position to be indexed, enter the character that it should be indexed as. If you do not want the character to be indexed, enter 00.

The sample file /local0/excal/my_new_char_set_file, enables all alphanumeric characters and the hyphen (hexadecimal value 0x2D) to be indexed. In addition, it maps lowercase letters to uppercase.
# Character set that indexes hyphens and 
# alphanumeric characters. All lower case letters
# are mapped to upper case.
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 2D 00 00
30 31 32 33 34 35 36 37 38 39 00 00 00 00 00 00
00 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 00 00 00 00 00
00 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

To use this user-defined character set while creating an etx index, set the CHAR_SET index parameter to my_new_charset. If you do not specify the CHAR_SET index parameter in the CREATE INDEX statement, the ASCII character set is used by default.