How to import and export UserDefined Environment variable.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Ravindar
Participant
Posts: 30
Joined: Tue Mar 23, 2004 6:14 am
Location: Chennai, India

How to import and export UserDefined Environment variable.

Post by Ravindar »

Hi all,

I had defined a set of User Defined environment variable(say 20 EVs) in a project(say A) which has around 100 jobs and I am using this UserDefined EV in those jobs as job parameters.

Now for testing purpose I created another project(say B) and imported all those jobs(from A).

Obviously I also need to move those UserDefined EV to project B from project A.

My question is
"Is there any way to move a set of user defined environment variables from one project to another project.
or I have to again create it manually in new project.

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

User-defined environment variables, like project-wide log purge settings, are stored in the DSParams file in the project directory.

While there's no client-based mechanism for transferring them (at least none of which I am aware), it's a relatively straightforward process to unload them from one DSParams file and put them into the other DSParams file.

Look for a section called [EnvVarDefns]. Each environment variable in that section has a backslash-delimited set of properties, the second of which is the "category". Identify those with "User-defined" as the category.

You ARE permitted to edit the DSParams file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ravindar
Participant
Posts: 30
Joined: Tue Mar 23, 2004 6:14 am
Location: Chennai, India

Post by Ravindar »

Thanks Ray for your information.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

If you use this approach, where job parameters are copied between projects as user defined environment variables, be aware that there is a rollback built into the Administrator tool. The Admin tool will roll back "unauthorised" changes to this file. If you change or overwrite DSParams, then run the Administrator tool to change an environment variable, it will roll the file back to the last saved version.

There is a DSParams file and a DSParams.KEEP file in the directory. If they are different Administrator will rollback to the KEEP file. If you want to make your DSParams changes permanent consider overwriting both files.
vaby
Charter Member
Charter Member
Posts: 27
Joined: Tue Feb 15, 2005 1:45 am
Location: Russia

Post by vaby »

Just wanted to share, that DSParams file contains another section called [EnvVarValues] that contains actual values used by variables by default. So do not forget to get this section to your project! Makes life much easier.

Vincent, I am a little confused with what you mentioned on DSParams.KEEP file. In my experience I did nothing with DSParams.KEEP file and it still worked OK. Moreover, I found contents of DSParams and DSParams.KEEP file to be very different.

Anyway, thanks everyone for this info, it saved me a lot of time when porting one of my DS projects to production.

Thanks!

Vladimir
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSParams.KEEP is like the "before image" or "rollback segment". It allows DataStage to recover if an edit is abnormally terminated.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vaby
Charter Member
Charter Member
Posts: 27
Joined: Tue Feb 15, 2005 1:45 am
Location: Russia

Post by vaby »

But I don't see that DSParams.KEEP is getting updated each time after I modify something with normal termination. For example, in the project I am working I don see any of my user defined variables at all. It sounds scaring to me if DS decides to rollback using DSParams.KEEP file! That's why I am still a bit confused.
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Post by kris »

This discussion is interesting to me be cause I happend to have all my datastage jobs running with user defined environmet variables. And I do not see my DSParams.KEEP file is getting updated as in DSParams file. And if DS rollsback do we need to get those lines manually into DSParams file ? I thought it is safe to do

more DSParams | grep "User Defined"

and have them as backup so that we can add whenever we need.

Alright guys keep going.... Love this discussion. :P

Kris~
Post Reply