Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
raghavmcs

Active User

Joined: 14 Jul 2005
Posts: 105

 Posted: Wed Mar 19, 2014 11:31 am    Post subject: hex to decimal conversion 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

Rohit Umarjikar

Senior Member

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

 Posted: Wed Mar 19, 2014 11:50 am    Post subject: 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
raghavmcs

Active User

Joined: 14 Jul 2005
Posts: 105

 Posted: Wed Mar 19, 2014 12:01 pm    Post subject: 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...
Rohit Umarjikar

Senior Member

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

 Posted: Wed Mar 19, 2014 12:17 pm    Post subject: 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().
raghavmcs

Active User

Joined: 14 Jul 2005
Posts: 105

 Posted: Wed Mar 19, 2014 1:18 pm    Post subject: Thanks Rohit, NUMERIC DIGITS 15 is given desired result.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Code char set conversion from IBM-420... thelefthandofdarkness IBM Tools 4 Thu Jul 26, 2018 3:03 pm How can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm Conversion of DLI update Jobs as BMP ... Gopinath Shanmugam IMS DB/DC 3 Wed Dec 20, 2017 12:02 pm Conversion of UTF-8 to EBCDIC muralikrishnan_new COBOL Programming 1 Tue Nov 21, 2017 5:33 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us