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
 

 

hex to decimal conversion

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

Active User


Joined: 14 Jul 2005
Posts: 105

PostPosted: Wed Mar 19, 2014 11:31 am    Post subject: hex to decimal conversion
Reply with quote

Hi,

I have a hexadecimal value 4E96B4A0 and needs to convert to decimal. Used
X2D("4E96B4A0"), but giving "Incorrect call to routine" error.

Then I have removed that hex value last digit 0 ( X2D("4E96B4A")) and ran it is working fine.

please help me to convert the hexadecimal 4E96B4A0 value in normal decimal number
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed Mar 19, 2014 11:50 am    Post subject:
Reply with quote

try x2d(c2x("4E96B4A0"))

Also refer to

http://publib.boulder.ibm.com/infocenter/zvm/v6r1/index.jsp?topic=/com.ibm.zvm.v610.dmsb0/convrsn.htm
Back to top
View user's profile Send private message
raghavmcs

Active User


Joined: 14 Jul 2005
Posts: 105

PostPosted: Wed Mar 19, 2014 12:01 pm    Post subject:
Reply with quote

tried still getting the same error

20 +++ say x2d(c2x("4E96B4A0"))
IRX0040I Error running REXXREAD, line 20: Incorrect call to routine

Here the actual decimal digits have 10 digit number, but X2D is able to convert 8 digit number...
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed Mar 19, 2014 12:17 pm    Post subject:
Reply with quote

Usually this happens when value returned is more than 9 decimal digits. So try NUMBERIC DIGITS 15 (or whatever you feel the maximum should be.) near the top of your REXX program.

or you may also look for using combination of substr() and x2d().
Back to top
View user's profile Send private message
raghavmcs

Active User


Joined: 14 Jul 2005
Posts: 105

PostPosted: Wed Mar 19, 2014 1:18 pm    Post subject:
Reply with quote

Thanks Rohit, NUMERIC DIGITS 15 is given desired result.
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 File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm


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