Best way to implement a business logic in C

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
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Best way to implement a business logic in C

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Depends upon what your comfortable with. I prefer C routines.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Post by pavankvk »

DSguru2B wrote:Depends upon what your comfortable with. I prefer C routines. ...
is there a performance penalty of using a build op?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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 :)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Should have asked you this before, what such functionality are you looking to implement?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Post 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..
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

And none of them are compiling. Is that what you are saying?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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. :)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply