Hash file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 30
- Joined: Wed Mar 24, 2004 1:28 am
Hash file
Is it any way to count hash file stored in local directory not in project directory.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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?
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?
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.
-
- Participant
- Posts: 30
- Joined: Wed Mar 24, 2004 1:28 am
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
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.
You can find my tools on the DataStage Tools page of www.anotheritco.com.
Chuck Smith
www.anotheritco.com
www.anotheritco.com
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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 or
Once you have the pointer, you can use standard queries, such as
Code: Select all
SELECT COUNT(*) from hashedfilename;
Code: Select all
COUNT 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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 30
- Joined: Wed Mar 24, 2004 1:28 am
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.
>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.
-
- Participant
- Posts: 30
- Joined: Wed Mar 24, 2004 1:28 am
-
- Participant
- Posts: 30
- Joined: Wed Mar 24, 2004 1:28 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
Your correct syntax therefore should have been
Code: Select all
SETFILE /u05/PRODDSS/data3/srcfiles/cmd/hash/H_Cmd_HS H_Cmd_HS OVERWRITING
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.