View previous topic :: View next topic
|
Author |
Message |
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
Back to top |
|
|
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
Thanks Rohit, NUMERIC DIGITS 15 is given desired result. |
|
Back to top |
|
|
|