Can somebody please help with Syntax of CREATE.INDEX statement for HF with 3 key columns A,B,C.
Is it CREATE.INDEX HF A,B,C ?
Thank you
CREATE.INDEX
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do you want to build separate indices on the three columns?
You do not need an index on the combined key (which is called @ID), since this is already taken care of by the hashing algorithm.
When the three key values are put together, they are assembled into a character string with a text mark (@TM, or Char(251)) as the default delimiter.
To create three indexes on three separate columns you first need a VOC entry to the hashed file. Do you have one? In that case, the syntax iswith spaces separating the column names.
You can not create a combined index unless the hashed file was created with a CREATE TABLE statement. If that's the case, then you use standard SQL syntax for CREATE INDEX to create the index.
You do not need an index on the combined key (which is called @ID), since this is already taken care of by the hashing algorithm.
When the three key values are put together, they are assembled into a character string with a text mark (@TM, or Char(251)) as the default delimiter.
To create three indexes on three separate columns you first need a VOC entry to the hashed file. Do you have one? In that case, the syntax is
Code: Select all
CREATE.INDEX hashedfile A B C
You can not create a combined index unless the hashed file was created with a CREATE TABLE statement. If that's the case, then you use standard SQL syntax for CREATE INDEX to create the index.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.