Null Representation

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

Post Reply
prasad v
Participant
Posts: 174
Joined: Mon Mar 30, 2009 2:18 am

Null Representation

Post by prasad v »

Hi

I am facing an issue with Null Values in integer field from file.

What i am doing here is I am validating the null value using
If (IsNull(lnk_In.col1) or trim(lnk_In.col1)="") Then "NULL" Else "NONNULL".

then i put condition while loading into table only to move the data when the above stage variable is "NONNULL".

However i am getting below error on null value.

Tfm_Validate,0: Field 'col1' from input dataset '0' is NULL. Record dropped.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The condition as you've posted is OK and is not causing the warning/error. Somewhere else in your transform stage you are doing an operation on col1 which is triggering the message.
prasad v
Participant
Posts: 174
Joined: Mon Mar 30, 2009 2:18 am

Post by prasad v »

in mapping i have defined output column expression as inputcolumn and mentioned null=No.

I am not sure what i am doing wrong.

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Although conditions are usually evaluated left-to-right and an OR condition stops evaluations once one TRUE is found, perhaps you could try

Code: Select all

If IsNull(lnk_In.col1) THEN "NULL" ELSE IF trim(lnk_In.col1)="" Then "NULL" Else "NONNULL"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check the Transformer stage properties to determine whether you have legacy null handling enabled.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prasad v
Participant
Posts: 174
Joined: Mon Mar 30, 2009 2:18 am

Post by prasad v »

Legacy null handling is disabled in the Transformer.
Post Reply