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: 10232
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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


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