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

Conversion to decimal


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
Search our Forums:

Back to Top