Hello All,
My requirement is:
To get the value of User defined environment variable for a project in the UNIX box.
For e.g.:
1. I have defined a variable Log_Dir having value /user/spool/myproject/logdir in the administrator.
2. I am using this variable in the job and have given the value in job as $PROJDEF.
3. I want to run the job from UNIX using dsjob command. I want to use the value "/user/spool/myproject/logdir" in my batch run script.
I could see that if we use the command below it will give me "$PROJDEF":
dsjob -paraminfo project_name job_name parameter_name
Is there a way I can get the actual value (/user/spool/myproject/logdir) stored in administrator?
Your help is appreciated.
Thanks and Regards,
Ajith GK
Getting values of User defined environment variables in UNIX
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 33
- Joined: Sat Jul 02, 2005 2:27 am
- Location: Bangalore
Getting values of User defined environment variables in UNIX
warm regards,
Ajith GK
Ajith GK
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you want to replace the default when running the job, use the -param option.
dsjob -run -param Log_Dir=/user/spool/myproject/logdir projname jobname
To recover the value that was used, whether it was substituted for $PROJDEF or in the run request, you need to look at the job log. The "job started" entry shows the parameter values that were actually used for the run.
dsjob -run -param Log_Dir=/user/spool/myproject/logdir projname jobname
To recover the value that was used, whether it was substituted for $PROJDEF or in the run request, you need to look at the job log. The "job started" entry shows the parameter values that were actually used for the run.
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.
-
- Participant
- Posts: 33
- Joined: Sat Jul 02, 2005 2:27 am
- Location: Bangalore
Hello All,
Thank you for all the replies.
I think my requirement was not mentioned/understood clearly. Let me restate it.
1. I have defined a variable Log_Dir having value /user/spool/myproject/logdir in the administrator.
2. I am creating a script which is different from the one used to run the job from UNIX.
Say, the script is:
SCRIPT_NAME=`basename $0`
JobName=$1
LOG_DIR=
Here I want to assign the value that is there in the administrator.
In short, I want to obtain the actual value defined in the administrator using a combination of Orchestrate and UNIX commands.
Hence, the reason I mentioned that "dsjob -paraminfo project_name job_name parameter_name" will give me the value "$PROJDEF". What I want is "user/spool/myproject/logdir" assigned to the LOG_DIR variable in the UNIX script.
Let me know if you could help me in the same.
Thank you for all the replies.
I think my requirement was not mentioned/understood clearly. Let me restate it.
1. I have defined a variable Log_Dir having value /user/spool/myproject/logdir in the administrator.
2. I am creating a script which is different from the one used to run the job from UNIX.
Say, the script is:
SCRIPT_NAME=`basename $0`
JobName=$1
LOG_DIR=
![Question :?:](./images/smilies/icon_question.gif)
In short, I want to obtain the actual value defined in the administrator using a combination of Orchestrate and UNIX commands.
Hence, the reason I mentioned that "dsjob -paraminfo project_name job_name parameter_name" will give me the value "$PROJDEF". What I want is "user/spool/myproject/logdir" assigned to the LOG_DIR variable in the UNIX script.
Let me know if you could help me in the same.
warm regards,
Ajith GK
Ajith GK
-
- Participant
- Posts: 69
- Joined: Tue Jan 18, 2005 12:15 am
-
- Participant
- Posts: 33
- Joined: Sat Jul 02, 2005 2:27 am
- Location: Bangalore