Page 1 of 1

Parallel routine using API

Posted: Wed Dec 02, 2009 8:59 am
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

Posted: Wed Dec 02, 2009 9:23 am
by chulett
Probably help to share your 'abort', don't you think?

Posted: Wed Dec 02, 2009 12:50 pm
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.

Posted: Fri Dec 18, 2009 2:31 am
by JoshGeorge
You missed to link the files required.