Parallel 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
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Parallel Routine

Post by opdas »

Hi,
I have a C function (BinaryToDecimal()) which converts binary input into Decimal.
As we are working on AIX , we created the object file by using Visual Age C++ default compiler by the following command:

xlc -c binarytodecimal.c -o binarytodecimal.o

Then using the object file binarytodecimal.o in the Parallel routine.

But geting the following runtime error:

Transformer_0: Failed to load the library "V0S0_BinaryToDecimal_Transformer_0.o"; either the directory containing the library file
is not on the library search path, or the library was compiled on a system
that is incompatible with this system: Could not load "V0S0_BinaryToDecimal_Transformer_0": rtld: 0712-001 Symbol BinaryToDecimal__FPc was referenced
from module /ds2/home/dsadm2/Ascential/DataStage/Projects/LTRA_PROJ_ETL_02/RT_BP564.O/V0S0_BinaryToDecimal_Transformer_0.o(), but a runtime definition
of the symbol was not found..
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Is it possible to post the C++ code you have created.
I guess you have selected the Object type as Library. Since you have created a object file select the object as the option.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post by opdas »

kumar_s wrote:Is it possible to post the C++ code you have created.
I guess you have selected the Object type as Library. Since you have created a object file select the object as the option.

Code: Select all

long     BinaryToDecimal(const char * pstrBinary)
{
     int     intLoop=0;
     long     lngReturn=0L;
     long     lngMultip=1L;
     for (intLoop=0; intLoop < (int)strlen(pstrBinary); intLoop++)
          {
          if ('1' == pstrBinary[intLoop])
               {
               lngReturn += lngMultip;
               }
          lngMultip *= 2;
          }
     return     lngReturn;
}
and yes I'm giving the full path of the object file which i'm creating.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

And what about this....
I guess you have selected the Object type as Library. Since you have created a object file select the object as the option.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
opdas
Participant
Posts: 115
Joined: Wed Feb 01, 2006 7:25 am

Post by opdas »

kumar_s wrote:And what about this....
I guess you have selected the Object type as Library. Since you have created a object file select the object as the option.
I have done the following:
Type:External Function
Object Type: Object
External subroutine name: BinaryToDecimal
Return type:long
Library path:/home/manual2/intest/binarytodecimal.o

Compiling on AIX as below:
xlC_r -c binarytodecimal.c -o binarytodecimal.o

Error message while validating or runtime is:
Transformer_0: Failed to load the library "V0S0_BinaryToDecimal_Transformer_0.o"; either the directory containing the library file
is not on the library search path, or the library was compiled on a system
that is incompatible with this system: Could not load "V0S0_BinaryToDecimal_Transformer_0": rtld: 0712-001 Symbol BinaryToDecimal__FPc was referenced
from module /ds2/home/dsadm2/Ascential/DataStage/Projects/LTRA_PROJ_ETL_02/RT_BP564.O/V0S0_BinaryToDecimal_Transformer_0.o(), but a runtime definition
of the symbol was not found..

Cheers
OP
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Give permission 775 (or 777 for testing) to the object file created.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
VCInDSX
Premium Member
Premium Member
Posts: 223
Joined: Fri Apr 13, 2007 10:02 am
Location: US

Post by VCInDSX »

Hi,
I am an amateur Datastage guy and I haven't used IConv, OConv so far.... but I recollect from reading the documentation that "Radix Conversions" are possible using IConv, OConv.

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

Post by ray.wurlod »

However these functions are not exposed in C++ and so are not available in parallel routines or Build stages.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply