Page 1 of 1

Reading Envrironment Variable in Local Variable

Posted: Wed Mar 13, 2013 10:33 am
by neeraj
Hello,

I have a required where I need to assign the environment variable into local variable..

For e.g.
Environment Variable
$NM_USER=U1
$NM_USER1=U2

In Master Sequncer I have one variable USER. Based on the condition I want to read the value as
USER=$NM_USER or USER=$NM_USER. The output should be Either U1 or U4, Please advise how can I get it done.

I tried the above mentioned point and the output I am getting is $NM_USER not U1.

Regards
Neeraj

Posted: Wed Mar 13, 2013 11:04 am
by ShaneMuir
You could just add them to the parameter list and pass them as a parameter?

Or you could try GetEnvironment("NM_USER") - but not sure if that works in a sequence.

Posted: Wed Mar 13, 2013 1:20 pm
by ray.wurlod
Use an Execute Command activity to echo $NM_USER

Posted: Wed Mar 13, 2013 3:01 pm
by FranklinE
This may not help you, but Job Activity stage on the job sequence pallate gives you the same derivation functions found in the Transformer stage. You can assign to a local variable any value you want, including environment variables listed in the job sequence properties parameters.

Posted: Mon Apr 29, 2013 1:22 am
by neeraj
Thanks for the reply. We have used the user variable activity stage and able to read the env variables.