Page 1 of 1

How to add multiple Environment Variables ?

Posted: Thu Oct 16, 2008 4:32 pm
by filename.txt
HI all,

I would like to know..
How to add more than one environment variables at a time ?

In my jobs I add more than 5 environment variables and in DS Administrator we have plenty of variables....
each time I have to open the 'ADD ENVIRONMENT VARIABLE' box and find the variables to add.

Can anyone suggest easy workaround for this ?
I am not sure if this is addressed in 8.01 version. I tried to digg DSXchange for similar querry..couldn't find any thread.

I consider adding these as time comsuming process...PLEASE SUGGEST

Posted: Thu Oct 16, 2008 5:31 pm
by Nagaraj
In DS 8 you have PARAMETER SETS which can be used.

Posted: Thu Oct 16, 2008 7:12 pm
by chulett
Suggest you start clicking... 7.x is a one-at-a-time world. :wink:

Posted: Fri Oct 17, 2008 5:28 pm
by filename.txt
Thanks Craig and Nagaraj,

Happy to hear..... about Parameter sets in Datastage 8.0v

Re: How to add multiple Environment Variables ?

Posted: Mon Oct 27, 2008 5:06 am
by PhilHibbs
OOPS I misunderstood the question... please disregard this post unless you are also interested in how to copy Environment Variables into a new project
filename.txt wrote: In my jobs I add more than 5 environment variables and in DS Administrator we have plenty of variables....
each time I have to open the 'ADD ENVIRONMENT VARIABLE' box and find the variables to add.
Open up the DSParams file in the Project directory, and copy and paste them in from another DSParams file. They are present in two places, the definition is in the [EnvVarDefns] section (about half way through the file), and the default value is in the [EnvVarValues] section. This last section may not exist for a newly-created project that has never been opened in Designer.

e.g.

Code: Select all

blah
blah
[EnvVarDefns]
TMPDIR\General\-1\DirPath\\1\Project\Temporary directory\Temporary directory path.
ROOT\User Defined\-1\String\\0\Project\Home\
blah
blah
[EnvVarValues]
"TMPDIR"\1"/home/migration/tmp"
"ROOT"\1"/home/migration/Dev"
In this example, TMPDIR is a standard value present in all projects, but ROOT is the user-defined variable.

*Update* Oh, a word of warning, if you screw up your DSParams file then you might get this error on starting Designer or Administrator:
run-time error 457
This Key is already associated with an element of this collection

Posted: Mon Oct 27, 2008 5:39 am
by chulett
Phil - they asked about a quick way to add already established environment variables to jobs.

Posted: Mon Oct 27, 2008 5:52 am
by PhilHibbs
My bad. OK, in answer to the real question then, most of the time I create a new job by copying an old one that has most of the common parameters in it already. Also it's quicker because you don't have to retrieve the whole category hierarchy.

Posted: Mon Oct 27, 2008 6:02 am
by chulett
Sure. I've also got one of those loverly KBA Utility jobs that can transfer some or all parameters from a 'template' job to another. So rather than needing to start with a job with all of the standard parameters and hacking out what I don't need, at any point I can find a suitable donor job with what I need and suck them out. Very handy. :wink: