Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
anilkona
Participant
Posts: 50 Joined: Mon Nov 15, 2004 6:18 pm
Post
by anilkona » Fri Jul 15, 2005 11:53 am
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
bcarlson
Premium Member
Posts: 772 Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota
Post
by bcarlson » Fri Jul 15, 2005 12:02 pm
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.
pnchowdary
Participant
Posts: 232 Joined: Sat May 07, 2005 2:49 pm
Location: USA
Post
by pnchowdary » Fri Jul 15, 2005 12:20 pm
Hi Anil,
Convert from EBCDIC to ASCII using the Ascii( ) function. That should take care of your problem.
Thanks,
Naveen
anilkona
Participant
Posts: 50 Joined: Mon Nov 15, 2004 6:18 pm
Post
by anilkona » Fri Jul 15, 2005 12:43 pm
I tried ASCII() as well, it does not seem to work
pnchowdary
Participant
Posts: 232 Joined: Sat May 07, 2005 2:49 pm
Location: USA
Post
by pnchowdary » Fri Jul 15, 2005 1:05 pm
Hi Anil,
Is your input column a COMP field or a regular field?
anilkona
Participant
Posts: 50 Joined: Mon Nov 15, 2004 6:18 pm
Post
by anilkona » Fri Jul 15, 2005 2:05 pm
No.its not a COMP field. When I imported metadata for that table, DataStage recognised it as Binary SQL Type.
-Anil
anilkona
Participant
Posts: 50 Joined: Mon Nov 15, 2004 6:18 pm
Post
by anilkona » Fri Jul 15, 2005 8:12 pm
When I use IConv with "MX0C" code, its returning "40404 "
The hexadecimal value I am trying to convert is "4040404040404040F1F0F1F9".
thanks,
-Anil