Page 1 of 1

changing the values of an env.variable at run time

Posted: Tue Mar 21, 2006 5:53 am
by scorpion
hi all,

i want to change the value of userdefined environment variable,defined for a perticular job ,at run time in a jobsequencer.

i want to assign a new value each time for that variable,
whenever job runs in a job sequencer.

how can i achieve this..can any one one help me on this?

tx in advance!

Posted: Tue Mar 21, 2006 6:56 am
by kumar_s
Though you assign a new value to the variable, it will not be reflected to the rest of the job using the variable.
The Main sequence which holds the variable while getting triggered will hold the value till the last and supply to all the jobs which it calls it.

changing the values of an env.variable at run time

Posted: Tue Mar 21, 2006 7:11 am
by scorpion
Thanks kumar for your quick response!

what I want is:

Can I change/update the value of the job parameter within the same job.

Before job : Paramter X holds the value "1"

After job : Parameter X has to be changed/updated to "2"

how can i achieve this?

Re: changing the values of an env.variable at run time

Posted: Tue Mar 21, 2006 7:24 am
by jatayl
scorpion wrote:Thanks kumar for your quick response!

what I want is:

Can I change/update the value of the job parameter within the same job.

Before job : Paramter X holds the value "1"

After job : Parameter X has to be changed/updated to "2"

how can i achieve this?
I would say pass Parameter X the value of "2" within a korn shell script that calls the dsjob command. That'll pass the value from the korn shell to the job sequence then along to the job level.

Jason

Posted: Tue Mar 21, 2006 7:29 am
by kumar_s
You can set the value in the transformer.
Pls check this link

Posted: Tue Mar 21, 2006 7:32 am
by scorpion
jason,

Is there any alternate way to achieve this without using shell scripts?
i need to run the jobs from jobsequencer..

Posted: Tue Mar 21, 2006 7:35 am
by jatayl
scorpion wrote:jason,

Is there any alternate way to achieve this without using shell scripts?
i need to run the jobs from jobsequencer..
At run time, aren't you prompted to populate the parameter you defined? If not, you'll need to add it to your sequence job parameters, and then right click on each job in your sequence and map the parameter for it to pass.

Jason

Posted: Tue Mar 21, 2006 7:41 am
by kumar_s
Have you checked the link.
This option has been tried by the poster in the transformer.

Code: Select all

$enFileName = DSLink.instance