Problem with environment variables during promotion...

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Problem with environment variables during promotion...

Post 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.
sudha03_vpr
Participant
Posts: 34
Joined: Tue Feb 26, 2013 9:36 am
Location: Chicago

Post 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 ?
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post 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...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Corrupted how?

Incidentally, the special tokens for default values of environment variable parameters have "$" prefixes: $PROJDEF, $ENV and $UNSET.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Out of curiousity, what exact 8.x version are you running?
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post 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.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply