Problem with creating index on hash file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
devnhi
Premium Member
Premium Member
Posts: 68
Joined: Wed Jun 17, 2009 10:47 am

Problem with creating index on hash file

Post by devnhi »

Hi

Recently we have migrated to 8.5 version and I am trying to create indexes on the hash file . I was able to create VOC entry successfully after that with the syntax :
>CREATE.INDEX ProcKeyLookup PROC_CODE

Unable to open "DICT ProcKeyLookup".
>BUILD.INDEX ProcKeyLookup PROC_CODE

Unable to open "DICT ProcKeyLookup".

Can somebody help me to resolve this issue .

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How was the hashed file created?

What does its VOC entry look like? To find out:

Code: Select all

LIST.ITEM VOC 'hashedfilename'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devnhi
Premium Member
Premium Member
Posts: 68
Joined: Wed Jun 17, 2009 10:47 am

Post by devnhi »

When I did it is saying :


LIST.ITEM VOC ProcKeyLookup

Retrieve: syntax error. Unexpected filename. Token was "ProcKeyLookup".
Scanned command was LIST.ITEM VOC ProcKeyLookup


Did i do any thing wrong?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You left off the quote characters. LIST commands (including LIST.ITEM) are not permitted two file names on the command line.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devnhi
Premium Member
Premium Member
Posts: 68
Joined: Wed Jun 17, 2009 10:47 am

Post by devnhi »

Thanks a lot Ray.I am getting like this :

LIST.ITEM VOC "ProcKeyLookup" 18:53:26 02-08-12 PAGE 1

ProcKeyLookup
001 F
002 ProcKeyLookup
003 ProcKeyLookup/D_ProcKeyLookup
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It should look like this:
ProcKeyLookup
001 F
002 ProcKeyLookup
003 D_ProcKeyLookup

How was the hashed file created? It seems to me that the VOC entry is corrupted and, if field 3 is correct, so too is the hashed file itself - ProcKeyLookup directory should contain only DATA.30, OVER.30 and .Type30 files.

You'll need to resolve that before you will be able to create any 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.
devnhi
Premium Member
Premium Member
Posts: 68
Joined: Wed Jun 17, 2009 10:47 am

Post by devnhi »

when I am trying to add voc it is saying :

Error is not a new record. Aborting ...

Seems like the entry is already there .Can we delete the existing entry from voc and start from scratch one more time ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Add the keyword OVERWRITTING to the command.
-craig

"You can never have too many knives" -- Logan Nine Fingers
devnhi
Premium Member
Premium Member
Posts: 68
Joined: Wed Jun 17, 2009 10:47 am

Post by devnhi »

So Do i need to try as :


ED VOC OVERWRITING 'ProcKeyLookup' ;

???

It is not taking OVERWRITING as the filename though :(..Anything wrong with my syntax?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Suddenly you're using ED ?

The correct syntax to edit the ProcKeyLookup entry in VOC would be

Code: Select all

ED VOC ProcKeyLookup
No OVERWRITING (that's for COPY), no trailing semi-colon (ED is not SQL).

But what are you trying to accomplish?

How about you answer all my questions first, before getting dangerous using an editor you appear to know little about?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devnhi
Premium Member
Premium Member
Posts: 68
Joined: Wed Jun 17, 2009 10:47 am

Post by devnhi »

Hi Ray

The hash file got created using a server job .

I have deleted the hash file completely on the server and ran the server job .After that I have created VOC entry : using the ED VOC command and then tried to create the index , which is failing .
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the hashed file created in the project or in another directory? Please advise the pathname of the hashed file if the second situation obtains.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

devnhi wrote:It is not taking OVERWRITING as the filename though :(..Anything wrong with my syntax?
I assumed you were creating the VOC record with SETFILE, hence the OVERWRITING comment. No clue why you'd be using ED. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply