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: 10274
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: 4649
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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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