Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 NULL Values display

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 201
Location: USA

PostPosted: Thu Sep 07, 2017 6:59 pm    Post subject: DB2 NULL Values display
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Thu Sep 07, 2017 7:08 pm    Post subject: Reply to: DB2 NULL Values display
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

Senior Member


Joined: 21 Sep 2010
Posts: 1788
Location: NY,USA

PostPosted: Fri Sep 08, 2017 12:20 am    Post subject:
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

Senior Member


Joined: 07 Feb 2009
Posts: 1048
Location: Oostende, Belgium

PostPosted: Fri Sep 08, 2017 1:56 am    Post subject: Re: DB2 NULL Values display
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us