null handling error

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

null handling error

Post by scorpion »

hi all,

could any one please through some light to solve my problem:

error is:

Fatal Error: Null value on the accessor interfacing to field "XXX".

i checked source and target(xxx)fields length and nullable-yes options.

but still i am getting error.

please help me on this.

tx in advance.
Thanx&Regards
scorpion
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Are there any other surrounding error/warning messages? See if this post helps.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

hi dsguru2B

Thanks for the reply and i tried same as mentioned in the post.

but i am still getting the same error.

tx
Thanx&Regards
scorpion
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In which stage is this error occurring?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please post the entire, exact error message, and a description of your job design, including the stage types used.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Hi,

Following are the error messages i am getting,when i run my job:

1)Transformer_145,0: Failure during execution of operator logic.
2)Transformer_145,0: Fatal Error: Null value on the accessor interfacing to field "xxx".
3)node_node1: Player 27 terminated unexpectedly.



This job basically extract the data from sybase tables and load the data into dataset,after looking up some sybase tables.

I am getting this error in one of the transformer stages.

In the transformer stage(Transformer_145) i am using derivation for one of the target field (yyy)like:

If IsNull(DSLink147.xxx) Or Trim(DSLink147.xxx) = "" Then "" Else (DSLink147.yyy)


for 'xxx' field,i am getting this error message.

Please help me on this.

thanks in advance.
Thanx&Regards
scorpion
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is DSLink147.xxx defined as Nullable ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What is your input stage passing xxx into the transform and is the nullability of xxx the same there? Also, I would recommend removing the parenthesis around the else clause of the derivation {but I don't think that is causing your problem}
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

Yes ray/arndw,

DSLink147.xxx defined as Nullable. for that column the option:

'Nullable' is set to 'yes..
Thanx&Regards
scorpion
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Do you have any null values in your input column xxx?

This could be your problem if you have null values in your input column.

Code: Select all

Trim(DSLink147.xxx)
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

yes balaji,

there is null values in input column xxx.

but i used derivation in Transformer_145,to handle nulls, like:

If IsNull(DSLink147.xxx) Or Trim(DSLink147.xxx) = "" Then "" Else (DSLink147.yyy)

thanks
Thanx&Regards
scorpion
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

Post by scorpion »

and the column 'xxx' is Varchar-50

the column 'yyy' is Integer-10

do i need look into this way?
Thanx&Regards
scorpion
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

You need to change your derivation to something like this:

Code: Select all

If IsNull(DSLink147.xxx) then "" else if Trim(DSLink147.xxx) = "" then "" else DSLink147.yyy
You cannot trim a null value.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Balajisr - good catch! I saw the problem as well, but got caught in a short meeting before being able to hit "post", and now I'm editing out my response since you did a better job in the meantime!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And, indeed, that's where I was headed with my question. Do let us know whether this change fixes the problem and, if it does, mark the thread as resolved.
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