Page 1 of 1

Problem with environment variables during promotion...

Posted: Thu Feb 28, 2013 4:42 pm
by kaps
Anyone facing issue with environment variables when promoting jobs from one env to other ? All the user id's and passwords are defined as PROJDEF but still the jobs are failing when moved to prod because of the invalid user id and password error.

As a workaround, we delete the user id and password in the source env and re add them and then re promote them to prod but this is tedious task when there are more jobs.

Any input is appreciated.

DS version is 8.7.

Posted: Thu Feb 28, 2013 4:59 pm
by sudha03_vpr
PROJDEF (Project Defaults) in DEV or any other environment needs to be setup in Datastage Admin Level. Are you talking about the DB Userids and Password ?

Posted: Thu Feb 28, 2013 5:34 pm
by kaps
I know we set values for env variables in administrator. Yes. These parms to connect to database. We put projdef as a value in the jobs so that they can pick up the right values from the admin...Issue here is that it gets corrupted for some reason...

Posted: Thu Feb 28, 2013 7:16 pm
by ray.wurlod
Corrupted how?

Incidentally, the special tokens for default values of environment variable parameters have "$" prefixes: $PROJDEF, $ENV and $UNSET.

Posted: Fri Mar 01, 2013 12:03 am
by kaps
I am saying its corrupted as the job does not run the first time as if the parameters are corrupted during the promotion. When we delete them and add them back again and then promote it works.

We usually select the $PROJDEF from the list box on the non encrypted variables and for password we just copy from non encrypted variables.

Posted: Fri Mar 01, 2013 7:42 am
by chulett
Out of curiousity, what exact 8.x version are you running?

Posted: Fri Mar 01, 2013 12:52 pm
by priyadarshikunal
If you are on 8.5 or above it adds the environment variable automatically when you move the jobs from one environment to other and the default value defined in job becomes the value in DSParams or the environment variable you see in administrator. That might be the reason I think behind Craig asking the version of DataStage.

Hence when you promote the code to another environment and jobs have the default value is $PROJDEF, $PROJDEF becomes the value in DSParams or Administrator, which it should not be as $PROJDEF directs the job to use the project default which is defined in administrator, hence $PROJDEF is not a correct value to be Administrator itself.

Try setting the environment variable in advance or once you import the jobs correct the value in administrator. Or please post how are you promoting the code and defining the environment variables to see where it is getting corrupted.

Posted: Fri Mar 01, 2013 7:53 pm
by kaps
DS version is 8.7 and we are aware of the $PROJDEF being set during promotion in Admin if those are new variables for that environment. These are not new variables and there are lot of jobs using the same variables which works fine.
Job is being exported from Designer with the default option of (job designs and executables) and then getting imported in other environment. This does not happen all the time but sporadically.

Posted: Mon Mar 04, 2013 4:05 pm
by priyadarshikunal
In the job log when the job fails, there will be entry of each Environment variable. Can you check what is the value you are getting. In logs you might be able to see something like Environment variable settings(...). Check if the values are correct there.