Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
sanil m

New User

Joined: 24 Aug 2007
Posts: 38
Location: chennai

 Posted: Thu Nov 29, 2007 10:00 pm    Post subject: null indicator value -2 Hi, What can we infer if the value of null indicator is -2, -1? Can it take positive value also?. Please help.

stodolas

Active Member

Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

 Posted: Thu Nov 29, 2007 10:35 pm    Post subject: 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.
stodolas

Active Member

Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

 Posted: Thu Nov 29, 2007 10:35 pm    Post subject: Sorry, correction/clarification Negative values mean the value is NULL Non-Negative values mean the value is NOT NULL
Phrzby Phil

Active Member

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

Posted: Thu Nov 29, 2007 10:54 pm    Post subject:

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.
stodolas

Active Member

Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

 Posted: Thu Nov 29, 2007 10:57 pm    Post subject: 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.
sanil m

New User

Joined: 24 Aug 2007
Posts: 38
Location: chennai

 Posted: Thu Nov 29, 2007 11:07 pm    Post subject: Reply to: null indicator value -2 thanx all of u!!!!..
sanil m

New User

Joined: 24 Aug 2007
Posts: 38
Location: chennai

 Posted: Thu Nov 29, 2007 11:13 pm    Post subject: so can it take +ve values also.. if than what does value +1, +2 indicate ?
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us