converting int to bitstream

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

converting int to bitstream

Post by kavuri »

Hi,
I am getting a bigint(64 bit) from a DB2 database. Now I need to convert it into string[max=12]. My logic here to split 64 bit int into 8 X 8 bit fields and then consider each 8 bit as a char and then concatenate to form a string.
Can anybody give me an idea to solve this problem.
Thanks
Bhargava
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Apply Ockham's Razor - your "solution" is way too complex. Just use an inbuilt integer-to-string conversion function.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply