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

converting to numeric values in rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 18, 2010 2:06 pm
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
Reply with quote

Hello Enrico,

Thanks a lot, it worked very well.

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

Global Moderator


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

PostPosted: Thu Mar 18, 2010 6:01 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top