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
 

 

Conversion to decimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
chennareddy

New User


Joined: 22 Dec 2005
Posts: 11

PostPosted: Tue May 27, 2008 4:36 pm    Post subject: Conversion to decimal
Reply with quote

Hi,

I have executed one SQL query in REXX. In that one particular column is decimal. But rexx after executing the query shows that particular value without decimal point in it.

Could anyone please let me know who to change that value to contain decimal in it.

Can it be changed while executing the queryitself.
If not what is the other process.


Thanks,
Chennareddy
Back to top
View user's profile Send private message

cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Tue May 27, 2008 6:54 pm    Post subject: Reply to: Conversion to decimal
Reply with quote

Can you simply divide by 100 to indicate the decimal?

Code:

/* REXX */             
TRACE "I"             
NUMBER = 199375       
DECNUM = NUMBER/100   
SAY DECNUM             
EXIT                   


Code:

      3 *-* NUMBER = 199375     
        >L>   "199375"           
      4 *-* DECNUM = NUMBER/100 
        >V>   "199375"           
        >L>   "100"             
        >O>   "1993.75"         
      5 *-* SAY DECNUM           
        >V>   "1993.75"         
 1993.75                         
      6 *-* EXIT                 
Back to top
View user's profile Send private message
chennareddy

New User


Joined: 22 Dec 2005
Posts: 11

PostPosted: Wed May 28, 2008 9:14 am    Post subject: Reply to: Conversion to decimal
Reply with quote

The above works fine..
I was wondering if there is a way to fetch the corrct format from SQL query itself.

If there is please let me know..

Thanks,
ChennaReddy
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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