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

Declaring Floating point value in DB2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sxv8193

New User


Joined: 25 Jun 2007
Posts: 5
Location: pune

PostPosted: Wed Jul 04, 2007 5:42 pm
Reply with quote

Hi,

Can one tell me how to declare floating point value in DB2. eg: 23.789

Thanks
sunny
Back to top
View user's profile Send private message
jayachandra

New User


Joined: 08 Mar 2007
Posts: 3
Location: mumbai

PostPosted: Wed Jul 04, 2007 5:47 pm
Reply with quote

Hi
if mean to say the column declaration
then delcare it as Column_name DECIMAL(5,3)
Back to top
View user's profile Send private message
sxv8193

New User


Joined: 25 Jun 2007
Posts: 5
Location: pune

PostPosted: Wed Jul 04, 2007 5:57 pm
Reply with quote

Hi,

You mentioned DECIMAL(5,3) means length of the data item is 5 and decimal point start after 2nd digit.what iam telling is correct or not ?.
if iam wrong please let me know.

Thanks
sunny
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 Jul 05, 2007 5:50 pm
Reply with quote

The manual (easy enough to find) is clear:

Single precision floating point: REAL
Double precision floating point: either DOUBLE or FLOAT

DECIMAL is packed-decimal with implicit decimal point.
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 Point and Shoot )PTNS TSO/ISPF 0
No new posts A directory in the pathname was not f... ABENDS & Debugging 0
No new posts How to remove DECIMAL POINT (.) from ... SYNCSORT 10
No new posts Online Assembler Program Starting point PL/I & Assembler 4
No new posts how to convert fixed-point data forma... DFSORT/ICETOOL 4
Search our Forums:

Back to Top