where is the PATH variable value will be set in DataStage
Moderators: chulett, rschirm, roy
where is the PATH variable value will be set in DataStage
When i'm invoking a unix script from Before job sub-routine and attempting to connect to Db2 , it fails.
But when path variable is been set properly it works fine.
Currently the issue is our dsenv file do not export PATH variable.
So i want to know how does the DataStage gets these values ?
But when path variable is been set properly it works fine.
Currently the issue is our dsenv file do not export PATH variable.
So i want to know how does the DataStage gets these values ?
Re: where is the PATH variable value will be set in DataStag
Are you able to enter path values in DS Administrator?
Check in Environment for your particular project and ensure the values are correct.
Check in Environment for your particular project and ensure the values are correct.
A printer consists of 3 main parts: the case, the jammed paper tray and the blinking red light.
Its your .profile. Make sure you are invoking the dsenv in your .profile so that when ever you login, you can go directly to the db2.
Is this problem happening only when you are running it via a script?
Can you go to db2 from the cmd prompt?
Is this problem happening only when you are running it via a script?
Can you go to db2 from the cmd prompt?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Another important thing to remember when scripting shell's for jobs is that make sure you explicity call the dsenv in your script. Sourcing it in your own .profile will help as long as your id is running the script. When these jobs get exported to different environments (system test, uat, pre-production, production) they might not/in most cases will not, run with your id. So it is important for you to source the dsenv in your script by explicity firing it.
My 2 cents.
My 2 cents.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 8
- Joined: Thu Jan 19, 2006 11:45 pm
dwblore:
Salil : I dont have the administrator rights for this system. But when i view the environment settings for our project , it is given as
PATH /IBMdb2/home/db2rtcl/sqllib/bin:/IBMdb2/home/db2rtcl/sqllib/adm
DSGuru2B:
This is happenning only when we run via the script. I login through a user called "carduser" and in its .profile sources the dsenv
In this .profile we have set the PATH to be PATH=/usr/bin:/usr/ucb:/etc:/Datastage/DataStage/DSEngine/bin:.
But when i check in the Director ( as kumar_s suggessted ) for the PATH variable value it is given as
PATH=/Datastage/DataStage/Projects/card30/wrapped:/Datastage/DataStage/Projects/card30/buildop:/Datastage/DataStage/Projects/card30/RT_BP1132.O:/Datastage/DataStage/DSCAPIOp:/Datastage/DataStage/RTIOperators:/Datastage/DataStage/DSParallel:/Datastage/DataStage/PXEngine/user_osh_wrappers:/Datastage/DataStage/PXEngine/osh_wrappers:/Datastage/DataStage/PXEngine/bin:/usr/bin:/usr/ucb:/etc:/oraclient/bin:/usr/ccs/bin:/usr/openwin/bin:/IBMdb2/home/db2inst1/sqllib/bin:/IBMdb2/home/db2inst1/sqllib/adm:/IBMdb2/home/db2rtcl/sqllib/bin:/IBMdb2/home/db2rtcl/sqllib/adm
But Kumar , in the log the script is executed & then it shows the environment variables
1065 INFO Mon May 29 04:30:19 2006
jobname..BeforeJob (ExecSH): Executed command: script_name.sh
1066 INFO Mon May 29 04:30:19 2006
Environment variable settings:
Again want to emphasise that we have not set the PATH in dsenv either.
The problem wht i think from the current PATH setting is "IBMdb2/home/db2inst1/sqllib/bin" is been defined before IBMdb2/home/db2rtcl/sqllib/bin ( which is the correct instance name ) and thats why couldnt connect to db2.
So , if there has been any setting for PATH where it appends the IBMdb2/home/db2rtcl/sqllib/bin to the existing PATH ..i would like to alter it to be prefixed than appended.
thnx
dwblore
Salil : I dont have the administrator rights for this system. But when i view the environment settings for our project , it is given as
PATH /IBMdb2/home/db2rtcl/sqllib/bin:/IBMdb2/home/db2rtcl/sqllib/adm
DSGuru2B:
This is happenning only when we run via the script. I login through a user called "carduser" and in its .profile sources the dsenv
In this .profile we have set the PATH to be PATH=/usr/bin:/usr/ucb:/etc:/Datastage/DataStage/DSEngine/bin:.
But when i check in the Director ( as kumar_s suggessted ) for the PATH variable value it is given as
PATH=/Datastage/DataStage/Projects/card30/wrapped:/Datastage/DataStage/Projects/card30/buildop:/Datastage/DataStage/Projects/card30/RT_BP1132.O:/Datastage/DataStage/DSCAPIOp:/Datastage/DataStage/RTIOperators:/Datastage/DataStage/DSParallel:/Datastage/DataStage/PXEngine/user_osh_wrappers:/Datastage/DataStage/PXEngine/osh_wrappers:/Datastage/DataStage/PXEngine/bin:/usr/bin:/usr/ucb:/etc:/oraclient/bin:/usr/ccs/bin:/usr/openwin/bin:/IBMdb2/home/db2inst1/sqllib/bin:/IBMdb2/home/db2inst1/sqllib/adm:/IBMdb2/home/db2rtcl/sqllib/bin:/IBMdb2/home/db2rtcl/sqllib/adm
But Kumar , in the log the script is executed & then it shows the environment variables
1065 INFO Mon May 29 04:30:19 2006
jobname..BeforeJob (ExecSH): Executed command: script_name.sh
1066 INFO Mon May 29 04:30:19 2006
Environment variable settings:
Again want to emphasise that we have not set the PATH in dsenv either.
The problem wht i think from the current PATH setting is "IBMdb2/home/db2inst1/sqllib/bin" is been defined before IBMdb2/home/db2rtcl/sqllib/bin ( which is the correct instance name ) and thats why couldnt connect to db2.
So , if there has been any setting for PATH where it appends the IBMdb2/home/db2rtcl/sqllib/bin to the existing PATH ..i would like to alter it to be prefixed than appended.
thnx
dwblore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
As with all variable settings, the most recent has effect. For DataStage processes the setting made in dsenv should be the most recent, unless overridden within the job design itself. The second message of a job run in the log contains all environment variable settings - did you check there to see what the value of PATH is? To get it right, make sure it's set in the dsenv file.
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.