Author |
Message
|
yiftah_o |
Posted: Wed Jul 16, 2003 12:31 am Post subject: passing environment variables to triggered applications |
|
|
Newbie
Joined: 30 Jun 2002 Posts: 9 Location: Raanana, Israel
|
Hi
I have an application that works well when run from the command line but fails (because of wrong PATH) when it is triggered with the trigger monitor.
how can I make sure all the variables in the shell are passed to the triggered process?
OS: unix
MQS ver: 5.2
thanks for the help,
Yiftah |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Jul 16, 2003 5:24 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Well one way is to create a shell script and trigger that and inside the shell
script set the path.
export PATH=$PATH:"PATH_TO_EXECUTABLE" _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
sree |
Posted: Wed Jul 16, 2003 6:16 pm Post subject: |
|
|
Novice
Joined: 12 Mar 2003 Posts: 19
|
I guess the trigger monitor may be running on different ID, other than on which you ran the application on command prompt. Set the class path in .profile file of the ID (may be mqm) on which trigger monitor is running. you can find .profile file at /home/mqm . It may work try that. _________________ Thank you.
sree |
|
Back to top |
|
 |
yiftah_o |
Posted: Thu Jul 17, 2003 12:02 am Post subject: |
|
|
Newbie
Joined: 30 Jun 2002 Posts: 9 Location: Raanana, Israel
|
guys, thanks for the responses. this got me to refine my issue.
after further investigation I saw that the runmqtrm command has -r-sr-s--- permissions. this make my triggered application run as mqm user (even when I run it from another user) and not get the local environment variables (PATH was just one example).
running a script that runs my application may hurt performance. any other ideas?
I tried moving the runmqtrm to my account and changed its permissions to -rwxr-xr-x this works but can it cause any troubles? |
|
Back to top |
|
 |
mrlinux |
Posted: Thu Jul 17, 2003 9:27 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
No it shouldnt cause issues, as long as the user running it as access to all the queues including the DEAD LETTER QUEUE _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
|