Parallel Routine using C/C++ API

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
jim.paradies
Premium Member
Premium Member
Posts: 25
Joined: Thu Jan 31, 2008 11:06 pm
Location: Australia

Parallel Routine using C/C++ API

Post by jim.paradies »

Hi all,

I'm trying to create a parallel routine that uses the C/C++ DS API. I have successfully created applications using the C/C++ DS API and I have also successfully created PX routines but I can't seem to combine the two - i.e. a PX routine that uses DS API. As soon as I include any sort of DS API call in a function and call it from a parallel transform, the DataStage job just does not compile.

Has anyone out there been successful in doing this?

Any help would be greatly appreciated.


Thanks,

Jim

Here's the compile error:


Output from transformer compilation follows:

##I IIS-DSEE-TFCN-00001 20:28:51(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.5.0.5746
Copyright (c) 2001, 2005-2008 IBM Corporation. All rights reserved



##I IIS-DSEE-TFCN-00006 20:28:51(001) <main_program> conductor uname: -s=Windows_NT; -r=2; -v=5; -n=KUATRO; -m=Pentium
##I IIS-DSEE-TOSH-00002 20:28:51(002) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 20:28:51(003) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 20:28:51(004) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 20:28:51(007) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##E IIS-DSEE-TBLD-00076 20:28:56(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40,192.
##E IIS-DSEE-TFSR-00019 20:28:56(001) <main_program> Could not check all operators because of previous error(s)
##W IIS-DSEE-TFTM-00012 20:28:56(002) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##I IIS-DSEE-TBLD-00000 20:28:56(003) <main_program> Error when checking composite operator: Output from subprocess: C:\IBM\InformationServer\Server\PXEngine\include\apt_util/keylookup.h(1151) : warning C4251: 'APT_KeyLookupRange::rangeOptions_' : class 'std::vector<_Ty>' needs to have dll-interface to be used by clients of class 'APT_KeyLookupRange'
with
[
_Ty=APT_KeyLookupRange::rangeOption
]
C:\IBM\InformationServer\Server\PXEngine\include\apt_components/transformop/transformbase.h(185) : warning C4244: 'argument' : conversion from 'APT_UInt64' to 'unsigned int', possible loss o
##I IIS-DSEE-TBLD-00000 20:28:56(004) <main_program> Error when checking composite operator: Output from subprocess: f data
C:\IBM\InformationServer\Server\PXEngine\include\apt_components/transformop/transformbase.h(185) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
C:\IBM\InformationServer\Server\PXEngine\include\apt_components/transformop/transformbase.h(185) : warning C4800: 'unsigned __int64' : forcing value to bool 'true' or 'false' (performance warning)
C:\IBM\InformationServer\Server\PXEngine\include\apt_components/transformop/transformbase.h(186) : w
##W IIS-DSEE-TFEV-00025 20:28:56(005) <transform> Error when checking composite operator: Converting number to string.
##W IIS-DSEE-TFEV-00023 20:28:56(006) <transform> Error when checking composite operator: Implicit conversion from source type "Int32" to result type "String".
##I IIS-DSEE-TBLD-00000 20:28:56(007) <main_program> Error when checking composite operator: Output from subprocess: arning C4244: 'argument' : conversion from 'APT_UInt64' to 'unsigned int', possible loss of data
C:\IBM\InformationServer\Server\PXEngine\include\apt_components/transformop/transformbase.h(186) : warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
C:\IBM\InformationServer\Server\PXEngine\include\apt_components/transformop/transformbase.h(187) : warning C4244: 'argument' : conversion from 'APT_UInt64' to 'unsigned int', possible loss of data
C:\IBM\Inf
##I IIS-DSEE-TBLD-00000 20:28:56(008) <main_program> Error when checking composite operator: Output from subprocess: ormationServer\Server\Projects\EPM\RT_BP7.O\V0S2_PX_ROUTINE_Transformer_2.C(212) : warning C4101: 'output' : unreferenced local variable
C:\IBM\InformationServer\Server\Projects\EPM\RT_BP7.O\V0S2_PX_ROUTINE_Transformer_2.C(207) : warning C4101: 'input' : unreferenced local variable

##I IIS-DSEE-TBLD-00079 20:28:56(009) <transform> Error when checking composite operator: cxx -LC:/IBM/InformationServer/Server/Projects/EPM/RT_BP7.O/ -LC:/IBM/InformationServer/Server/PXEngine/lib -LC:/IBM/InformationServer/Server/PXEngine/user_lib -s -W/dll -W/base:0x50000000 -W/Zc:wchar_t- -lliborchnt -lliborchcorent -lliborchbuildopnt D:/EPM/PxRoutines/PxRoutines.obj.o D:/EPM/PxRoutines/PxRoutines.o C:/IBM/InformationServer/Server/Projects/EPM/RT_BP7.O/V0S2_PX_ROUTINE_Transformer_2.tmp.o -o C:/IBM/InformationServer/Server/Projects/EPM/RT_BP7.O/V0S2_PX_ROUTINE_Transformer_2.dll.
##I IIS-DSEE-TBLD-00000 20:28:56(010) <main_program> Error when checking composite operator: Output from subprocess: PxRoutines.obj.o : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
LINK : fatal error LNK1181: cannot open input file 'D:\EPM\PxRoutines\PxRoutines.o'

##E IIS-DSEE-TCOS-00029 20:28:56(011) <main_program> Creation of a step finished with status = FAILED. (PX_ROUTINE.Transformer_2)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S2_PX_ROUTINE_Transformer_2 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern string upperCase(string inString);
0007: extern int32 setServerParams(string domain,string user,string password,string server);
0008:
0009: // define our input/output link names
0010: inputname 0 DSLink3;
0011: outputname 0 DSLink4;
0012:
0013: initialize {
0014: // define our control variables
0015: int8 RowRejected0;
0016: int8 NullSetVar0;
0017:
0018: // declare our intermediate variables for this section
0019: string InterVar0_0;
0020: string InterVar0_1;
0021:
0022: // initialise constant values which require conversion
0023: InterVar0_0 = "kuatro";
0024: InterVar0_1 = "jim";
0025: // Stage variable declaration and initialisation
0026: string StageVar0_kuatro;
0027: StageVar0_kuatro = InterVar0_0;
0028: string StageVar0_jim;
0029: StageVar0_jim = InterVar0_1;
0030: string StageVar0_kuatro1;
0031: StageVar0_kuatro1 = "";
0032: }
0033:
0034: mainloop {
0035:
0036: // declare our intermediate variables for this section
0037: string InterVar0_2;
0038:
0039: // evaluate the stage variables first
0040: InterVar0_2 = upperCase(StageVar0_kuatro);
0041: StageVar0_kuatro1 = InterVar0_2;
0042:
0043: // initialise the rejected row variable
0044: RowRejected0 = 1;
0045:
0046: // evaluate columns (no constraints) for link: DSLink4
0047: DSLink4.result = 0;
0048: DSLink4.var = setServerParams(StageVar0_kuatro , StageVar0_jim , StageVar0_jim , StageVar0_kuatro);
0049: writerecord 0;
0050: RowRejected0 = 0;
0051: }
0052:
0053: finish {
0054: }
0055:
*** End of Internal Generated Transformer Code
Jim Paradies
Post Reply