Page 1 of 1
Hexadecimal to Char
Posted: Fri Jul 15, 2005 11:53 am
by anilkona
I am trying to convert Hexadecimal value to Char.
The Hexadecimal value for example is in the format '4040404040404040F1F0F1F9' which is equivalent to ' 1019'.
I tried using OConv with codes "MCXD", "MCX".
Any ideas?
Thanks,
-Anil
Posted: Fri Jul 15, 2005 12:02 pm
by bcarlson
The hex text you sent is EBCDIC (40 = space, F1 = '1', F0 = '0', F9 = '9'). In your import / Sequential Stage you should be able to automatically convert from EBCDIC to ASCII.
Posted: Fri Jul 15, 2005 12:20 pm
by pnchowdary
Hi Anil,
Convert from EBCDIC to ASCII using the Ascii( ) function. That should take care of your problem.
Thanks,
Naveen
Posted: Fri Jul 15, 2005 12:43 pm
by anilkona
I tried ASCII() as well, it does not seem to work
Posted: Fri Jul 15, 2005 1:05 pm
by pnchowdary
Hi Anil,
Is your input column a COMP field or a regular field?
Posted: Fri Jul 15, 2005 2:05 pm
by anilkona
No.its not a COMP field. When I imported metadata for that table, DataStage recognised it as Binary SQL Type.
-Anil
Posted: Fri Jul 15, 2005 8:12 pm
by anilkona
When I use IConv with "MX0C" code, its returning "40404 "
The hexadecimal value I am trying to convert is "4040404040404040F1F0F1F9".
thanks,
-Anil