View previous topic :: View next topic
|
Author |
Message |
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Hi All,
We know NULL value means basically there is no value and it is why host language deal with small int data type S9(4) COMP to denote it is a null value while working with DB2. On the other hand when we check the field value in DB2 file-aid it shows up with bunch of '-' to the length of the field.
Now, DB2 is nothing but a VSAM file in the backend. My questions are below.
1.How does a VSAM file stores that NULL value?
2. How does it display if we open that file, is there a hex mapping for it?
3. How does DB2 reads that backend file and knows that it a NULL value to show for us with '-' or set small int value to '-1' while working with a host language?
Regards
Amar |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
We know NULL value means basically there is no value and it is why host language deal with small int data type S9(4) COMP to denote it is a null value while working with DB2.
|
the issue has been discussed so many times that it has become pretty boring
topic is going to be locked shortly |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3053 Location: NYC,USA
|
|
|
|
have you looked at unload dataset yet? if you are a developer then why do you care about bits and bytes of it.
you will see "?" in unload dataset for the null able column but that just the representation. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
V S Amarendra Reddy wrote: |
Now, DB2 is nothing but a VSAM file in the backend. My questions are below.
1.How does a VSAM file stores that NULL value?
2. How does it display if we open that file, is there a hex mapping for it?
3. How does DB2 reads that backend file and knows that it a NULL value to show for us with '-' or set small int value to '-1' while working with a host language? |
And you want to know this ten years after you registered on this forum? Sheesh, haven't you got more useful things to do?
This is a forum for experts, not for time-wasters! |
|
Back to top |
|
|
|