How To Declare Global Variables in Windows Wnvironment

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
velagapudi_k
Premium Member
Premium Member
Posts: 142
Joined: Mon Jun 27, 2005 5:31 pm
Location: Atlanta GA

How To Declare Global Variables in Windows Wnvironment

Post by velagapudi_k »

Hi All! Is there anyway to create global variables in windows environment so that those variables can be accessed in each and every project of Datastage. We can declare Environment variables at project level. But what I need is to declare globally. I played with that Idea for some time and its taking me no where. What I did was
MyComputer-->Properties-->Advanced-->EnvironmentVariables and then I declared variables on both User Variables For Administrator and System Variables. But it didnt work. They neither showed up in the Job Properties when I clicked Add Environment Variable nor in the Administrator.Pls help if anybody have any ideas.
Venkat Velagapudi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Sometimes it is necessary to restart Windows (where have we heard that before?!) for environment variable changes to take effect.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

I have never worked with Windows but my understanding of this post would suggest to me that if the Variable is not defined to DSParams, you'll NEVER see it in Administrator or from Add Environment Variable. The accepted method to define it to DSParams is via the Administrator or by adding a new environment variable from Job properties. This is by Project since DSParams is specific to a Project. You could use a global variable by using the magic word $ENV but this would set it's value, you'll still need to know the exact spelling and case of the variable in order to use it as a parameter. Have I completely missed the boat on this post?
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

HI.

As far my experience goes you cannot access the windows environment variables from Datastage Administrator.

Regards
Sreenivasulu
velagapudi_k
Premium Member
Premium Member
Posts: 142
Joined: Mon Jun 27, 2005 5:31 pm
Location: Atlanta GA

Post by velagapudi_k »

Thanks all you guys for replys. what I want to do is create global variables which ever way I can, in datastage so that they are accessable to each and every project. As in trobinson's post if we declare variables, they will be only at the project level, which I dont what. Hey Tim can you pls tell me in detail how to do in the below way.
You could use a global variable by using the magic word $ENV but this would set it's value, you'll still need to know the exact spelling and case of the variable in order to use it as a parameter..
Hi Ray, I rebooted my machine after declaring variables thru My Computer but it didnt work. Any more ideas.
Venkat Velagapudi
velagapudi_k
Premium Member
Premium Member
Posts: 142
Joined: Mon Jun 27, 2005 5:31 pm
Location: Atlanta GA

Post by velagapudi_k »

trobinson wrote:You could use a global variable by using the magic word $ENV but this would set it's value, you'll still need to know the exact spelling and case of the variable in order to use it as a parameter.
Can u pls tell me how to do that trobinson?.

Sometimes it is necessary to restart Windows (where have we heard that before?!) for environment variable changes to take effect.

Hi Ray I rebooted my machine but it didnt work. Anything specific that I need to do? or is there any other way different to my approach.
Venkat Velagapudi
trobinson
Participant
Posts: 208
Joined: Thu Apr 11, 2002 6:02 am
Location: Saint Louis
Contact:

Post by trobinson »

I didn't realize I was Tim. Dude, do a search on $ENV and you'll get more information than you could possibly use.
Post Reply