View previous topic :: View next topic
|
Author |
Message |
zulfukharali
New User
Joined: 11 May 2006 Posts: 12
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Look at NUMERIC in the manual |
|
Back to top |
|
|
zulfukharali
New User
Joined: 11 May 2006 Posts: 12
|
|
|
|
Thanks expat. It worked out by changing the NUMERIC DIGITS 10.
Regards,
Zulfukhar |
|
Back to top |
|
|
|