IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 NULL Values display


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Sep 07, 2017 6:59 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10803
Location: italy

PostPosted: Thu Sep 07, 2017 7:08 pm
Reply with quote

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.


icon_question.gif icon_question.gif icon_question.gif

the issue has been discussed so many times that it has become pretty boring
topic is going to be locked shortly
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2803
Location: NYC,USA

PostPosted: Fri Sep 08, 2017 12:20 am
Reply with quote

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
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1266
Location: Vilnius, Lithuania

PostPosted: Fri Sep 08, 2017 1:56 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SDSF display Max-RC in different colors TSO/ISPF 4
No new posts How to move values from single dimens... COBOL Programming 1
No new posts check if two PD values are equal, no ... DFSORT/ICETOOL 4
No new posts Combining Multiple Row Values into Si... DB2 3
No new posts Uploading from desktop, a CSV file, s... DB2 2
Search our Forums:

Back to Top