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
 

 

converting to numeric values in rexx

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

New User


Joined: 04 Oct 2007
Posts: 12
Location: pune

PostPosted: Thu Mar 18, 2010 1:51 pm    Post subject: converting to numeric values in rexx
Reply with quote

Hi,

i am reading a report using rexx and getting certain values onto some variables.

but values are present as 1,960(commas between numbers).

so when i do any arthematic operations on thet values getting error as 'Bad arithmetic conversion'.

is there any way to convert those into numeric values in rexx?

ex: i want to convert 1,960 as 1960(without commas and should be numeric value).

please post your valuable suggestions, thanks.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Thu Mar 18, 2010 2:06 pm    Post subject: Reply to: converting to numeric values in rexx
Reply with quote

Code:
space(translate("1,234,567"," ",","),0)
Back to top
View user's profile Send private message
kanna n

New User


Joined: 04 Oct 2007
Posts: 12
Location: pune

PostPosted: Thu Mar 18, 2010 4:03 pm    Post subject: Reply to: converting to numeric values in rexx
Reply with quote

Hello Enrico,

Thanks a lot, it worked very well.

Regards
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Mar 18, 2010 6:01 pm    Post subject: Reply to: converting to numeric values in rexx
Reply with quote

SPACE and TRANSLATE are a few of of those key REXX functions along with PARSE. You should learn them well as you will use them a lot.
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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm


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