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
 

 

Declaring Floating point value in DB2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Declaring Floating point value in DB2
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    Post subject:
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    Post subject: Re: Declaring Floating point value in DB2
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

Active Member


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

PostPosted: Thu Jul 05, 2007 5:50 pm    Post subject:
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    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 Online Assembler Program Starting point Aditya.Srivastava PL/I & Assembler 4 Fri Jul 08, 2016 6:48 pm
No new posts how to convert fixed-point data forma... Roland Brosio DFSORT/ICETOOL 4 Mon Mar 16, 2015 6:16 pm
No new posts ICETool : manipulating floating point... Frank Cukerman DFSORT/ICETOOL 9 Tue Feb 17, 2015 9:23 pm
No new posts decimal floating point conversion error Joris van der Steen DB2 2 Thu Jan 08, 2015 9:26 pm
No new posts Declaring numeric variable to handle ... Ranjith741 COBOL Programming 12 Wed Apr 30, 2014 12:02 pm


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