How are NULL values stored in Hash files?

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
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

How are NULL values stored in Hash files?

Post by zulfi123786 »

How are NULL values stored in Hash files?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

A NULL (0x00) can be stored, as can an SQL NULL (0x80). Both are stored as-is in hashed files.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post by zulfi123786 »

ArndW wrote:A NULL (0x00) can be stored, as can an SQL NULL (0x80). Both are stored as-is in hashed files.
In that case is char(0x00)=@NULL and char(0x80)=@NULL
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No, @NULL represents only one value, namely 0x00. DataStage server/BASIC has no concept of the SQL NULL value, but can represent its ASCII value.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There are at least a couple of posts on this subject that I've participated in, one is titled something like 'When is a null not a null?'. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

0x00 is not @NULL. It is the ASCII NUL byte and can be represented using the function Char(0).

0x80 is @NULL (unless changed, on Windows platforms, because Microsoft uses 0x80 for the Euro symbol). The change is effected in uvconfig.
Last edited by ray.wurlod on Wed Feb 10, 2010 5:47 pm, edited 2 times in total.
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 »

I was too slow today and not thinking! Thanks for correcting that Ray.
Post Reply