Page 1 of 1

Access DataStage Env Values in Unix

Posted: Thu Jan 05, 2006 3:45 pm
by kaps
Can anyone tell me how to access the DataStage environment variable values in server (Unix). I know that all of those Env variables does exist in DSParams file and I can access them If I start a shell script from DataStage. But I want to kick of a shell script which should access those variables.

Any input is appreciated.

Thanks

Posted: Thu Jan 05, 2006 10:12 pm
by kumar_s
HI,
Declare the reqired variables in dsenv. Hope you would have used the following in your .profile.
. $DSHOME/dsenv
Now you can kick start the shell which can export the necessary variables.

-Kumar

Posted: Thu Jan 05, 2006 10:24 pm
by ray.wurlod
Please report whether this works. I have some doubts. On my systems, not all the environment variables in DSParams are set in the dsenv script.

Posted: Fri Jan 06, 2006 11:42 am
by kaps
Thanks for the suggestion. However since we need to add those variables manually in dsenv file it makes maintenenace harder...I mean wenever we make changes to env variables in DataStage I need to changed it here too...which probabaly I can't sell in my company.

Also If I decided to add them manually I don't need to do that in dsenv file as I can create one file just for env variables and include that file in my shell then I can access all those variables which again is maintenance issue...

Thanks anyway...

Posted: Fri Jan 06, 2006 4:51 pm
by ray.wurlod
Your shell script - or your dsenv shell script for that matter - could read them from DSParams.

Problem with that approach is that there's a separate DSParams file for each project, while your .profile and your dsenv are system-wide, irrespective of the project to which you're attaching.