Page 1 of 1

Best way to implement a business logic in C

Posted: Tue Jan 23, 2007 4:07 pm
by pavankvk
Assuming that we have to accomplish a particular functionality in C. whats the best way to call it in datastage?

using the build op or generating a library and call it in a transformer?

tia

Posted: Tue Jan 23, 2007 4:10 pm
by DSguru2B
Depends upon what your comfortable with. I prefer C routines.

Posted: Tue Jan 23, 2007 4:13 pm
by pavankvk
DSguru2B wrote:Depends upon what your comfortable with. I prefer C routines. ...
is there a performance penalty of using a build op?

Posted: Tue Jan 23, 2007 5:57 pm
by DSguru2B
I have never used a buildop so cannot comment on that but I dont see why there will be a performance penalty. Build your C code, run it as a routine and buildop, do some benchmark tests. Let us know what you find :)

Posted: Tue Jan 23, 2007 8:00 pm
by ray.wurlod
Challenge the assumption.

You've just spent $squillion on a GUI tool that can do the job AND generate C++ code.

So why do you have to "implement a business logic in C" ?!!

Do it in DataStage. Open the generated C++ code generated by compiling the Transformer stage, copy the code into a document, and present it to "them". Tell them you implemented it in C. Because you did.

Posted: Tue Jan 23, 2007 9:48 pm
by DSguru2B
Should have asked you this before, what such functionality are you looking to implement?

Posted: Thu Jan 25, 2007 1:54 pm
by pavankvk
its basically different rules for cleaning input data..there are many such rules that we felt transformer can be too bulky..so we wrote different functions in a build op..

Posted: Thu Jan 25, 2007 1:56 pm
by DSguru2B
And none of them are compiling. Is that what you are saying?

Posted: Thu Jan 25, 2007 2:11 pm
by pavankvk
DSguru2B wrote:And none of them are compiling. Is that what you are saying? ...
i didnt get u..what do u mean by none of them are compiling..yes we had issues when compiling transformers which had lot of code..but the requirements are so weird that we had to go for a c implementaion in build op. but there was some debate over using a buildop or making them as uder defined routines and calling htem in a transformer

Posted: Thu Jan 25, 2007 2:13 pm
by DSguru2B
pavankvk wrote: i didnt get u..what do u mean by none of them are compiling..yes we had issues when compiling transformers which had lot of code..but the requirements are so weird that we had to go for a c implementaion in build op. but there was some debate over using a buildop or making them as uder defined routines and calling htem in a transformer
Never mind. For some reason when you said C functions i guessed it would be routine and not a buildop. I missed that you had mentioned buildop in your previous post.

And what do you mean that you cannot use the transformer. As Ray noted that your company paid big bucks to get this product. Use it. Instead of re-inventing the wheel. Just a suggestion. :)