C++ routine

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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Check the path of APT_COMPILER in your datastage administrator. This env. variable holds the path to your compiler.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
lak
Charter Member
Charter Member
Posts: 11
Joined: Sun Jul 16, 2006 7:58 am

Post by lak »

DSguru2B wrote:Check the path of APT_COMPILER in your datastage administrator. This env. variable holds the path to your compiler.
Thank you Brian..now I found the path (/usr/vacpp/bin/xlC_r) but still when I compile I am getting "No found" error please help

Thanks

-Lak
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

How are you compiling it. You need to compile it by using xlC_r. Remember its case sensitive.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
lak
Charter Member
Charter Member
Posts: 11
Joined: Sun Jul 16, 2006 7:58 am

Post by lak »

DSguru2B wrote:How are you compiling it. You need to compile it by using xlC_r. Remember its case sensitive.
I am compiling like...

dsadm@etldev:/u01/Ascential/dev> xlC_r test.c
lak
Charter Member
Charter Member
Posts: 11
Joined: Sun Jul 16, 2006 7:58 am

Post by lak »

lak wrote:
DSguru2B wrote:How are you compiling it. You need to compile it by using xlC_r. Remember its case sensitive.
I am compiling like...

dsadm@etldev:/u01/Ascential/dev> xlC_r test.c
dsadm@etldev:/u01/Ascential/dev> xlC_r test.c
ksh: xlC_r: not found.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Strange. Contact your system admin to get this resolved. Its in your usr/bin. You should be able to invoke it :?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

APT_COMPILER is installed with a default value. It may not be correct. Check whether your machine even has a compiler installed and, if so, where it actually is. If you're trying to compile from the command line, the compiler executable's directory pathname will need to be in your PATH and any libraries it uses will need to be in your LD_LIBRARY_PATH. You may also need other environment variables set, depending upon where other components, such as header files, may be stored.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lak
Charter Member
Charter Member
Posts: 11
Joined: Sun Jul 16, 2006 7:58 am

Post by lak »

ray.wurlod wrote:APT_COMPILER is installed with a default value. It may not be correct. Check whether your machine even has a compiler installed and, if so, where it actually is. If you're trying to compile from the command line, the compiler executable's directory pathname will need to be in your PATH and any libraries it uses will need to be in your LD_LIBRARY_PATH. You may also need other environment variables set, depending upon where other components, such as header files, may be stored.
Thanks Ray and Brian..Now I am able to compile by usinf full path

/u01/Ascential/dev> /usr/vacpp/bin/xlC_r test.c

Thank you once again for your quick responce.

-Lak
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

/usr/vacpp/bin/xlC_r test.c should therefore be the value of APT_COMPILER environment variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Without the "test.c" portion :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:oops: the joys of copy and paste!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Should i generate object file?

Post by rameshrr3 »

Im trying to compile on similar lines
i get my compiler path using the following command

Code: Select all

>dsadmin -listenv Test | grep APT_COMPILER
Then i compile the c funtion after verifying if the complier exists

Code: Select all

>CC -c pxIFStringExists.c 
i get a file pxIFStringExists.o

I go define a new parallel routine in manager and specify the path where my object file is located.
What next? What do i do to the permissions on this object file?
Where do i place it so that my px transformer stage can use it?

Sorry if this seems like a thread hijacking.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It is thread hi-jacking.
Thats all, once you provide the path to the object file (.o) you can use the routine inside your transformer. Make sure that your id has execute permission to the file and folder.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply