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
vikas gupta
Participant
Posts: 30
Joined: Wed Mar 24, 2004 1:28 am

Hash file

Post by vikas gupta »

Is it any way to count hash file stored in local directory not in project directory. :shock:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vikas gupta
Participant
Posts: 30
Joined: Wed Mar 24, 2004 1:28 am

Post 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
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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

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.
vikas gupta
Participant
Posts: 30
Joined: Wed Mar 24, 2004 1:28 am

Post 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.
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Hi

Check your path and hash file folder

example

SETFILE /usr/prod/hashfiles/CLIENT CLIENT OVERWRITING

Thanks
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
vikas gupta
Participant
Posts: 30
Joined: Wed Mar 24, 2004 1:28 am

Post by vikas gupta »

I know only that path using for hash file, outside project directory

Vikas Gupta
vikas gupta
Participant
Posts: 30
Joined: Wed Mar 24, 2004 1:28 am

Post by vikas gupta »

I got it.

Thanks to all.

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

Post 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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply