Using API functions in parallel rouitne

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
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

Using API functions in parallel rouitne

Post by umamahes »

HI,

can any one help me how to write a c++ routine using api functions in parallel job.i wrote the code like below

#include <dsapi.h>
DSPROJECT DSOpenProject(
char *ProjectName
);
DSJOB DSOpenJob(
DSPROJECT ProjectHandle,
char *JobName
);
int DSGetJobInfo(
DSJOB JobHandle,
int InfoType,
DSJOBINFO *ReturnInfo
);

when i compiled this code i am getting the fowlling error

"dsApi.C", line 1.10: 1540-0836 (S) The #include file <dsapi.h> is not found.
make: 1254-004 The error code from the last command is 1.
HI
ganesh123
Participant
Posts: 70
Joined: Tue Feb 20, 2007 3:22 pm
Location: NJ,USA
Contact:

Re: Using API functions in parallel rouitne

Post by ganesh123 »

umamahes wrote:
#include <dsapi.h>

when i compiled this code i am getting the fowlling error

"dsApi.C", line 1.10: 1540-0836 (S) The #include file <dsapi.h> is not found.
make: 1254-004 The error code from the last command is 1.
Not sure but may be $INCLUDE DSINCLUDE DSAPI.H
If women didn't exist, all the money in the world would have no meaning.
-- Aristotle Onassis
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

dsapi.h is in the $DSHOME/dsdk/include directory
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
clj242021
Participant
Posts: 33
Joined: Mon Feb 12, 2007 2:54 am

Re: Using API functions in parallel rouitne

Post by clj242021 »

umamahes wrote: "dsApi.C", line 1.10: 1540-0836 (S) The #include file <dsapi.h> is not found.
make: 1254-004 The error code from the last command is 1.
If you write a c++ routine using api functions ,you must use "dsapi.h" and
"vmdsapi.so"
dsapi.h is located in the directory $DSHOME/include
vmdsapi.so is located in the directory $DSHOME/lib
clj242021
Participant
Posts: 33
Joined: Mon Feb 12, 2007 2:54 am

Re: Using API functions in parallel rouitne

Post by clj242021 »

umamahes wrote: "dsApi.C", line 1.10: 1540-0836 (S) The #include file <dsapi.h> is not found.
make: 1254-004 The error code from the last command is 1.
note:you must use correct parameter to compile the *.C ,otherwise DS can't execute the routine
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

HI

Post by umamahes »

How can i give the path in the c++ code.

can you please give me an example with the code i have posted

Thaks
Uma
HI
clj242021
Participant
Posts: 33
Joined: Mon Feb 12, 2007 2:54 am

Re: HI

Post by clj242021 »

umamahes wrote:How can i give the path in the c++ code.

can you please give me an example with the code i have posted

Thaks
Uma
copy the "dsapi.h" to you *.C directory
Post Reply