Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
chennareddy

New User


Joined: 22 Dec 2005
Posts: 9

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
References
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 280
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: 9

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1