Page 1 of 1

Problem with Parallel custom Stage(Build)

Posted: Thu Feb 15, 2007 4:58 pm
by umamahes
I Created a Custom Build stage.when I press on generate button i am getting the following message



Operator Generation Succeeded

buildop -f -BC /usr/vacpp/bin/xlC_r -BL /usr/vacpp/bin/xlC_r -C buildop -H buildop -O buildop -W buildop buildop/GetPartner.opd

##W TBLD 000000 Output from subprocess: ld: 0711-224 WARNING: Duplicate symbol: .APT_String::~APT_String()
ld: 0711-224 WARNING: Duplicate symbol: .APT_UString::~APT_UString()
ld: 0711-224 WARNING: Duplicate symbol: .std::exception::~exception()
ld: 0711-224 WARNING: Duplicate symbol: .std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy(unsigned long)
ld: 0711-224 WARNING: Duplicate symbol: .std::exception::what() const
ld: 0711-224 WARNING: Duplicate symbol: .std::exception::_Doraise() const
ld: 0711-224 WARNING: Duplicat
##W TBLD 000000 Output from subprocess: e symbol: std::exception::~exception()
ld: 0711-224 WARNING: Duplicate symbol: std::exception::what() const
ld: 0711-224 WARNING: Duplicate symbol: std::exception::_Doraise() const
ld: 0711-224 WARNING: Duplicate symbol: std::basic_string<char,std::char_traits<char>,std::allocator<char> >::npos
ld: 0711-224 WARNING: Duplicate symbol: std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy(unsigned long)
ld: 0711-224 WARNING: Duplicate symbol: APT_String::~APT_String()
ld: 0711-224 WARNIN
##W TBLD 000000 Output from subprocess: G: Duplicate symbol: APT_UString::~APT_UString()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

Here Id is my input and output column name.


register-library -verbose -registry buildop buildop/GetPartner.o

1 operators registered from GetPartner

After that I developed a job with this stage and i supplied the necessary input argumnet but the job is aborting and is giving the following Fatal and Info

GetPartner_3: When processing argument -FILEWhen processing -FILE: No value supplied

Contents of phantom output file =>
DataStage Job 1346 Phantom 20756

Can anyone please help me to get out from this issue.

Thanks
Uma

Posted: Thu Feb 15, 2007 5:39 pm
by ray.wurlod
"Duplicate symbol" warnings typically result from over-enthusiastic inclusion of header files. The APT_operator superclass ought to be automatically available in a BuildOp.

hi

Posted: Thu Feb 15, 2007 7:32 pm
by umamahes
The following is the code i used to build the custom parallel stage

#include <fstream>
#include <iostream>
#include <stdio.h>

char line[2000];
char* LKP_ATTRIBUTE1;
char* LKP_ATTRIBUTE2;
char* LKP_ATTRIBUTE3;
char INPUTSTR[100]="";
char LKPSTR[100]="";
char Company[50];
const char * spc ="";


Per Record Loop

result.Partner=Indata.Partner;
result.Id=Indata.Id;

std::fstream file_op;

file_op.open (FILE);

if (!file_op.is_open())
{
cout << "Error opening " << FILE << " File" << endl;
exit (1);
}
while(!file_op.eof()) {
file_op.getline(line,2000);
LKP_ATTRIBUTE1=strtok(line, ",");
LKP_ATTRIBUTE2=strtok(NULL, ",");
LKP_ATTRIBUTE3=strtok(NULL, ",");



if(0 != strcmp((const char *)LKP_ATTRIBUTE1,spc))
{
strcpy(INPUTSTR,(const char *)Indata.Partner);
strcpy(LKPSTR,LKP_ATTRIBUTE1);
}
if(0 != strcmp((const char *)LKP_ATTRIBUTE2,spc))
{
strcat(INPUTSTR,(const char*)Indata.Id);
strcat(LKPSTR,LKP_ATTRIBUTE2);
}

if (strcmp((const char *)INPUTSTR,(const char *)LKPSTR)==0)
{
strcpy(Company,LKP_ATTRIBUTE3);
result.Alliance=Company;
break;
}
else
{
result.Alliance="DDD";
}
}
file_op.close();

Posted: Thu Feb 15, 2007 9:01 pm
by DSguru2B
Thats C++ right :o
I thought you can only code in C....Am I in the dark :?

Re: Problem with Parallel custom Stage(Build)

Posted: Fri Feb 16, 2007 12:47 am
by pavankvk
umamahes wrote:I Created a Custom Build stage.when I press on generate button i am getting the following message



Operator Generation Succeeded

buildop -f -BC /usr/vacpp/bin/xlC_r -BL /usr/vacpp/bin/xlC_r -C buildop -H buildop -O buildop -W buildop buildop/GetPartner.opd

##W TBLD 000000 Output from subprocess: ld: 0711-224 WARNING: Duplicate symbol: .APT_String::~APT_String()
ld: 0711-224 WARNING: Duplicate symbol: .APT_UString::~APT_UString()
ld: 0711-224 WARNING: Duplicate symbol: .std::exception::~exception()
ld: 0711-224 WARNING: Duplicate symbol: .std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy(unsigned long)
ld: 0711-224 WARNING: Duplicate symbol: .std::exception::what() const
ld: 0711-224 WARNING: Duplicate symbol: .std::exception::_Doraise() const
ld: 0711-224 WARNING: Duplicat
##W TBLD 000000 Output from subprocess: e symbol: std::exception::~exception()
ld: 0711-224 WARNING: Duplicate symbol: std::exception::what() const
ld: 0711-224 WARNING: Duplicate symbol: std::exception::_Doraise() const
ld: 0711-224 WARNING: Duplicate symbol: std::basic_string<char,std::char_traits<char>,std::allocator<char> >::npos
ld: 0711-224 WARNING: Duplicate symbol: std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Copy(unsigned long)
ld: 0711-224 WARNING: Duplicate symbol: APT_String::~APT_String()
ld: 0711-224 WARNIN
##W TBLD 000000 Output from subprocess: G: Duplicate symbol: APT_UString::~APT_UString()
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

Here Id is my input and output column name.


register-library -verbose -registry buildop buildop/GetPartner.o

1 operators registered from GetPartner

After that I developed a job with this stage and i supplied the necessary input argumnet but the job is aborting and is giving the following Fatal and Info

GetPartner_3: When processing argument -FILEWhen processing -FILE: No value supplied

Contents of phantom output file =>
DataStage Job 1346 Phantom 20756

Can anyone please help me to get out from this issue.

Thanks
Uma
The warnings of duplicate symbols can be ignored.

Is this custom stage reading any file directly. that error "
Contents of phantom output file" is generally encountered when a input file doesnt exist..check for the file's presence

Posted: Tue Feb 20, 2007 12:04 pm
by Andet
DSguru2B wrote:Thats C++ right :o
I thought you can only code in C....Am I in the dark :?
You wish!
Actually we compile all of our external routines using the C++ compiler. The last time I checked, most of DS is C++.

Ande

Posted: Tue Feb 20, 2007 12:43 pm
by DSguru2B
Ande, I meant code not the compiler. I am well aware of the fact that a C++ compiler is used.

Posted: Wed Feb 21, 2007 9:09 pm
by Andet
well, you know as well as I do (or probably better, if you are Brian) that C is intregal to C++.
We use both plain C and C++ contrruction in our external routines.

Posted: Wed Feb 21, 2007 11:25 pm
by DSguru2B
Hmm, ok, I will have to test out a small routine written in C++. Thanks for the info. And yes I am Brian :wink: . I guess I have to take out Brian's name.