DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
nitingupta
Participant



Joined: 26 Jul 2013
Posts: 22
Location: PUNE
Points: 181

Post Posted: Fri Nov 30, 2018 10:33 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows
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

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42950
Location: Denver, CO
Points: 221500

Post Posted: Fri Nov 30, 2018 11:24 am Reply with quote    Back to top    

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

Now I've got that feeling once again, I can't explain; you would not understand
this is now who I am. I have become comfortably numb.
Rate this response:  
Not yet rated
nitingupta
Participant



Joined: 26 Jul 2013
Posts: 22
Location: PUNE
Points: 181

Post Posted: Fri Nov 30, 2018 11:53 am Reply with quote    Back to top    

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
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42950
Location: Denver, CO
Points: 221500

Post Posted: Fri Nov 30, 2018 3:29 pm Reply with quote    Back to top    

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

Now I've got that feeling once again, I can't explain; you would not understand
this is now who I am. I have become comfortably numb.
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54514
Location: Sydney, Australia
Points: 295617

Post Posted: Fri Nov 30, 2018 5:58 pm Reply with quote    Back to top    

Ereplace() is available as a parallel function in version 11.x.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42950
Location: Denver, CO
Points: 221500

Post Posted: Fri Nov 30, 2018 6:27 pm Reply with quote    Back to top    

Yup. That should have been the first discovery in the documentation. Wink

_________________
-craig

Now I've got that feeling once again, I can't explain; you would not understand
this is now who I am. I have become comfortably numb.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours