Page 1 of 1
Hash file
Posted: Wed Jan 19, 2005 1:32 am
by vikas gupta
Is it any way to count hash file stored in local directory not in project directory.
![Shocked :shock:](./images/smilies/icon_eek.gif)
Posted: Wed Jan 19, 2005 1:59 am
by ray.wurlod
You really should post server questions in the server forum, rather than the parallel forum.
By "count" do you mean count how many hashed files there are, or do you mean count the number of records in a particular hashed file?
Posted: Wed Jan 19, 2005 4:09 am
by vikas gupta
Sorry! I posted in Parallel extender.
Count number of records in hashed file, which is not stored under the Project directory. It is stored in local path
Posted: Wed Jan 19, 2005 8:23 am
by chucksmith
You can use my
Create a VOC pointer to a hash file in another directory routine to create a pointer to the hash file, then you can use the
COUNT YourHashFileVocPointerName command to get your record count. Use
DSExecute() to run the count command.
You can find my tools on the
DataStage Tools page of
www.anotheritco.com.
Posted: Wed Jan 19, 2005 3:06 pm
by ray.wurlod
Search the Forum for SETFILE, which is a DataStage command for creating a pointer. Or use the tool that Chuck has provided.
Once you have the pointer, you can use standard queries, such as
Code: Select all
SELECT COUNT(*) from hashedfilename;
or
Posted: Sat Jan 22, 2005 1:18 am
by vikas gupta
I used SETFILE as follows for count hash file but it gives error and hash file H_Cmd_HS file is strored in path /u05/PRODDSS/data3/srcfiles/cmd/hash
>SETFILE /u05/PRODDSS/data3/srcfiles/cmd/hash H_Cmd_HS OVERWRITING
*** Warning *** The DICT file pathname "/u05/PRODDSS/data3/srcfiles/cmd/D_hash"
does not exist.
Pointer "H_Cmd_HS" established in VOC file.
Posted: Sat Jan 22, 2005 2:16 am
by rasi
Hi
Check your path and hash file folder
example
SETFILE /usr/prod/hashfiles/CLIENT CLIENT OVERWRITING
Thanks
Posted: Sat Jan 22, 2005 3:27 am
by vikas gupta
I know only that path using for hash file, outside project directory
Vikas Gupta
Posted: Sat Jan 22, 2005 3:40 am
by vikas gupta
I got it.
Thanks to all.
Vikas Gupta
Posted: Sat Jan 22, 2005 3:28 pm
by ray.wurlod
Please share your solution. The error message suggested that you were trying to create a pointer to the directory /u05/PRODDSS/data3/srcfiles/cmd/hash, rather than to the hashed file /u05/PRODDSS/data3/srcfiles/cmd/hash/H_Cmd_HS
Your correct syntax therefore should have been
Code: Select all
SETFILE /u05/PRODDSS/data3/srcfiles/cmd/hash/H_Cmd_HS H_Cmd_HS OVERWRITING