Page 1 of 1

DataStage Environment Variable

Posted: Sun Jun 15, 2008 10:52 pm
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.?

Posted: Sun Jun 15, 2008 11:03 pm
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?

Use dsadmin -listenv

Posted: Thu Jun 19, 2008 9:10 pm
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.