Error in Parellel transformer using Env Variable

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
Amar_nath
Participant
Posts: 56
Joined: Tue Apr 18, 2006 5:03 am

Error in Parellel transformer using Env Variable

Post by Amar_nath »

Hi Guru's,
I am doing a simple job-
Seq File -> Transformer -> Seq File
In the trnsformer I am using an environment variable (directly assigning the value to a column).
No other transformations are there, simple one to one mapping.
I am getting an error-

***********************************************************
Output from transformer compilation follows:

##I IIS-DSEE-TFCN-00001 20:37:29(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.0.1.4665
Copyright (c) 2001, 2005-2007 IBM Corporation. All rights reserved



##I IIS-DSEE-TOSH-00002 20:37:29(001) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 20:37:29(002) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 20:37:29(003) <main_program> orchstats: loaded
##W IIS-DSEE-TCOS-00036 20:37:30(000) <main_program> Failed to initialize job monitoring. Monitor information will not be generated.
##W IIS-DSEE-TOSH-00049 20:37:30(001) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##W IIS-DSEE-TFTM-00012 20:37:30(002) <transform> Error when checking composite operator: The number of reject datasets "0" is less than the number of input datasets "1".
##E IIS-DSEE-TFTK-00001 20:37:30(003) <transform> Error when checking composite operator: Unexpected tokens: ; [line 11,character 7].
##E IIS-DSEE-TFPS-00012 20:37:30(004) <transform> Error when checking composite operator: Invalid local variable declaration: ; [line 11, character 7].
##E IIS-DSEE-TFTK-00001 20:37:30(005) <transform> Error when checking composite operator: Unexpected tokens: ; [line 28,character 18].
##E IIS-DSEE-TFPS-00027 20:37:30(006) <transform> Error when checking composite operator: Expected an operand; [line 28, character 16].
##E IIS-DSEE-TFPS-00038 20:37:30(007) <transform> Error when checking composite operator: Expected semi-colon; [line 28, character 18].
##E IIS-DSEE-TFSR-00019 20:37:30(008) <main_program> Could not check all operators because of previous error(s)
##E IIS-DSEE-TCOS-00029 20:37:30(009) <main_program> Creation of a step finished with status = FAILED. (Test_Env_Var.Transformer_2)

*** Internal Generated Transformer Code follows:
0001: //
0002: // Generated file to implement the V0S2_Test_Env_Var_Transformer_2 transform operator.
0003: //
0004:
0005: // define our input/output link names
0006: inputname 0 DSLink3;
0007: outputname 0 DSLink4;
0008:
0009: global {
0010: // Job parameter declaration
0011: string $UName;
0012: }
0013:
0014: initialize {
0015: // define our row rejected variable
0016: int8 RowRejected0;
0017:
0018: // define our null set variable
0019: int8 NullSetVar0;
0020:
0021: }
0022:
0023: mainloop {
0024: // initialise our row rejected variable
0025: RowRejected0 = 1;
0026:
0027: // evaluate columns (no constraints) for link: DSLink4
0028: DSLink4.Env_Var = $UName;
0029: writerecord 0;
0030: RowRejected0 = 0;
0031: }
0032:
0033: finish {
0034: }
0035:
*** End of Internal Generated Transformer Code
*************************************************************

Please suggest me where I am doing wrong.

Thanks,
Amarnath
deanwalker
Participant
Posts: 82
Joined: Tue Jan 22, 2008 10:37 am
Location: UK

Post by deanwalker »

You can't use an environment variable 'there'.
The workaround is to use GetEnvironment("envvarname")
Post Reply