Hi,
Can anybody please tell me how do i convert hexadecimal string to integer/bigint.
Is there any inbuilt function available for this conversion in Datastage?
Convert Hexadecimal String to Integer
Moderators: chulett, rschirm, roy
Convert Hexadecimal String to Integer
Nirmal Sharma
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You could use a BASIC Transformer stage and there employ the Oconv() function with "MX0C" as its second argument.
I don't believe there's an out-of-the-box function in the parallel Transformer, but there's nothing to stop you writing your own. Traverse the string from right to left multiplying each hex digit by the appropriate power of 16 and accumulate the result.
I don't believe there's an out-of-the-box function in the parallel Transformer, but there's nothing to stop you writing your own. Traverse the string from right to left multiplying each hex digit by the appropriate power of 16 and accumulate the result.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.