Using datastage server 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
nitingupta
Participant
Posts: 22
Joined: Fri Jul 26, 2013 9:43 am
Location: PUNE

Using datastage server routines in Parallel Jobs

Post by nitingupta »

Hi All,

I do have a server routine which replaces all the new line characters and some special characters which i am using for each of char and varchar fields in existing design. However server routine does not work in parallel jobs also I've not used parallel routines ever but we need to implement the same Using Parallel Job. Is there any way to do the same except using derivation in transformer stage for each column?

Logic used in server routine is like below:

ereplace(convert(char(10):char(13),' '),'|',' ',-1)


Thank you,
Nitin Gupta
NITIN GUPTA
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course. You really should become intimately familiar with all of the parallel functions you have at your disposal. Documented online here. I personally would prefer that you go through the documentation and try to solve this yourself rather than just providing the code that you would need. Teach a man to fish and all that...

But of course, make sure you come back and ask questions when you have them!
-craig

"You can never have too many knives" -- Logan Nine Fingers
nitingupta
Participant
Posts: 22
Joined: Fri Jul 26, 2013 9:43 am
Location: PUNE

Post by nitingupta »

Thanks craig for the pointer, However we need some generic solution like routine as we need to apply it in multiple jobs for n number of columns . I am aware that we can go for a parallel routine in C++ and use object file of that in parallel routine. Still if there is any other pointer that we can use will be more helpful.
NITIN GUPTA
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well... this is all IMHO and others are encouraged to chime in as well but I wouldn't head to a C++ custom routine solution for something simple like the example you posted. Save that approach for times when the function either needs to be complex or adds functionality that does not exist in what the product currently delivers.

If you need reusable logic you may want to look into Shared Containers for something like that. As with most this it... depends.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Ereplace() is available as a parallel function in version 11.x.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yup. That should have been the first discovery in the documentation. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply