Ereplace in parallel

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
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Ereplace in parallel

Post by G SHIVARANJANI »

Hi,

I have a string with a1,a2,a3.....i just want to apply transforamtion where the string becomes a1YYa2YYa3


Please suggest...

I tried using convert but it replaces 1 for 1

thanks
Shivaranjani
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

This might help you.

viewtopic.php?t=106358
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Maveric wrote:This might help you.

viewtopic.php?t=106358

Hello Maveric,

I could see the C code ....real helpfull....But how can i use this in the transformer stage... please guid me..

thanks
Shivaranjani
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Follow the steps to create a parallel function in the designer. I have not created a parallel function before :( . If you are sure it is only two instances of "," that you need to replace then then you might as well use a field() function to get the values a1, a2 and a3 and concatenate them with YY.
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Maveric wrote:Follow the steps to create a parallel function in the designer. I have not created a parallel function before :( . If you are sure it is only two instances of "," that you need to replace then then you might as well use a field() function to get the values a1, a2 and a3 and concatenate them with YY.
Hi Maveric,

"," can occure any number of times in this string.

how is the C code to be used in DS ?

Thanks
Shivaranjani
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Maveric wrote:Follow the steps to create a parallel function in the designer. I have not created a parallel function before :( . If you are sure it is only two instances of "," that you need to replace then then you might as well use a field() function to get the values a1, a2 and a3 and concatenate them with YY.
Hi Maveric,

"," can occure any number of times in this string.

how is the C code to be used in DS ?

Thanks
Shivaranjani
G SHIVARANJANI
Participant
Posts: 137
Joined: Sun Jan 07, 2007 11:17 pm
Location: VISAKHAPATNAM

Post by G SHIVARANJANI »

Maveric wrote:Follow the steps to create a parallel function in the designer. I have not created a parallel function before :( . If you are sure it is only two instances of "," that you need to replace then then you might as well use a field() function to get the values a1, a2 and a3 and concatenate them with YY.
Hi Maveric,

"," can occure any number of times in this string.

how is the C code to be used in DS ?

Thanks
Shivaranjani
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

You would have to compile the code from command line. Generate the .o file. Go to the repository, right click on routines and select parallel routines. Then follow the help.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The code not only has to be compiled, it also has to be linked to construct either a shared object or a function in a shared library.

The "parallel routine" that you create in DataStage is merely an interlude that provides instructions about the location of your (external) routine and its arguments.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply