Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Question about null indicator

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ashok_uddaraju

New User


Joined: 21 Feb 2007
Posts: 70
Location: bangalore

PostPosted: Sun Apr 06, 2008 2:09 am    Post subject: Question about null indicator
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: 2150
Location: At my coffee table

PostPosted: Sun Apr 06, 2008 2:23 am    Post subject:
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: 216
Location: India

PostPosted: Sun Apr 06, 2008 11:43 am    Post subject: Re: Question about null indicator
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    Post subject:
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

Site Director


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

PostPosted: Sun Apr 06, 2008 6:40 pm    Post subject:
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    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 Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts Compare 2 files & write Indicator... nagendrapgupta SYNCSORT 5 Sun May 15, 2016 10:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us