Hi,
We have environment variable(EDW_HOME) at Unix level whose value is set up at profile (.profile) file which presents at home directory of a user. Value depends on user logged in.
Please find the values of EDW_HOME depends on the user.
User= etladmin
EDW_HOME=/hedw
User= etldev
EDW_HOME=/hedw_dev
User= etlsit
EDW_HOME=/hedw_sit
User= etluat
EDW_HOME=/hedw_uat
Now i created a script which creates a log file in the EDW_HOME directory and calling the script from job. The same job is imported into the following projects
Dev
Sit
Uat
I logged in to Dev project as etldev user and ran the job. But it tries to create a log file in /hedw directory. It happens with all the users and projects. i.e.always it tries to create in /hedw directory and looks like it is default. I wanted to create the log file based on user. If i execute the same script from command prompt it is working fine. Please let me know what could be the problem.
Running Wrong Profile from Script
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Look in the second event in the job log, which shows all environment variables' settings. Look in the first event in the job log ("job starting") which shows all job parameter settings with which the job was invoked. Figure out whether they're being passed properly. Check the job design, to see whether the pathname is hard coded as /hedw rather than being a reference to a job parameter.
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.
Or create a Environmental varialbe which will be configured for each project, to the home directory of that corresponding user. And pass this variable as parameter to the shell and source the .profile for each time, so that you can ensure that the user specific variable is used.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'