Page 1 of 1

Calling Environment Variables in Basic Transformer

Posted: Fri Feb 09, 2007 12:34 pm
by gsym
I am using a BASIC Transformer in a Parallel job to generate a calendar table. The values for the start and end dates for the calendar must be obtained from a couple of environment variables.

How do I go about doing this in the BASIC Transformer. Now if it was just a Transformer stage I would create two stage variables and set their initial values as GetEnvironment("Environmentvariablename") but this does not seem to work in BASIC Transformer.

Please help !

Posted: Fri Feb 09, 2007 12:36 pm
by chulett
So... does this need to be a Parallel job?

Posted: Fri Feb 09, 2007 1:01 pm
by gsym
chulett wrote:So... does this need to be a Parallel job?

I am using the BASIC Transformer here because of the ease of using Iconv/Oconv functions. But I must use it in a parallel job.

Posted: Fri Feb 09, 2007 1:30 pm
by DSguru2B
You pass the environment variable as a job parameter.

Posted: Fri Feb 09, 2007 2:12 pm
by gsym
DSguru2B wrote:You pass the environment variable as a job parameter.

The problem is that I have been asked to only use specific environment variables in the jobs. No job parameters. I am doing it this way because the job is going to be executed using a control file and the values for all the environment variables used in the job is specified in the control file.

So I declare all the environment variables in the job properties>job parameters and both my start dates and end dates are specified there as environment variables.

edited to remove utter stupidity !! :oops: :oops:

Posted: Fri Feb 09, 2007 2:15 pm
by DSguru2B
gsym wrote: So I declare all the environment variables in the job properties>job parameters and both my start dates and end dates are specified there as environment variables.
Well if you already have them setup in the job parameters then why not read them inside the transformer.

Posted: Fri Feb 09, 2007 2:23 pm
by gsym
Crap !!

I feel like a complete idiot !!

Ur right, I have already found the solution.

What was I thinking.....

Why don't I just delete this post :oops: :oops: :oops:

Posted: Fri Feb 09, 2007 2:24 pm
by DSguru2B
Thats ok buddy. Glad you got it resolved. Just mark it as resolved and have a cup of tea, or coffee :wink:

Posted: Fri Feb 09, 2007 2:27 pm
by gsym
DSguru2B wrote:Thats ok buddy. Glad you got it resolved. Just mark it as resolved and have a cup of tea, or coffee :wink:
Thanks DSguru ...... I guess sometimes one has to put his problems in writing to realize he's already got the solution or that there was no problem at all in the first place !! :o

Guess I had somehow made the assumption that the environment variable has to be directly called in the BASIC Transformer stage and no job parameters should be used.....

Posted: Fri Feb 09, 2007 3:50 pm
by ray.wurlod
That's cool, because my advice was going to be to push back on the daft requirement!