How to create sub-routines in Parallel jobs?

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
mingzhang
Participant
Posts: 16
Joined: Fri Feb 27, 2009 3:31 pm

How to create sub-routines in Parallel jobs?

Post by mingzhang »

Just similar to "Server Routine" in server jobs.
The routine can be called within derivation expression.
It seems "Parallel Routine" is a different concept.
Can any one tells me how to create those sub-routines similar to "Server Routine"?

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Try searching here. There are lots of topics dedicated to parallel routines. You will even find code for some parallel routines.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
mingzhang
Participant
Posts: 16
Joined: Fri Feb 27, 2009 3:31 pm

Post by mingzhang »

"Parallel Routine" seems to be only called before or after a processing stage. It couldn't be called within the derivation expression (like those built-in functions, or similar to "server routine"). Correct me if I am wrong. :-)

I am wondering, in parallel jobs, how to create user-defined routines which can be called within the derivation expressions?
DSguru2B wrote:Try searching here. There are lots of topics dedicated to parallel routines. You will even find code for some parallel routines.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If its a "Transform Function" routine, only then you can call it inside the derivation, else if it is designated as "Before/After" job subroutine, you can only call it there.
As per your question
mingzhang wrote: I am wondering, in parallel jobs, how to create user-defined routines which can be called within the derivation expressions?
that is why I asked you to search.
In brief, you need to write a c/c++ function, test it out, create the object file, specify the locatiion of the object file while creating the routine. Once the interlude has been created, you will see it in the drop down section with in the derivation under Parallel Routines.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply