changing environment variables

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Tatiana
Participant
Posts: 18
Joined: Tue Jul 15, 2003 3:23 pm

changing environment variables

Post by Tatiana »

How do I set user defined environment variables in DataStage version 6 so that when the values change, jobs can automatically pick up new values? Right now if I set up a variable, then add it to a job as a parameter, the job remembers the default variable value at the beginning. I can change the environment variable but the job doesn't pick up the change. It looks like in later versions you can set the value to $ProjDef but it doesn't seem to work in version 6. Thanks.
velagapudi_k
Premium Member
Premium Member
Posts: 142
Joined: Mon Jun 27, 2005 5:31 pm
Location: Atlanta GA

Post by velagapudi_k »

We used Routines to read the variables from parameter files, call them before the job actvities in the sequence when we are using Datastage 6. I guess thats the only option.
Venkat Velagapudi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can not change the job parameter value (even if it is an environment variable) once the job is running, even by changing the environment variable.

You are correct that the $PROJDEF, $ENV and $UNSET default values are not available in version 6. You need to manage this is the controlling job sequence; read the environment variable using an Execute Command activity (echo $MYVAR) or Routine activity, and use the returned value from that to supply a value to the job parameter in its Job activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Tatiana
Participant
Posts: 18
Joined: Tue Jul 15, 2003 3:23 pm

Post by Tatiana »

velagapudi_k wrote:We used Routines to read the variables from parameter files, call them before the job actvities in the sequence when we are using Datastage 6. I guess thats the only option.
Oh well, I'll be changing the values for now.
Post Reply