Issue with 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
rajkraj
Premium Member
Premium Member
Posts: 98
Joined: Wed Jun 15, 2005 1:41 pm

Issue with null values

Post by rajkraj »

I am comparing seq file data with table data. 3 keys combination is used as primary key.

But some of my record's key column values are null. Pls suggest me, how to compare null values?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Preprocess the inputs and replace NULL values to a default value for comparison.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
muruganr117
Participant
Posts: 40
Joined: Sun Jan 21, 2007 1:52 pm
Location: Chennai
Contact:

Re: Issue with null values

Post by muruganr117 »

rajkraj wrote:I am comparing seq file data with table data. 3 keys combination is used as primary key.

But some of my record's key column values are null. Pls suggest me, how to compare null values?

Hi,

You can preprocess it using NVL functions which will replace null with the prescribed text.

regards
Murugan
pradeepleon
Participant
Posts: 32
Joined: Fri Dec 02, 2005 10:44 pm
Location: Chicago,IL

Post by pradeepleon »

Replace the NULL values to a default value then do the comparison.
Thanks,
Pradeep

(Ten Hugs And Nine KisseS - THANKS)......is that true?

In GOD we trust,for all others we take cash.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

First, a sequential file has no data types, it contains only text. So it can only contain a "representation" of NULL, not a true NULL.

Second, a key - by definition - can not be null.

Therefore, you may need to re-think your design. If these columns have documented null representations, then the Sequential File stage(s) that read them will convert those representations to true NULLs, in which case the only safe way to test for them is to use the IsNull() function.
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