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.?
DataStage Environment Variable
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 88
- Joined: Wed Apr 05, 2006 1:04 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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?
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Use dsadmin -listenv
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.
BASE_DIR=`$DSBIN/dsadmin -listenv Fred | grep ProjBaseDir`
...assuming the DSBIN Unix environment variable points to the directory where dsadmin lives.