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
 

 

null indicator value -2

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

New User


Joined: 24 Aug 2007
Posts: 38
Location: chennai

PostPosted: Thu Nov 29, 2007 10:00 pm    Post subject: null indicator value -2
Reply with quote

Hi,

What can we infer if the value of null indicator is -2, -1?

Can it take positive value also?.

Please help.
Back to top
View user's profile Send private message

stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Nov 29, 2007 10:35 pm    Post subject:
Reply with quote

If it is negative, it doesn't matter how big negative it is, so -2 and -1 imply the same thing, the value is negative. 1, 2, 3 all imply that the field is not null.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Nov 29, 2007 10:35 pm    Post subject:
Reply with quote

Sorry, correction/clarification

Negative values mean the value is NULL
Non-Negative values mean the value is NOT NULL
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Thu Nov 29, 2007 10:54 pm    Post subject:
Reply with quote

This field is more precisely known as the Indicator, but as it is used mostly to indicate NULL's, it is informally known as the Null Indicator.

Other values are documented. From the IBM website:

Quote:
The purposes of the indicator variable are to:

1. 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.
A -2 value indicates that a numeric conversion or arithmetic expression error occurred in the SELECT list of an outer SELECT statement.
A -3 value indicates that values were not returned for the row because a hole was detected on a multiple row FETCH. The value of -3 is used only for multiple-row FETCH statements; otherwise, the only indication of a hole is a warning.
2. Record the original length of a truncated string.
3. Indicate that a character could not be converted.
4. Record the seconds portion of a time if the time is truncated on assignment to a host variable.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Thu Nov 29, 2007 10:57 pm    Post subject:
Reply with quote

Thanks for the correcting me, I don't have ready access to the docs. But the info you give doesn't say anything about using the indicator for an INSERT, UPDATE, or DELETE.
Back to top
View user's profile Send private message
sanil m

New User


Joined: 24 Aug 2007
Posts: 38
Location: chennai

PostPosted: Thu Nov 29, 2007 11:07 pm    Post subject: Reply to: null indicator value -2
Reply with quote

thanx all of u!!!!..
Back to top
View user's profile Send private message
sanil m

New User


Joined: 24 Aug 2007
Posts: 38
Location: chennai

PostPosted: Thu Nov 29, 2007 11:13 pm    Post subject:
Reply with quote

so can it take +ve values also..
if than what does value +1, +2 indicate ?
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 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