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

null indicator value -2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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

Senior Member


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

PostPosted: Thu Nov 29, 2007 10:54 pm
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
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
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
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 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