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
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Hash File Problem...

Post by sivatallapaneni »

Hi,
I'm having probelm with hash file. I created a hash file in the a job and viewed the data, all the data fileds are populated and every thing looks fine. then i save the table definition and build one more job to use the hash file as a lookup when i viewed the data in this job in the data browser some of the columns are not populated with the data. i have a key defined and did every thing. i have no idea why those columns are diplayed in the data browser without data. did anybody face this before? any inputs are appreciated.

thank you.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You have a metadata problem. If you swear that the metadata in the reference stage is the same as the metadata in the job that creates/populates the hash file, then recheck the name of the hash file and/or the path.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Post by sivatallapaneni »

Metadata is same, hash file name is same. and also giving the right path. data is visible in some of the columns i dont know what's happening with the other columns.

Thanx for the reply though.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If you have a hash file and two jobs have the same exact definition, then viewing data in both jobs should show the EXACT SAME ROWS. It will read the hash file the same way/order, so the first row listed in both jobs should be the same row. Is it?

If not, you're looking at different files. If it is, then it is the metadata. If that same first row has columns shifted, then it's your primary key definition. If the columns are just blank, then please state that.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Scroll to the right in the Hashed File stages' Columns grids and verify that the Position column information is the same in each. Identification of fields in hashed file records is by Position rather than name, if Position is supplied.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Post by sivatallapaneni »

There's no shift in columns. columns are in the same position. only some columns are balnk in the second job.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You did not answer my first point about verifying that the first row listed is the same in both hash file viewings.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

sivatallapaneni wrote:There's no shift in columns. columns are in the same position. only some columns are balnk in the second job.
You've missed the point.
What values are in the Position column in the Columns grid?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Post by sivatallapaneni »

There's nothing in that, blank.
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Post by sivatallapaneni »

I closed and reopened my connection and it workd fine now. i did that before also, it did work that time. I have no clue.

Thanx guys for the replys.
Have a good one.
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

Post by pongal »

lot of convesations went .. good. All given perfect information on how to tackle hashfiles.

i think you have not selected correct key fields in HashFile.
Key fields whatever there in Source should have to match in Hashfile also.

Here i'm listing some points below while comparing or poplating the data.
1). Please check the datatypes and datalengths should have same as that of same while comparing any fields.
2) while comparing , always use Trim function for each referencing Field.
3).Its better to keep only Key fields and other neccessaty fields for Transforming or loading the data to the destination Table or file.
4).Order of the columns must be mathched.
5). Filename and location must me matched while using the same hashfiles in no of jobs.
6).sometimes if there are no key fields on Source while populating to hashfile, if you put dummy key fileds, it will not compare correctly.
cheers.........now you can happlily work on hasfiles without ruin your confidence.
pongal
Participant
Posts: 77
Joined: Thu Mar 04, 2004 4:46 am

Post by pongal »

lot of convesations went .. good. All given perfect information on how to tackle hashfiles.

i think you have not selected correct key fields in HashFile.
Key fields whatever there in Source should have to match in Hashfile also.

Here i'm listing some points below while comparing or poplating the data.
1). Please check the datatypes and datalengths it should mach with the Source structure while populating the data 2) while comparing , always use Trim function for each referencing Field.
3).Its better to keep only Key fields and other neccessary fields for Transforming or loading the data to the destination Table or file.
4).Order of the columns must be mathched.
5). Filename and location must me matched while using the same hashfiles in number of jobs.
6).sometimes if there are no key fields on Source while populating to hashfile, if you put dummy key fileds, it will not compare correctly.
cheers.........now you can happlily work on hasfiles without ruin your confidence.
Post Reply