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
 

 

DB2 NULL VALUE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
nidhi.palsule

New User


Joined: 17 Feb 2009
Posts: 9
Location: Pune

PostPosted: Wed Jun 02, 2010 6:19 pm    Post subject: DB2 NULL VALUE
Reply with quote

Hi,

My problem is that DB2 is not populating null value to host variable, but its only setting its indicator variable to -1. I have never noticed such a case. For eg:

SALARY is null for one particular row. When I fetch this row, indicator variable for salary is set to -1 but the host variable :Salary still contains the old value from previous fetch.

Does this happen with DB2, or I am missing something here?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Wed Jun 02, 2010 6:25 pm    Post subject:
Reply with quote

Quote:
Does this happen with DB2


yes that is the way is happens.

with what would you expect db2 to populate :Salary?

the fact that the column is null indicates that there is no value associated with this column.
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: Wed Jun 02, 2010 8:36 pm    Post subject:
Reply with quote

Hello,

Quote:
DB2 is not populating null value to host variable
Because there is no such thing as a "null value" in db2. . .

NULL is a condition not a value. One byte may contain a value from x'00' to x'FF' and none of these is a "null value". All 256 are valid non-null values. . .
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 -> PL/I & Assembler 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 GetObjectArrayElement returns NULL Majid Hussain Java & MQSeries 2 Wed Mar 30, 2016 2:59 am


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