Page 1 of 1

Reg - Initialize Env variables inside job

Posted: Tue Feb 01, 2011 1:29 am
by ragavendradineshdsx
Hi all,

I have a requirement in my job where i need to re-initialize an environment variable/job parameter inside a job. I mean, in the xformer stage based on a IF condition, i need to re-initialize a env variable which is already been defined. Let me know if this requirement is possible by any means.

Posted: Tue Feb 01, 2011 3:07 am
by veerabusani185512
Use Parameter sets in job....Parameters of paramter sets can be updated using Datastage job ....For every parameter set there will be a file which will have paramter name and Parameter value(Which will be default)..If your job can update this file then we can pass that parametr to next job run time

Posted: Tue Feb 01, 2011 3:37 am
by ragavendradineshdsx
Hi veera,

i think, parameter sets are used mainly for defining some default values like username/pwd for connecting to databases (if i'm not wrong). but my requirement is, suppose if i have a env var $APT_DISABLE_COMBINATION, inside the xformer, based on IF condition, i should set $APT_DISABLE_COMBINATION=TRUE else $APT_DISABLE_COMBINATION=FALSE. is this possible?

Re: Reg - Initialize Env variables inside job

Posted: Tue Feb 01, 2011 7:40 am
by jwiles
If you mean to change an environment variable value while the job is running and expect other stages in the job to see the changed value...no, that cannot be done, especially in a parallel job.

If you mean to just update the variable for use in a later run of that job and/or other jobs then use a parameter set or a text file from which that value could be picked up by a sequencer or some other means.

Regards,