Parallel routine using API

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
sridharvis
Premium Member
Premium Member
Posts: 26
Joined: Thu Apr 17, 2008 1:38 pm
Location: Chennai

Parallel routine using API

Post by sridharvis »

Hi ,

I am trying to write the DataStage API "DSSetEnvVar" in my C++ Code,
I am trying to call the same in my transformer , where the Parameters I pass are (DSProjectName,$SK,lnk4.SK+1). I compile the code it is successful, but when i run the job it is getting aborted. I had created the object file as well, What should i correct inorder to make the code work.

Below is my C++ code

#include </opt/ds/7.5.2/Ascential/DataStage/DSEngine/include/dsapi.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
int DSSetEnvVar(DSPROJECT hProject,char *EnvVarName,char *Value);
{
return 0;
}

I compiled the above code as the following :-

/opt/SUNWspro/bin/CC -dalign -O -PIC -library=iostream -c Sample.cpp
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Probably help to share your 'abort', don't you think?
-craig

"You can never have too many knives" -- Logan Nine Fingers
sridharvis
Premium Member
Premium Member
Posts: 26
Joined: Thu Apr 17, 2008 1:38 pm
Location: Chennai

Post by sridharvis »

chulett wrote:Probably help to share your 'abort', don't you think?
I am sorry , here is the error message

Transformer_7: Failed to load the library "V0S7_pxTestJob_Transformer_7.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 "V0S7_pxTestJob_Transformer_7": ld.so.1: osh: fatal: relocation error: file /opt/dsproj/7.5.2/Ascential/DataStage/Projects/MedDev/RT_BP1103.O/V0S7_pxTestJob_Transformer_7.so: symbol __1cHtestfun6Fpc00_i_: referenced symbol not found.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

You missed to link the files required.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Post Reply