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
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

parallel routine

Post by kavuri »

Hi,
I had written a small programme for formatting my input data. I had created the object file for it. I had created a parallel routine in the manager with the following arguments.

RoutineName: findrecord
Type:External Function
External Subroutinename: findrecord.o
LibrarayPath:XXXXXXXX/XXXXXX/XXXXXX
Object Type: Object.

I am getting following error. can you let me know what is the mistake I did in this.

Output from transformer compilation follows:

##I TFCN 000001 13:54:08(000) <main_program>
IBM DataStage(tm) Parallel Extender 7.5.3
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved


##I TOSH 000002 13:54:08(001) <main_program> orchgeneral: loaded
##I TOSH 000002 13:54:08(002) <main_program> orchsort: loaded
##I TOSH 000002 13:54:08(003) <main_program> orchstats: loaded
##I TFSC 000001 13:54:08(006) <main_program> APT configuration file: /opt/IBM/Ascential/DataStage/Configurations/default.apt
##W TCOS 000049 13:54:08(007) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##W TFCP 000000 13:54:08(009) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##E TFCP 000003 13:54:08(010) <transform> Error when checking composite operator: Unexpected tokens: .; [line 6, character 23].
##E TFCP 000024 13:54:08(011) <transform> Error when checking composite operator: Incomplete function call ; [line 6, character 26].
##E TFCP 000038 13:54:08(012) <transform> Error when checking composite operator: Expected semi-colon; [line 6, character 26].
##E TFCP 000038 13:54:08(013) <transform> Error when checking composite operator: Expected semi-colon; [line 6, character 33].
##E TFCP 000038 13:54:08(014) <transform> Error when checking composite operator: Expected semi-colon; [line 6, character 39].
##E TFCP 000012 13:54:08(015) <transform> Error when checking composite operator: Invalid local variable declaration: ); [line 6, character 55].
##E TFCP 000038 13:54:08(016) <transform> Error when checking composite operator: Expected semi-colon; [line 9, character -1].
##E TFCP 000038 13:54:08(017) <transform> Error when checking composite operator: Expected semi-colon; [line 9, character 11].
##E TFCP 000038 13:54:08(018) <transform> Error when checking composite operator: Expected semi-colon; [line 10, character 0].
##E TFCP 000038 13:54:08(019) <transform> Error when checking composite operator: Expected semi-colon; [line 10, character 13].
##E TFCP 000015 13:54:08(020) <transform> Error when checking composite operator: Duplicate variable declaration: RETAILER; [line 14, character 0].
##E TFCP 000038 13:54:08(021) <transform> Error when checking composite operator: Expected semi-colon; [line 39, character 27].
##E TFCP 000038 13:54:08(022) <transform> Error when checking composite operator: Expected semi-colon; [line 39, character 42].
##E TFCP 000038 13:54:08(023) <transform> Error when checking composite operator: Expected semi-colon; [line 39, character 55].
##E TFSR 000019 13:54:08(024) <main_program> Could not check all operators because of previous error(s)
##E TCOS 000029 13:54:08(025) <main_program> Creation of a step finished with status = FAILED. (transtest.Transformer_1)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S1_transtest_Transformer_1 transform operator.
0003: //
0004:
0005: // define external functions used
0006: extern string findrecord.o(string record,string retailer);
0007:
0008: // define our input/output link names
0009: inputname 0 DSLink2;
0010: outputname 0 DSLink4;
0011:
0012: global {
0013: // Job parameter declaration
0014: ustring RETAILER;
0015: }
0016:
0017: initialize {
0018: // define our row rejected variable
0019: int8 RowRejected0;
0020:
0021: // define our null set variable
0022: int8 NullSetVar0;
0023:
0024: // Stage variable declaration and initialisation
0025: string StageVar0_StageVar;
0026: StageVar0_StageVar = "";
0027: }
0028:
0029: mainloop {
0030: // initialise our row rejected variable
0031: RowRejected0 = 1;
0032:
0033: // declare our intermediate variables for this section
0034: string InterVar0_0;
0035: string InterVar0_1;
0036:
0037: // evaluate the stage variables first
0038: InterVar0_0 = RETAILER;
0039: InterVar0_1 = findrecord.o(DSLink2.INPUT , InterVar0_0);
0040: StageVar0_StageVar = InterVar0_1;
0041:
0042: // evaluate columns (no constraints) for link: DSLink4
0043: DSLink4.STORE_ID = substring_1(StageVar0_StageVar , 1 , 5);
0044: DSLink4.DATE = date_from_string(substring_1(StageVar0_StageVar , 6 , 15));
0045: DSLink4.TRANS_COUNT = substring_1(StageVar0_StageVar , 16 , 20);
0046: DSLink4.DOL = substring_1(StageVar0_StageVar , 21 , 29);
0047: writerecord 0;
0048: RowRejected0 = 0;
0049: }
0050:
0051: finish {
0052: }
0053:
*** End of Internal Generated Transformer Code

Thanks
Kavuri
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Somewhere (in your routine?) a semi colon (statement terminator) is missing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kavuri
Premium Member
Premium Member
Posts: 161
Joined: Mon Apr 16, 2007 2:56 pm

Post by kavuri »

I had compiled the code I got only warnings as below.


findrecord.cpp: In function `char* findrecord(char*, char*)':
findrecord.cpp:17: warning: address of local variable `record' returned
findrecord.cpp:17: warning: address of local variable `record' returned

Please let me know if I am doing any wrong?

Thanks
Kavuri
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check your code by inspection. There is no missing semi-colon in the generated Transformer stage source code that you posted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

Try to get rid of the warning and then try.
Post Reply