DataStage Environment Variable

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ketanshah123
Participant
Posts: 88
Joined: Wed Apr 05, 2006 1:04 am

DataStage Environment Variable

Post by ketanshah123 »

Hi All

We have some environmnt variable defiened for our project like PROJDATADIR etc. I want to access those environment variable in my AIX script . So how can I do that ? How can I get the values of those environment vairiable in my script.?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This is not a DataStage question. In a shell script a reference to an environment variable begins with $, for example $PROJDATADIR is a reference to (the value of) the environment variable called PROJDATADIR.

I wonder whether you asked the right question?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bcpeck
Participant
Posts: 3
Joined: Mon Jun 12, 2006 10:03 pm

Use dsadmin -listenv

Post by bcpeck »

For example to get the value of the DataStage environment variable ProjBaseDir from project Fred:

BASE_DIR=`$DSBIN/dsadmin -listenv Fred | grep ProjBaseDir`

...assuming the DSBIN Unix environment variable points to the directory where dsadmin lives.
Post Reply