Page 1 of 1

Hashfile-name

Posted: Wed Sep 06, 2006 12:03 am
by Jdrost
Hello,

Based on UtilityHashLookup I build a routine, but when I test the routine it fails to open the hashfile. I think I did not state the name and path of the hashfile correctly, but I do not know what I am doing wrong.

I know that the pathname of the hashfile that I need is "c:\hash" and the name of the hashfile is "TestHash". I passed the parameter as "c:\hash\TestHash" with the result I mentioned above.

When I look with windows explorer in that path I find a folder with the same name as the hashfile containing 3 .30-files. I do not know if that is the hashfile, but the hashfile seems to be in that place.

Can someone tell me how I state the name and path of the hashfile correctly in this routine?

Thanks in advance.

Posted: Wed Sep 06, 2006 12:18 am
by loveojha2
You need to create a pointer to the Hashed file so that it would have entry in the VOC file and after that you can access it using the pointer name, instead of the pathed file.

Posted: Wed Sep 06, 2006 12:18 am
by ArndW
Johannes,

what error message are you getting from the routine when you try to open the file? A dynamic hashed file is created as a directory with the file name and it has 3 files - a .Type30, DATA.30 and OVER.30 so it looks as if the create portion was successful.

Posted: Wed Sep 06, 2006 1:28 am
by ray.wurlod
You basically have two choices.

One is to use OPENPATH to open the pathname. This sounds like what you need.

The other is to use SETFILE (a command, not a DataStage BASIC statement) to create a VOC pointer to the hashed file, then use OPEN to open it.