Page 1 of 1

How to use EReplace() function in Transformer Stage

Posted: Wed Apr 17, 2013 10:25 pm
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.

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

Posted: Thu Apr 18, 2013 5:11 am
by aravindunni31
This Post Will Help You


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


Regards
Aravind V A
DataStage Developer