How to get Project's Environment variable.
Moderators: chulett, rschirm, roy
How to get Project's Environment variable.
Hi all,
I want to get a list of Environment variable used in a project without using administrator.
Say I have enough access to go into that UV account. Then in what way can I get that list.
Thanks in advance.
I want to get a list of Environment variable used in a project without using administrator.
Say I have enough access to go into that UV account. Then in what way can I get that list.
Thanks in advance.
Hi,
There is a file
dsenv
which sets up envirornmental variables for datastage.
By default it is set in dshome/DSEngine directory but can be in a different path. You can read this as seqential file in a datastage job and find out different environmental variables set like
DS_MMAPPATH=/tmp; export DS_MMAPPATH
DS_MMAPSIZE=32; export DS_MMAPSIZE
DS_MAXWRITEHEAPS=1; export DS_MAXWRITEHEAPS
ODBCINI=$dshome/.odbc.ini; export ODBCINI
HOME=${HOME:-/}; export HOME
#UDTHOME=$dshome/../ud41; export UDTHOME
Ketfos
There is a file
dsenv
which sets up envirornmental variables for datastage.
By default it is set in dshome/DSEngine directory but can be in a different path. You can read this as seqential file in a datastage job and find out different environmental variables set like
DS_MMAPPATH=/tmp; export DS_MMAPPATH
DS_MMAPSIZE=32; export DS_MMAPSIZE
DS_MAXWRITEHEAPS=1; export DS_MAXWRITEHEAPS
ODBCINI=$dshome/.odbc.ini; export ODBCINI
HOME=${HOME:-/}; export HOME
#UDTHOME=$dshome/../ud41; export UDTHOME
Ketfos
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create a job that does anything (even just X = 0 in Job Control will suffice).
Create a before-job subroutine using ExecTCL to execute the ENV command.
The environment variables will appear in the job log.
If you have a recent enough version of DataStage, you don't even need to do this. Each time you run a server job, the first even logged is "starting job", the second event logged is "environment variable settings".
Create a before-job subroutine using ExecTCL to execute the ENV command.
The environment variables will appear in the job log.
If you have a recent enough version of DataStage, you don't even need to do this. Each time you run a server job, the first even logged is "starting job", the second event logged is "environment variable settings".
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.
Slight change in my question.
sorry I want to be more specific that,
I need a list of "UserDefined Environmental variable" of a project from UV command prompt.
Thanks in Advance.
I need a list of "UserDefined Environmental variable" of a project from UV command prompt.
Thanks in Advance.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
ENV is a TCL-level command that displays all currently-set environment variables. You can also use its long form, ENVIRONMENT. On Windows it is equivalent to the DOS /C set command while on UNIX it is equivalent to the SH -c set command.
There is nothing in the operating system to distinguish whether an environment variable is "user defined" or otherwise, so there is no scope with this command for filtering just for these.
You could, of course, elect to use some form of naming convention for your user-defined environment variables, then filter the output somehow.
The ENV command can also be used to set and to unset environment variables.
There is nothing in the operating system to distinguish whether an environment variable is "user defined" or otherwise, so there is no scope with this command for filtering just for these.
You could, of course, elect to use some form of naming convention for your user-defined environment variables, then filter the output somehow.
The ENV command can also be used to set and to unset environment variables.
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.
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Lookup stage is for parallel jobs.
The original poster specified server jobs, and the desire to view the value of environment variables from the UV command prompt.
The original poster specified server jobs, and the desire to view the value of environment variables from the UV command prompt.
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.
Hi,
The ENV command didn't show me the user defined EV which I created manually in my project.
In my case the purpose of user defined EV which I created is to parameterize the DB connection values.(Say I have created some 20 EV in adminstrator for my project and I used those variables as job parameters in my job.)
Now I need to get a list of such UserDefined EV in each of my project for documentation purpose.
Is there any way to get such list and store it in a file.
The ENV command didn't show me the user defined EV which I created manually in my project.
In my case the purpose of user defined EV which I created is to parameterize the DB connection values.(Say I have created some 20 EV in adminstrator for my project and I used those variables as job parameters in my job.)
Now I need to get a list of such UserDefined EV in each of my project for documentation purpose.
Is there any way to get such list and store it in a file.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's already stored in the DSParams file on the server (in the project directory). Why not parse from there? There is a separate section for user-defined environment variables, so you can easily capture them, perhaps using a BASIC routine.
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.