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.