Undefined symbol: .DSOpenProjectEx

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
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Undefined symbol: .DSOpenProjectEx

Post by rajan.n »

Hi All

I have a reqirement to use the DS functions in a c program, when i compile that i get the erors like
"
ld: 0711-317 ERROR: Undefined symbol: .DSOpenProjectEx
ld: 0711-317 ERROR: Undefined symbol: .DSOpenJob
ld: 0711-317 ERROR: Undefined symbol: .DSGetJobInfo
ld: 0711-317 ERROR: Undefined symbol: .DSCloseJob
ld: 0711-317 ERROR: Undefined symbol: .DSCloseProject
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
"

the code is below.

Code: Select all

#include <stdio.h>
#include <string.h>
#include<string.h>
#include</etl/Ascential/DataStage/DSEngine/include/dsapi.h>


int main()
{
DSPROJECT hProject;
DSJOB hJob;
int status;
char *project;
char *job;
DSJOBINFO jobInfo;
FILE *fp;
project = "ABC";
job = "job1";
int index;



hProject = DSOpenProject(project);
hJob = DSOpenJob(hProject,job);
status = DSGetJobInfo(hJob, DSJ_JOBSTARTTIMESTAMP, &jobInfo);
fp = fopen("Job.txt","w");
for ( index = 1 ; index <= 10; index++)
    fprintf(fp, "%s line number %d\n",ctime(&(jobInfo.info.jobStartTime)), status); 
fclose(fp);
(void) DSCloseJob(hJob);
(void) DSCloseProject(hProject);
return status;
}


can anybody help me in this issue , how to solve this.. need to use DS functions.
Thanks much in advance.
Rajan
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Instead of including the entire path of dsapi.h, try including just dsapi.h
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

DSguru2B wrote:Instead of including the entire path of dsapi.h, try including just dsapi.h
That says "can not find dsapi.h", have given the path of dsapi.h file.
the dsapi.h is working fine- this i can know by folowing
if i do include<dsapi.h> or remove that include
i get teh folowing errors...
DSPROJECT,DSJOB,DSJOBINFO...... these are the initialised in begin. so the error wil be same as undefined DSPROJECT .....and so on...
along with my prev errors..( like unknown DSOpenProject)

if i do include<..........path../dsapi.h> the above errors are not given and only the prev erors are thrown ( like unknown DSOpenProject)

can any one help me in this who has already used the DS functions in C language.

thanks ,
Rajan
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Is the project set up in PX so that transforms will compile and run? If yes, it would seem that the include file should import the definitions - can you try to add -bloadmap or -bnoquiet to the compile for additional information on why the DllImport didn't work as expected.
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

ArndW wrote:Is the project set up in PX so that transforms will compile and run? If yes, it would seem that the include file should import the definitions - can you try to add -bloadmap or -bnoquiet to the compile for additional information on why the DllImport didn't work as expected.
Hi ArndW.
Thanks for the reply,
can u please specify where to include this -bloadmap ?
i use
> /usr/vacpp/bin/xlC_r job1.c
this is my command.

thanks,
Rajan.
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

Hi ArndW,
the command for -bloadmap is
>/usr/vacpp/bin/xlC_r -b loadmap:a.txt job.c
the a.txt file has the following :

(ld): halt 4
(ld): setfflag 4
(ld): savename a.out
(ld): filelist 7 1
(ld): i /lib/crt0.o
(ld): i job.o
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/vacpp/lib/libC.a
(ld): lib /usr/lib/libpthreads.a
(ld): lib /usr/lib/libm.a
(ld): lib /usr/lib/threads/libc.a
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[shr_32.imp]: 402
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[shr2_32.imp]: 42
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[shr3_32.imp]: 33
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[ansi_32.imp]: 2360
LIBRARY: Shared object libC.a[ansi_32.o]: 2592 symbols imported.
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[shr_64.imp]: 0
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[shr2_64.imp]: 0
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[shr3_64.imp]: 0
LIBRARY: Symbols imported from import file /usr/vacpp/lib/libC.a[ansi_64.imp]: 0
LIBRARY: Shared object libpthreads.a[shr_comm.o]: 173 symbols imported.
LIBRARY: Shared object libpthreads.a[shr_xpg5.o]: 152 symbols imported.
LIBRARY: Shared object libc.a[shr.o]: 2800 symbols imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 20 symbols imported.
LIBRARY: Shared object libc.a[aio.o]: 14 symbols imported.
LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 7
(ld): resolve
RESOLVE: 113 of 11859 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 25 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
.DSOpenProjectEx [24] ER PR job.c(job.o)
00000030 .text R_RBR [12] .main
.DSOpenJob [26] ER PR job.c(job.o)
00000040 .text R_RBR [12] .main
.DSGetJobInfo [28] ER PR job.c(job.o)
00000054 .text R_RBR [12] .main
.DSCloseJob [38] ER PR job.c(job.o)
000000d4 .text R_RBR [12] .main
.DSCloseProject [40] ER PR job.c(job.o)
000000e0 .text R_RBR [12] .main
ER: The return code is 8.



First time executing this....
any help regarding the above information.
thanks in advance.

rajan.

rajan.n wrote:
ArndW wrote:Is the project set up in PX so that transforms will compile and run? If yes, it would seem that the include file should import the definitions - can you try to add -bloadmap or -bnoquiet to the compile for additional information on why the DllImport didn't work as expected.
Hi ArndW.
Thanks for the reply,
can u please specify where to include this -bloadmap ?
i use
> /usr/vacpp/bin/xlC_r job1.c
this is my command.

thanks,
Rajan.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This looks like UNIX and not Windows - which platform are you on? Also, have you compiled and run PX jobs that use transform stages on this machine (this is to ensure that you have the correct compiler installed with all necessary paths set up correctly)?
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

Hi ArndW,
i have run px jobs , but am sorry to ask abt transform stages, is this transformer stage..? if so we are using in many jobs.sorry if am wrong.

yes am runing this script on AIX , on server.
i aslo made a make file for creating the .o ans .so files for my c prog job.c,
sucessfuly , that makes .o and .so .but when i tried to use that in job as a paralell routine there i get the error belong to same unknown DSOpenProjeect...and remaining too....
"rtld: 0712-001 Symbol DSOpenProjectEx was referenced
from module /etl/Ascential/DataStage/Projects/CFM/RT_BP1031.O/V0S65_testds_T1.o(), but a runtime definition not found"
like this for all the remaining .

thnx for ur reply.
rajan.






ArndW wrote:This looks like UNIX and not Windows - which platform are you on? Also, have you compiled and run PX jobs that use transform stages on this machine (this is to ensure that you have the correct compiler installed with all necessary paths set up correctly)?
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Hi,
Any updates on this post. I am also facing the same issue. When I compile the c++ program it is throwing the error "ld: 0711-317 ERROR: Undefined symbol: .DSOpenProjectEx"
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

As this thraed is 3 years old and most likely there are different versions and libraries involved, it would be best to open a new thread on the topic and to include additional information in the post.
Post Reply