IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Convert the hexadecimal data into decimal format


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
zulfukharali

New User


Joined: 11 May 2006
Posts: 12

PostPosted: Sat Jul 21, 2007 4:34 am
Reply with quote

Hi,
I need to convert the hexadecimal data into decimal format.
When I tried the routine X2D it is throwing "INCORRECT CALL TO ROUTINE". The command I issued is X2D(substr(input_1.i,111,4))

When I use the routine C2D it is working for some records. When there is a overflow it is resulting in the error. For example, It is working for low value data's. I meant var=C2D(X'00003FB5') gives 16309 as the outcome. When the data goes as var=C2D(X'E9F35E03') it is resulting in the error. var is 10 byte field.

How to make a variable in double or float format? Please let me know how to interpret the 4 bytes of hexadecimal data into decimal.

Thanks in advance
ZA
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Jul 21, 2007 1:11 pm
Reply with quote

Look at NUMERIC in the manual
Back to top
View user's profile Send private message
zulfukharali

New User


Joined: 11 May 2006
Posts: 12

PostPosted: Mon Jul 23, 2007 9:57 pm
Reply with quote

Thanks expat. It worked out by changing the NUMERIC DIGITS 10.

Regards,
Zulfukhar
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top