hash file problem

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
pukars4u
Participant
Posts: 24
Joined: Tue Dec 27, 2005 6:27 pm

hash file problem

Post by pukars4u »

Hey I am using Hash File as Lkp. The problem is the hash file has the data ans the Transforemer is not able to read any records from hash file


When I keep the database lkp Transformer stage is taking data.

I dont understand whats happening.The thing is it ran fine when i usede hash file for the first time .But from second run onwards the transformer stage is not taking any records from hashfile


I am using DS 7.5 and plugin is DRS the jobs i am working is delivered jobs

quick reply will be helpful
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Is the job running fine or are you getting any error messages? From what you say, it seems that your job is running fine but is not reading any inputs from the hashed file. Please elaborate so that we could help.

Did you change any metadata in the hashed file from the previous run. ?
Are you deleting and creating the hashed file everytime you run the job?
pukars4u
Participant
Posts: 24
Joined: Tue Dec 27, 2005 6:27 pm

hash file problem

Post by pukars4u »

Thanks cris for replying.
The job is running fine when i keep db stage as lkp.But when i want to keep a hash file instead of db stage its not picking up records.
i copied the same metadata as of db stage

i donno whats happening


[quote="kris007"]Is the job running fine or are you getting any error messages? From what you say, it seems that your job is running fine but is not reading any inputs from the hashed file. Please elaborate so that we could help.

Did you change any metadata in the hashed file from the previous run. ?
Are you deleting and creating the hashed file everytime you run the job?[/quote]
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

check out a couple of things.
Make sure the hashed file names are the same on both the input and output (while building the hashed file and while reading it)
The keys are identical in both the cases.
you are triming the source keys and the hashed file keys for blank spaces.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Also, in the create options of the hashed file ..check the "Delete file before create" option. That should help.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Good point. I almost forgot that.
check both the options
create file
and then go to options and as kris mentioned check the "delete file before create"
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pukars4u
Participant
Posts: 24
Joined: Tue Dec 27, 2005 6:27 pm

Post by pukars4u »

Thanks for all of the tips,

I have tried all those options. and still i am getting the same problem. I am not able to trace out what the problem is ? the thing i am confused is these are people soft delivered jobs.

should the SQl query effects the hash file

I got no clue

Help in this matter is appreciated
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

try to view the data in the hashed file.
Both while creating the hashed file and while reading the hashed file. Does it show the correct data?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pukars4u
Participant
Posts: 24
Joined: Tue Dec 27, 2005 6:27 pm

Post by pukars4u »

everything in hash file is good including data, keys , columns and i doubt are there any patches to install for hash files?

and will hash files work for any DB?

I am having no clue why this transformer is not reading records from lkp hash file
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It is because there is not hit on the keys in the hashed file.
That usually happens when there are leading or trailing spaces in the record.
In the key derivation of the hashed file link, inside the transformer, make sure you are trimming it. I cannot think of any other reason why its behaving like this.
Give a new name to the hashed file, in the hashed file stage, in both the input and output.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply