External routine compliation problem
Posted: Tue Apr 14, 2009 2:19 am
Hi All,
i am developing an external routine in C programing and calling in the transformer stage .
I am facing the problem while compling the code.
Output from transformer compilation follows:
##I TFCN 000001 03:15:47(000) <main_program>
Ascential DataStage(tm) Enterprise Edition 7.5
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved
##I TOSH 000002 03:15:48(000) <main_program> orchgeneral: loaded
##I TOSH 000002 03:15:48(001) <main_program> orchsort: loaded
##I TOSH 000002 03:15:48(002) <main_program> orchstats: loaded
##E TBLD 000000 03:16:00(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40192
##E TFSR 000019 03:16:00(001) <main_program> Could not check all operators because of previous error(s)
##W TFCP 000000 03:16:00(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 03:16:00(003) <main_program> Error when checking composite operator: Output from subprocess: P:\Ascential\DataStage\Projects\DEV_LY00ODS_EE\RT_BP1072.O\V0S16_CopyOfCopyOfjob2_Transformer_16.C(240) : warning C4244: '=' : conversion from 'APT_Int64' to 'int', possible loss of data
##I TFCP 000008 03:16:00(004) <transform> Error when checking composite operator: cxx -W/TP -W/dll -LP:/Ascential/DataStage/Projects/DEV_LY00ODS_EE/RT_BP1072.O/ -LC:/Ascential/DataStage/PXEngine/lib -LC:/Ascential/DataStage/PXEngine/user_lib -lliborchnt -lliborchcorent -lliborchbuildopnt H:\DEV_LY00ODS_EE\mapping_code_test.o P:/Ascential/DataStage/Projects/DEV_LY00ODS_EE/RT_BP1072.O/V0S16_CopyOfCopyOfjob2_Transformer_16.tmp.o -o P:/Ascential/DataStage/Projects/DEV_LY00ODS_EE/RT_BP1072.O/V0S16_CopyOfCopyOfjob2_Transformer_16.dll
##I TBLD 000000 03:16:00(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 'H:DEV_LY00ODS_EEmapping_code_test.o'
##E TCOS 000029 03:16:00(006) <main_program> Creation of step finished with status = FAILED (CopyOfCopyOfjob2.Transformer_16)
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S16_repos_Transformer_16 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int32 mapping_code_test(string entry_cd,string trid,string batch_cd,string debit_credit_cd,string adp_sec_num,sfloat amt,sfloat qty,string sec_desc,string trans_desc);
0007:
0008: // define our input/output link names
0009: inputname 0 DSLink10;
0010: outputname 0 DSLink17;
0011:
0012: initialize {
0013: // define our row rejected variable
0014: int8 RowRejected0;
0015:
0016: // define our null set variable
0017: int8 NullSetVar0;
0018:
0019: // Stage variable declaration and initialisation
0020: int32 StageVar0_stgvarmap;
0021: StageVar0_stgvarmap = 0;
0022: }
0023:
0024: mainloop {
0025: // initialise our row rejected variable
0026: RowRejected0 = 1;
0027:
0028: // evaluate the stage variables first
0029: StageVar0_stgvarmap = mapping_code_test(DSLink10.entry_cd , DSLink10.trans_acct_hist_cd , DSLink10.batch_cd , DSLink10.debit_credit_cd , DSLink10.security_adp_nbr , DSLink10.amt , DSLink10.qty , DSLink10.sec_desc , DSLink10.tdesc);
0030:
0031: // evaluate columns (no constraints) for link: DSLink17
0032: DSLink17.mapping_cd = StageVar0_stgvarmap;
0033: writerecord 0;
0034: RowRejected0 = 0;
0035: }
0036:
0037: finish {
0038: }
0039:
*** End of Internal Generated Transformer Code
I have generated C program and followed below Steps
Define your routine in DataStage manager: Routines -> New Parallel Routine
Set your routine definition.
Routine Name: External subroutine name: this is the function name in your c program:* Type: External Function
Object Type: Object <- you can also choose library if you compiled a DLL
Return type: int <- return type of your C function
And placed in the datastage local directory
Please suggest where i have gone wrong
i am developing an external routine in C programing and calling in the transformer stage .
I am facing the problem while compling the code.
Output from transformer compilation follows:
##I TFCN 000001 03:15:47(000) <main_program>
Ascential DataStage(tm) Enterprise Edition 7.5
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved
##I TOSH 000002 03:15:48(000) <main_program> orchgeneral: loaded
##I TOSH 000002 03:15:48(001) <main_program> orchsort: loaded
##I TOSH 000002 03:15:48(002) <main_program> orchstats: loaded
##E TBLD 000000 03:16:00(000) <main_program> Error when checking composite operator: Subprocess command failed with exit status 40192
##E TFSR 000019 03:16:00(001) <main_program> Could not check all operators because of previous error(s)
##W TFCP 000000 03:16:00(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 03:16:00(003) <main_program> Error when checking composite operator: Output from subprocess: P:\Ascential\DataStage\Projects\DEV_LY00ODS_EE\RT_BP1072.O\V0S16_CopyOfCopyOfjob2_Transformer_16.C(240) : warning C4244: '=' : conversion from 'APT_Int64' to 'int', possible loss of data
##I TFCP 000008 03:16:00(004) <transform> Error when checking composite operator: cxx -W/TP -W/dll -LP:/Ascential/DataStage/Projects/DEV_LY00ODS_EE/RT_BP1072.O/ -LC:/Ascential/DataStage/PXEngine/lib -LC:/Ascential/DataStage/PXEngine/user_lib -lliborchnt -lliborchcorent -lliborchbuildopnt H:\DEV_LY00ODS_EE\mapping_code_test.o P:/Ascential/DataStage/Projects/DEV_LY00ODS_EE/RT_BP1072.O/V0S16_CopyOfCopyOfjob2_Transformer_16.tmp.o -o P:/Ascential/DataStage/Projects/DEV_LY00ODS_EE/RT_BP1072.O/V0S16_CopyOfCopyOfjob2_Transformer_16.dll
##I TBLD 000000 03:16:00(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 'H:DEV_LY00ODS_EEmapping_code_test.o'
##E TCOS 000029 03:16:00(006) <main_program> Creation of step finished with status = FAILED (CopyOfCopyOfjob2.Transformer_16)
*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S16_repos_Transformer_16 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern int32 mapping_code_test(string entry_cd,string trid,string batch_cd,string debit_credit_cd,string adp_sec_num,sfloat amt,sfloat qty,string sec_desc,string trans_desc);
0007:
0008: // define our input/output link names
0009: inputname 0 DSLink10;
0010: outputname 0 DSLink17;
0011:
0012: initialize {
0013: // define our row rejected variable
0014: int8 RowRejected0;
0015:
0016: // define our null set variable
0017: int8 NullSetVar0;
0018:
0019: // Stage variable declaration and initialisation
0020: int32 StageVar0_stgvarmap;
0021: StageVar0_stgvarmap = 0;
0022: }
0023:
0024: mainloop {
0025: // initialise our row rejected variable
0026: RowRejected0 = 1;
0027:
0028: // evaluate the stage variables first
0029: StageVar0_stgvarmap = mapping_code_test(DSLink10.entry_cd , DSLink10.trans_acct_hist_cd , DSLink10.batch_cd , DSLink10.debit_credit_cd , DSLink10.security_adp_nbr , DSLink10.amt , DSLink10.qty , DSLink10.sec_desc , DSLink10.tdesc);
0030:
0031: // evaluate columns (no constraints) for link: DSLink17
0032: DSLink17.mapping_cd = StageVar0_stgvarmap;
0033: writerecord 0;
0034: RowRejected0 = 0;
0035: }
0036:
0037: finish {
0038: }
0039:
*** End of Internal Generated Transformer Code
I have generated C program and followed below Steps
Define your routine in DataStage manager: Routines -> New Parallel Routine
Set your routine definition.
Routine Name: External subroutine name: this is the function name in your c program:* Type: External Function
Object Type: Object <- you can also choose library if you compiled a DLL
Return type: int <- return type of your C function
And placed in the datastage local directory
Please suggest where i have gone wrong