Need Help To implement pxEreplace()
Moderators: chulett, rschirm, roy
Need Help To implement pxEreplace()
Hi,
I am trying to implement something like this for the first time, and need help from you.
I have taken the latest code by Phil Hibbs. Then as per below instruction I follow.
1. Copy the source code to a file pxEreplace.cpp into my home directory
2. Run below command
/opt/SUNWspro/bin/CC -dalign -O -PIC -library=iostream -c -xarch=v9 pxEreplace.cpp
And that creates a pxEreplace.o file in the same directory
3. Copy the output from the same directory into the DataStage library directory
cp pxEreplace.o `cat /.dshome`/../PXEngine/lib/pxEreplace.o
Step 3 is failing
cat: cannot open /.dshome
cp: cannot create /../PXEngine/lib/pxEreplace.o: No such file or directory
I am trying to implement something like this for the first time, and need help from you.
I have taken the latest code by Phil Hibbs. Then as per below instruction I follow.
1. Copy the source code to a file pxEreplace.cpp into my home directory
2. Run below command
/opt/SUNWspro/bin/CC -dalign -O -PIC -library=iostream -c -xarch=v9 pxEreplace.cpp
And that creates a pxEreplace.o file in the same directory
3. Copy the output from the same directory into the DataStage library directory
cp pxEreplace.o `cat /.dshome`/../PXEngine/lib/pxEreplace.o
Step 3 is failing
cat: cannot open /.dshome
cp: cannot create /../PXEngine/lib/pxEreplace.o: No such file or directory
Manoj
Are you not familiar with the find command in UNIX? Searching for "PXEngine" should turn everything up. Bare minimum would be:
Code: Select all
find / -name PXEngine -print
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I copied the pxEreplace.o to my PXEngine/lib directory
(/unit/sys/IS91/IBM/Infoserver/PXEngine/lib)
And after setting the parallel routine properties I have called the rountine from a transformer pxEreplace(lnkReadInvRel.InvestmentID, ".OLD", "", 1,0). The job aborted with below error
Failed to load the library "V0S3_CopyOfG_TRANS_INV_RELIEF_SETUP_xfmTransInvRelSetup.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 "V0S3_CopyOfG_TRANS_INV_RELIEF_SETUP_xfmTransInvRelSetup": ld.so.1: osh: fatal: relocation error: file /unit/apps/nylim/IS87/projects/nylim-GENEVA/RT_BP256.O/V0S3_CopyOfG_TRANS_INV_RELIEF_SETUP_xfmTransInvRelSetup.so: symbol __1cKpxEreplace6FWWWii_pc_: referenced symbol not found.
(/unit/sys/IS91/IBM/Infoserver/PXEngine/lib)
And after setting the parallel routine properties I have called the rountine from a transformer pxEreplace(lnkReadInvRel.InvestmentID, ".OLD", "", 1,0). The job aborted with below error
Failed to load the library "V0S3_CopyOfG_TRANS_INV_RELIEF_SETUP_xfmTransInvRelSetup.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 "V0S3_CopyOfG_TRANS_INV_RELIEF_SETUP_xfmTransInvRelSetup": ld.so.1: osh: fatal: relocation error: file /unit/apps/nylim/IS87/projects/nylim-GENEVA/RT_BP256.O/V0S3_CopyOfG_TRANS_INV_RELIEF_SETUP_xfmTransInvRelSetup.so: symbol __1cKpxEreplace6FWWWii_pc_: referenced symbol not found.
Manoj
I have gone through the old post on this error message, I force compile the job, rename the transformer stage but the error is same.
Few Input that may help you.
command to create the .o file
/opt/SUNWspro/bin/CC -dalign -O -PIC -library=iostream -c -xarch=v9 /unit/sys/IS91/IBM/Infoserver/PXEngine/lib/pxEreplace.cpp
Properties :
Routine Name: pxEreplace
Type: External Function
External Sub routine name: pxEreplace
Object Type: object
Return: char*
Lib Path: /unit/sys/IS91/IBM/Infoserver/PXEngine/lib/pxEreplace.o
Few Input that may help you.
command to create the .o file
/opt/SUNWspro/bin/CC -dalign -O -PIC -library=iostream -c -xarch=v9 /unit/sys/IS91/IBM/Infoserver/PXEngine/lib/pxEreplace.cpp
Properties :
Routine Name: pxEreplace
Type: External Function
External Sub routine name: pxEreplace
Object Type: object
Return: char*
Lib Path: /unit/sys/IS91/IBM/Infoserver/PXEngine/lib/pxEreplace.o
Manoj
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
pxEreplace is a bad idea. It is impossible to implement a string replacement function in DataStage without introducing either contention or a memory leak*. Sorry. What IBM desperately need to do is to allow std::string parameters (and return type) for parallel routines. That is, after all, precisely what std::string was invented for.
* There may be some way to use a static buffer, but you would have to make sure that two threads don't both try to access the same buffer at the same time.
cat /.dshome
If that says that it cannot open the file, then I would say that your DataStage environment is not set up correctly as that file has always existed on all the systems that I've worked on. Maybe someone else can help with that part, I'm no expert on installing and setting up DataStage.
Unfortunately I don't have any more time to look into this, and don't have access to a DataStage environment anyway (working on an Oracle project at the moment).
* There may be some way to use a static buffer, but you would have to make sure that two threads don't both try to access the same buffer at the same time.
Is there a file in your root directory called .dshome? Can you try the following command:hi_manoj wrote:Step 3 is failing
cat: cannot open /.dshome
cat /.dshome
If that says that it cannot open the file, then I would say that your DataStage environment is not set up correctly as that file has always existed on all the systems that I've worked on. Maybe someone else can help with that part, I'm no expert on installing and setting up DataStage.
Unfortunately I don't have any more time to look into this, and don't have access to a DataStage environment anyway (working on an Oracle project at the moment).
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant