Problem with Parallel custom Stage(Build)

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

Problem with Parallel custom Stage(Build)

Post 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
HI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
umamahes
Premium Member
Premium Member
Posts: 110
Joined: Tue Jul 04, 2006 9:08 pm

hi

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

Post by DSguru2B »

Thats C++ right :o
I thought you can only code in C....Am I in the dark :?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
pavankvk
Participant
Posts: 202
Joined: Thu Dec 04, 2003 7:54 am

Re: Problem with Parallel custom Stage(Build)

Post 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
Andet
Charter Member
Charter Member
Posts: 63
Joined: Mon Nov 01, 2004 9:40 am
Location: Clayton, MO

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

Post by DSguru2B »

Ande, I meant code not the compiler. I am well aware of the fact that a C++ compiler is used.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Andet
Charter Member
Charter Member
Posts: 63
Joined: Mon Nov 01, 2004 9:40 am
Location: Clayton, MO

Post 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.
Ande

"So, you think this will work?"
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply