View previous topic :: View next topic
|
Author |
Message |
ashok_uddaraju
New User
Joined: 21 Feb 2007 Posts: 72 Location: US
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
sri_mf
Active User
Joined: 31 Aug 2006 Posts: 218 Location: India
|
|
|
|
[/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 |
|
|
sagard
New User
Joined: 16 May 2007 Posts: 4 Location: Pune
|
|
|
|
[/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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|