How to add multiple Environment Variables ?

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
filename.txt
Participant
Posts: 27
Joined: Thu Mar 20, 2008 11:55 am

How to add multiple Environment Variables ?

Post 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
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

In DS 8 you have PARAMETER SETS which can be used.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Suggest you start clicking... 7.x is a one-at-a-time world. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
filename.txt
Participant
Posts: 27
Joined: Thu Mar 20, 2008 11:55 am

Post by filename.txt »

Thanks Craig and Nagaraj,

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

"Creativity is the ability to use your available resources to their fullest."
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Re: How to add multiple Environment Variables ?

Post 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
Last edited by PhilHibbs on Mon Oct 27, 2008 6:07 am, edited 1 time in total.
Phil Hibbs | Capgemini
Technical Consultant
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Phil - they asked about a quick way to add already established environment variables to jobs.
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

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

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply