How to use EReplace() function in Transformer Stage

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
chubscher
Premium Member
Premium Member
Posts: 1
Joined: Mon Jun 18, 2012 1:34 pm
Location: McLean, VA
Contact:

How to use EReplace() function in Transformer Stage

Post by chubscher »

In DataStage 8.5, how does one use the EReplace Basic Programming Function in a Transformer Stage in a Parallel Job? I have tried to create custom routines that call EReplace() and they compile and test fine but will not work in the Transformer Stage's Derivation field.

My goal is to take a text string and replace patterns of characters with one character. For example "&" with "&".

Now I have tried creating a Parallel Routine using copy of pxEReplace() C routine and compiled using g++ with recommended compiler options.

g++ -fPIC -Wno-deprecated -m64 -mtune=generic -mcmodel=small -export=dynamic -c pxEreplace.C -o pxEreplace.o

Running on RHEL 64 bit linux server.

I can call it in the Transformer Stage but the DS job errors out with the following and we have not been able to resolve the situation, our first parallel custom routine, hence we then looked at EReplace() function as possible solution.

The runtime error if following:

Transformer_Controls_What_Data_Goes_Down_Each_Output_Link: Failed to load the library "V0S43_JSONXML2Oracle_PROJECT_carl_0412a_Transformer_Controls_What_Data_Goes_Down_Each_Output_Link.so"; either the directory containing the library file
is not on the library search path, or the library was compiled on a system
that is incompatible with this system: Could not load "V0S43_JSONXML2Oracle_PROJECT_carl_0412a_Transformer_Controls_What_Data_Goes_Down_Each_Output_Link":
/apps/DSPROJECT/EDWInfo/RT_BP675.O/V0S43_JSONXML2Oracle_PROJECT_carl_0412a_Transformer_Controls_What_Data_Goes_Down_Each_Output_Link.so:
undefined symbol: _Z10pxEreplaceaaaii.


Any help GREATLY APPRECIATED.
Carl Hubscher
MITRE Corporation
aravindunni31
Participant
Posts: 27
Joined: Mon Jul 09, 2012 6:51 am
Location: Chennai

Re: How to use EReplace() function in Transformer Stage

Post by aravindunni31 »

This Post Will Help You


viewtopic.php?p=432207&highlight=#432207


Regards
Aravind V A
DataStage Developer
Post Reply