Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10326
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: 4650
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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us