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
 

 

Insert of negative values.

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

New User


Joined: 03 Mar 2009
Posts: 12
Location: Chennai

PostPosted: Tue Mar 17, 2009 9:38 am    Post subject: Insert of negative values.
Reply with quote

I had a column BTG_AMT , which is declared as S9(9) comp-3. I had inserted the values -2300, -3500 etc . But in table these are stored as 2300 , 3500 . Is it possible to store the negative values like this ?
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: Tue Mar 17, 2009 9:49 am    Post subject:
Reply with quote

Hello,

If negative values are inserted into a table, they remain negative. Either they are not being stored correctly or when retrieved are not being shown properly. . .
Back to top
View user's profile Send private message
H Muraleedhar

New User


Joined: 03 Mar 2009
Posts: 12
Location: Chennai

PostPosted: Tue Mar 17, 2009 9:54 am    Post subject: Reply to: Insert of negative values.
Reply with quote

Thank you Dick. I will check the storing process once more. Because when I used to check the table ( through platinum ) , I see possitive values.
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: Tue Mar 17, 2009 10:01 am    Post subject:
Reply with quote

Hello,

Suggest you use SPUFI and insert a few rows with negative values, then run a SELECT query to show them. This will help identify if there is a table definition problem or the problem is in the code.
Back to top
View user's profile Send private message
H Muraleedhar

New User


Joined: 03 Mar 2009
Posts: 12
Location: Chennai

PostPosted: Tue Mar 17, 2009 11:33 am    Post subject:
Reply with quote

Thank you Dick.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Mar 17, 2009 1:43 pm    Post subject:
Reply with quote

Hi,

Is this been resolved?
Back to top
View user's profile Send private message
H Muraleedhar

New User


Joined: 03 Mar 2009
Posts: 12
Location: Chennai

PostPosted: Tue Mar 17, 2009 2:23 pm    Post subject:
Reply with quote

yes this was a problem with sign truncation while moving to host variables. Thank you Dick and others.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Mar 17, 2009 3:36 pm    Post subject:
Reply with quote

Fine - thanks for letting us know the final solution . . . icon_smile.gif
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: Tue Mar 17, 2009 9:23 pm    Post subject: Reply to: Insert of negative values.
Reply with quote

You're welcome - thank you for letting us know it is working icon_smile.gif

d
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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


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