Hi All,
I am trying to read an environment variable in transformer but i am getting the following error.
Output from transformer compilation follows:
##I IIS-DSEE-TFCN-00001 12:18:00(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.0.1.4989
Copyright (c) 2001, 2005-2007 IBM Corporation. All rights reserved
##I IIS-DSEE-TUTL-00031 12:18:00(001) <main_program> The open files limit is 150; raising to 65536.
##I IIS-DSEE-TOSH-00002 12:18:00(002) <main_program> orchgeneral: loaded
##I IIS-DSEE-TOSH-00002 12:18:00(003) <main_program> orchsort: loaded
##I IIS-DSEE-TOSH-00002 12:18:00(004) <main_program> orchstats: loaded
##W IIS-DSEE-TOSH-00049 12:18:00(007) <main_program> Parameter specified but not used in flow: DSPXWorkingDir
##W IIS-DSEE-TFTM-00012 12:18:01(000) <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 12:18:01(001) <transform> Error when checking composite operator: Unexpected tokens: ; [line 11,character 7].
##E IIS-DSEE-TFPS-00012 12:18:01(002) <transform> Error when checking composite operator: Invalid local variable declaration: ; [line 11, character 7].
##E IIS-DSEE-TFTK-00001 12:18:01(003) <transform> Error when checking composite operator: Unexpected tokens: ; [line 39,character 16].
##E IIS-DSEE-TFPS-00027 12:18:01(004) <transform> Error when checking composite operator: Expected an operand; [line 39, character 14].
##E IIS-DSEE-TFPS-00038 12:18:01(005) <transform> Error when checking composite operator: Expected semi-colon; [line 39, character 16].
##E IIS-DSEE-TFSR-00019 12:18:01(006) <main_program> Could not check all operators because of previous error(s)
##E IIS-DSEE-TCOS-00029 12:18:01(007) <main_program> Creation of a step finished with status = FAILED. (skey.Transformer_15)
Actually, i want to read an integer value("1") using this environment variable but i got the same error as above. Then i tried reading with a string variable but no luck.
Just using the environment variable reference ($SKEY) alone does not work. You either have to supply the environment variable value through a job parameter (which can be a reference directly to the environment variable and which must be added from the parameter helper in the Expression Editor) or you must use the GetEnvironment() function - which a Search would have revealed to you.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sorry i forget to mention that... yes i first called that env variable in job parameters & then used in the transformer. In transformer, i am using that just for the output column derivation.
I have a similar problem, i set the environment variable "$APT_MIN_TRANSPORT_BLOCK_SIZE" as parameter and in the transformer stage under output column derivation i used
"O/p Coumn--->GetEnvironment($APT_MIN_TRANSPORT_BLOCK_SIZE)"
But my job is not getting compiled getting the similar error as "mdbatra" got.
Remember that NAME is the name of an environment variable, while $NAME is a reference to the value of the environment variable. The GetEnvironment() function needs to be told the name of the environment variable from which it is expected to retrieve the value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.