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

Null Indicator/Null Value and Low value


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Mon Jan 11, 2010 1:06 am
Reply with quote

Suppose, there is a file as an output of the values in Database;

There are two cases now, a field set as Null in DataBase
second, some other field set as Not Null in database.

How would the file look like in both the cases?

My Mainframe session is down so i can't check it.

By how would the file look like is, i just want to know the combinations while Hex is on, i want to know the combinations of

? followed by some values, or , ? followed by zeros, or, absence of ?

i want to know all such combinations, which are valid/invalid; normal/abnormal case.

I am also trying to determine that Null and low vales are two different things also, at times Null is equivalent to Low values(please correct if i am going wrong somewahere).

I would really appreciate if i can get some supporting examples.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Jan 11, 2010 2:06 am
Reply with quote

Quote:
at times Null is equivalent to Low values(please correct if i am going wrong somewahere).
You are going extremely wrong right here. Null is never equivalent to low values. For a database field to be null (and only database fields can be null -- the concept of null does not exist for a file), there actually is a separate field associated to the database field. This separate nulls field is a binary flag (true meaning the field has no value, no matter what the bits look like, false meaning the field has a value, no matter what the bits look like -- or true and false could be reversed but the same two meanings apply).

As far as what an output file would look like, that depends upon the database software and for that you must consult the manual to find out how that specific database software handles null fields upon export. Without referencing the manual, all you can do is export and then look at the output in hex.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Jan 11, 2010 2:17 am
Reply with quote

rows in db2 do not have fields, they have columns.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 11, 2010 3:23 am
Reply with quote

Hello,

Why do you now have 2 topics about the same question. . .

Other than mis-use of terminology NULL and Low-Value / High-Value have nothing to do with each other. As you've been told before NULL is the absence of any value and the lo/hi values are values.

At the top of the page is a link to "IBM Manuals" among which are several sets of db2 manuals. You need to read about NULL in the manuals for your release of db2.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jan 11, 2010 5:37 pm
Reply with quote

Quote:
My Mainframe session is down so i can't check it.
Wait for some time, it must be up...

And following three sentences
meenakshi_forum wrote:
There are two cases now, a field set as Null in DataBase
second, some other field set as Not Null in database.

How would the file look like in both the cases?
appeared in the same hierarchy, in your post, as I quote them - and due to them, now I'm not sure what you are asking for? NULL is a concept which Robert has explained in golden words. BUT are you talking about DB or files?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jan 11, 2010 5:40 pm
Reply with quote

Another thought, did you mean if a colum is defined as NOT NULL and then (for an experiment) defined the same column as NULL and one unload the db2-table to a file - what difference would it make to the column values which were unloaded to the file, in both the cases?
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 Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Adding 'ODD' and 'EVEN' indicator at ... DFSORT/ICETOOL 6
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
No new posts Uploading from desktop, a CSV file, s... DB2 2
Search our Forums:

Back to Top