Access DataStage Env Values in Unix

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
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Access DataStage Env Values in Unix

Post 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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post 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...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply