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

Question about null indicator


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

New User


Joined: 21 Feb 2007
Posts: 72
Location: US

PostPosted: Sun Apr 06, 2008 2:09 am
Reply with quote

In this thead, MKP stated:
Quote:
Use the NULL-INDICATOR to handle this condition.

move -1 to the indicator if the value is NUll.

In the embedded SQL statements we need to add this indiactor with the data host variable

Can somebody tell the use of null indicator i.e -1 in this cae?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Apr 06, 2008 2:23 am
Reply with quote

ashok_uddaraju wrote:
Can somebody tell the use of null indicator i.e -1 in this cae?
Try looking it up....
Specify the null value. A negative value of the indicator variable specifies the null value. A -1 value indicates that the value that was selected was the null value.
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Sun Apr 06, 2008 11:43 am
Reply with quote

[/quote]
Can somebody tell the use of null indicator i.e -1 in this cae?[/quote]

Null Indicator:

zero indicates that the value is not null
-1 indicates that the value is null
-2 indicates data truncation..

Please correct me if i am worng
Back to top
View user's profile Send private message
sagard

New User


Joined: 16 May 2007
Posts: 4
Location: Pune

PostPosted: Sun Apr 06, 2008 4:23 pm
Reply with quote

[/quote]
Can somebody tell the use of null indicator i.e -1 in this case?[/quote]

I am a bit confused, can we have a Null indicator for a non-nullable field?
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: Sun Apr 06, 2008 6:40 pm
Reply with quote

Hello,

Quote:
can we have a Null indicator for a non-nullable field?
No, by the definition of a non-nullable field. . . It will never be null as it will never have an associated null-indicator.

A field may have a value of -1, but that does not make the field null (neither does a value of binary zeros (low-values)). It is only when the null indicator is -1 is the field null.

I'd suggest you look in the db2 manuals (linked to via "IBM Manuals" at the top of the page for more complete info about null.
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 Question for file manager IBM Tools 7
No new posts Adding 'ODD' and 'EVEN' indicator at ... DFSORT/ICETOOL 6
No new posts question for Pedro TSO/ISPF 2
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
Search our Forums:

Back to Top