In-Band Nulls and Out-Band Nulls Make Null function

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
harishvardhan
Premium Member
Premium Member
Posts: 14
Joined: Wed Feb 01, 2006 8:50 am
Contact:

In-Band Nulls and Out-Band Nulls Make Null function

Post by harishvardhan »

How does In-band null differ from a Out-Band Null. What is the use of the null function MakeNull?
MakeNull Change an in-band null
to out of band null
any (column)
string (string)
-
Thanks,
H
Harish vardhan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

An out-of-band null is DataStage's internal representation of null. It's a single byte with only the high bit set (128 if it were a uint8).

An in-band null is a value that is legal for the domain of the field, but which your business model has designated will represent "unknown". For example you may have used -99 to represent "unknown" for a set of integer codes. -99 would be the in-band null for that field. Similarly you might choose "9999-12-31" to be the in-band null for a date type.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

when we use setnull() it would be out band null but how to convert out band null to in band null; makenull will do the vice versa how abt the other side?
And where do can we make a choice of using in band null or out band null for nullable fields?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create in-band nulls simply by assigning the chosen null-representing value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

ray.wurlod wrote:Create in-band nulls simply by assigning the chosen null-representing value.
That means at all places where we use setnull() to insert null we have to assign this value

Ex: If X=' ' Then SetNull()

has to be modified as

If X=' ' Then -99

and this -99 will be logically treated as NULLS

Did i get you right?
Last edited by zulfi123786 on Tue Aug 10, 2010 6:46 am, edited 1 time in total.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't know - did U respond?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

ray.wurlod wrote:An out-of-band null is DataStage's internal representation of null. It's a single byte with only the high bit set (128 if it were a uint8).
Does datastage reserve one bit for sign and one bit for null indication and use the rest for holding the value
In such case for signed int8 the max value that can be held becomes 32
(int8:-signed integer with 1 byte for storage; please correct if wrong)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, the binary representation of NULL in DataStage is 10000000.
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