Page 1 of 1

Parallel Routine compilation problem in the transformer

Posted: Tue Dec 01, 2009 8:52 am
by sridharvis
Hi,

I am quite new to Parallel Routines, I created a parallel routine and when i compiled the same in my transformer in parallel job i got the following compilation error "Extrenal function library path name cannot contain spaces". Please find the details of how the routine was created...

This is my C++ program

#include <stdio.h>
char * testroutine()
{
char* OutStr;
OutStr="Hello World - Object Testing";
return OutStr;
}

I created the object file as specified in the below link (my DataStage client + server) is installed in the windows environment.

http://dsxchange.com/viewtopic.php?t=12 ... 7e9de8c7cd.

I specified the following in the parallel routine

Routine Name: testroutine
Type: External Function
Object Type: Object
Return type: char*
Library path: C:\Documents and Settings\sridhar\testroutine.o
No Input Arguments.

Please Help !!

Posted: Tue Dec 01, 2009 9:02 am
by Sainath.Srinivasan
Folder where you object lies (Documents and Settings) has spaces part of its name.

Try storing in some place without spaces.

Posted: Tue Dec 01, 2009 9:32 am
by sridharvis
Sainath.Srinivasan wrote:Folder where you object lies (Documents and Settings) has spaces part of its name.

Try storing in some place without spaces.
Hi Sainath,

Is there any other way out, because i find the object file getting created only in the Documents and Settings Path, as that's where the compiler is. I tried the following

cxx -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c C:\testroutine.cpp , but the objectfile is not getting created in the specified path. I also tried copy pasting the .cpp and .o file to C: path but of no use i get another error

"Subprocess command failed with exit status 40192"

Please Help

Posted: Tue Dec 01, 2009 9:48 am
by chulett
It doesn't matter where the compiler is, it matters where you run the compile command from. And I'm sure there's an option to create the output elsewhere. Or use "Docume~1" for the directory name.

Posted: Tue Dec 01, 2009 10:05 am
by sridharvis
chulett wrote:It doesn't matter where the compiler is, it matters where you run the compile command from. And I'm sure there's an option to create the output elsewhere. Or use "Docume~1" for the directory name.
Thanks Craig, both of the solution recommended by you worked , but now i face another compilation error. Please help me out ?

##E TBLD 000000 21:27:20(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40192
##E TFSR 000019 21:27:20(001) <main_program> Could not check all operators because of previous error(s)
##W TFCP 000000 21:27:20(002) <transform> Error when checking composite operator: The number of reject datasets "0"is less than the number of input datasets "1".
##I TBLD 000000 21:27:20(003) <main_program> Error when checking composite operator: Output from subprocess: C:\Ascential\DataStage\Projects\MedDev\RT_BP3.O\V0S21_pxFirstLkpJob_Transformer_21.C(236) : warning C4244: '=' : conversion from 'APT_Int64' to 'int', possible loss of data

##I TFCP 000008 21:27:20(004) <transform> Error when checking composite operator: cxx -LC:/Ascential/DataStage/Projects/MedDev/RT_BP3.O/ -LC:/Ascential/DataStage/PXEngine/lib -LC:/Ascential/DataStage/PXEngine/user_lib -W/TP -W/dll -W/base:0x50000000 -lliborchnt -lliborchcorent -lliborchbuildopnt C:\testroutine.o C:/Ascential/DataStage/Projects/MedDev/RT_BP3.O/V0S21_pxFirstLkpJob_Transformer_21.tmp.o -o C:/Ascential/DataStage/Projects/MedDev/RT_BP3.O/V0S21_pxFirstLkpJob_Transformer_21.dll
##I TBLD 000000 21:27:20(005) <main_program> Error when checking composite operator: Output from subprocess: LINK : warning LNK4224: /DEBUGTYPE:BOTH is no longer supported; ignored
LINK : fatal error LNK1181: cannot open input file 'C:testroutine.o'

Posted: Tue Dec 01, 2009 10:30 am
by Sainath.Srinivasan
Try giving the location as C:/testroutine.o.

But why do you give the full path as the system itself must be able to locate it.

Posted: Tue Dec 01, 2009 10:48 am
by sridharvis
Sainath.Srinivasan wrote:Try giving the location as C:/testroutine.o.

But why do you give the full path as the system itself must be able to locate it.
No changes , i tried that as well the error persists, i had spent whole day in writing a simple parallel routine, but all in vain i am not able to proceed further. I am clueless of what this error could be ?

Any clue or help on what this error could be is much appreciated

Posted: Tue Dec 01, 2009 10:54 am
by Sainath.Srinivasan
What is your PATH ?

Where have you copied the .o file ?

Posted: Tue Dec 01, 2009 10:55 am
by Sainath.Srinivasan
What is your PATH ?

Where have you copied the .o file ?

Posted: Tue Dec 01, 2009 10:58 am
by sridharvis
Sainath.Srinivasan wrote:What is your PATH ?

Where have you copied the .o file ?
The Library Path is C:\testroutine.o and i had also compiled the .o file and the file is available at C:\testroutine.o.

Posted: Wed Dec 02, 2009 2:59 am
by Sainath.Srinivasan
I was referring to your PATH setting in your environment.

Posted: Wed Dec 02, 2009 1:23 pm
by sridharvis
Sainath.Srinivasan wrote:I was referring to your PATH setting in your environment.
I have not made any PATH setting. But i have listed down the environmental Variable and its path, additionally i have also listed below the COMPILER, COMPILER options and LINKER options.Hope this helps..

Environmental Variables and Path:- (Windows XP)

DSPackagePath :- C:\Ascential\DataStage\Package
NLS_LANG :- AMERICAN_AMERICA.WE8ISO8859P1
NUTCROOT :- C:\PROGRA~1\MKSTOO~1
SHELL :- C:/PROGRA~1/MKSTOO~1/mksnt/sh.exe
TERMCAP :- C:\PROGRA~1\MKSTOO~1\etc\termcap
TERMINFO :- C:\PROGRA~1\MKSTOO~1\usr\lib\terminfo
VS71COMNTOOLS:- c:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools\

COMPILER and LINKER PATH :- (DataStage)

APT_COMPILER:- cxx
APT_LINKER :- cxx
APT_COMPILER_OPTIONS :- -W/TP -W/EHa -DAPT_USE_ANSI_IOSTREAMS -c
APT_LINK_OPT:--W/TP -W/dll -W/base:0x50000000