Page 1 of 1

Calling Custom routine using environment variables

Posted: Tue Jul 11, 2006 2:37 am
by Alink
If GetFileSize(#$JBrecievepath# , "\PREPAID_BAL_TRACKING.dat") = 1 Then $Oradate[10] Else $Oradate[1,10]


I am trying to call a routine through the transformer. The above statement
this turns red and if i put all expressions between " " the variable is not resolved to its value.

Hence in short the question is how to pass environment variables into a custom routine.

Posted: Tue Jul 11, 2006 2:48 am
by bchau
Then environment variable needs to be passed down as a parameter of the job. So you have to have the enviroment variabled defined in job parameter definitions.

if you take out '#', you should be fine.

Posted: Tue Jul 11, 2006 3:29 am
by Alink
Thanks This works fine now :)

If (GetFileSize($JBrcvdpath:"\PREPAID_BAL_TRACKING.dat")) = 1 Then $Oradate[10] Else $Oradate[1,10]

Posted: Tue Jul 11, 2006 6:34 am
by kcbland
This is going to be executed for every single row going thru the Transformer. It would be better to use it in the initialize step of a stage variable so it's done only once. For the derivation of the stage variable, just use the stage variable.