Hashfile key allowing null values

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
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

Hashfile key allowing null values

Post by ysrini9 »

Dear All,

Could you please let me know the root cause of this problem

In our Jobs Hashfile As a key coulmn and remainng three coulmns hardcoded to '0' ,even though that hashfile key column is allowing null values from the source becuase of that jobs are getting aborted!!!

help on this

Thanks and Regards
srini
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

It's not hashed file allowing nulls. It's that you are trying to write the nulls from the source column into the hashed file( If I understood what you have written correctly). Define a constraint saying

Code: Select all

Not(IsNull(Hashedfile.Key))
That way, you won't be processing all those rows whose key value is set to(or are) Null.

HTH
Last edited by kris007 on Tue Jul 11, 2006 8:06 am, edited 1 time in total.
Kris

Where's the "Any" key?-Homer Simpson
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

Post by ysrini9 »

kris007 wrote:It's not hashed file allowing nulls. It's that you are trying to write the nulls from the source column into the hashed file( If I understood what you have written correctly). Define a constraint saying

Code: Select all

Not(IsNull(Hashedfile.Key))
That way, you won't be processing all those rows whose key value is set to Null.

HTH
Hi

I know the solution for this but I would like to know the root cause!!!
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Problem is simple, your sending in null values.
Or maybe while building the hashed file you have one key defined and while reading the hashed file you have another key defined, or maybe the meta data is not identical. Look into it.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Server jobs do not enforce data types or nullability. Therefore, even though the Key column is marked Not Null, you are not prevented from sending NULL. It is up to you to prevent this from happening. Or switch to parallel jobs, where data types and nullability are enforced.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Can you post the message while getting aborted.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply