Need function for converting binary number to decimal

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
Surya
Premium Member
Premium Member
Posts: 4
Joined: Mon Nov 27, 2006 12:16 pm

Need function for converting binary number to decimal

Post by Surya »

Hi all,

I have a requirement to prepare binary number from the input then convert it into decimal and sent it to database. I m trying to implement this logic in buildop stage. I read that buildop stage supports c++ programming, but here when I am trying to use atoi() function for converting binary number to decimal, I am getting an error that "atoi: prototype required". Is there any other alternative function for converting binary to decimal? or Is there any header file that I need to add to make this function work?

Here are the header files I added are,
apt_ util/ string. h and apt_ util/ decimal. h

Thanks in advance,
Surya
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

See if <b><a href="http://dsxchange.com/viewtopic.php?t=10 ... 8eb96d1cfb" target="_blank" class="postlink">this</a></b> post helps.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Post Reply