>>First Don't you run the script that is triggered in the background???
Tried that by sticking the & in various places in the Process Definition. No
luck.

>>Not the command that is inside the script you are starting???
Tried that to by sticking a blank space and the & after the QM name inside
the script. No luck.


>>I am assuming you are testing something weird!!!
;->
I will post it as soon as I get this one last test (triggering an MQ app in
the background) completed.

>>How about a loop.
Its not the length of time that is the issue, I only need it to run 15
seconds or so. Its getting the damn thing to run in the background versus
the Trigger Monitor window!



-----Original Message-----
From: Robert Broderick [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 6:30 PM
To: [EMAIL PROTECTED]
Subject: Re: How to trigger amqsput into the background


First Don't you run the script that is triggered in the background??? Not
the command that is inside the script you are starting???

And it you want something to run for a while that you want to kill (I am
assuming you are testing something wierd!!! How about a loop. (Hopfully this
will not kill your machine!!!)

Get something like this to work. Read from the queue and write to the same
queue. Not sure this will work. BUT you get the idea!!!!


/opt/mqm/samp/bin/amqsget SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1 |
/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1


>From: Rick Tsujimoto <[EMAIL PROTECTED]>
>Reply-To: MQSeries List <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: How to trigger amqsput into the background
>Date: Thu, 22 Jul 2004 16:35:17 -0400
>
>Peter,
>
>Doesn't amqsput require two null inputs to terminate the application?  If
>you run in background, how are you providing the double nulls?
>
>
>
>
>              "Potkay, Peter M
>              (ISD, IT)"
>              <[EMAIL PROTECTED]                                          To
>              HARTFORD.COM>             [EMAIL PROTECTED]
>              Sent by: MQSeries                                          cc
>              List
>              <[EMAIL PROTECTED]                                     Subject
>              n.AC.AT>                  How to trigger amqsput into the
>                                        background
>
>              07/22/2004 04:08
>              PM
>
>
>              Please respond to
>                MQSeries List
>              <[EMAIL PROTECTED]
>                  n.AC.AT>
>
>
>
>
>
>
>Solaris 2.8
>MQ 5.3 CSD4
>
>I have runmqtrm running in the foreground.
>
>I have the following in my ApplID field of the process definition:
>/var/mqm/peterscript.sh
>
>I have the following in /var/mqm/peterscript.sh:
>/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1
>
>This works great, as I see the following in the Trigger Monitor Window:
>__________________________________________________
>Waiting for a trigger message
>
>/var/mqm/peterscript.sh 'TMC    2PETER
>Sample AMQSPUT0 start
>target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
>my test message to be put
>
>Sample AMQSPUT0 end
>End of application trigger.
>
>__________________________________________________
>Waiting for a trigger message
>
>
>So now I want the trigger monitor to kick off amqsput in the background. I
>don't care that I won't be able to put to it, I will use ps -ef|grep
>amqsput
>to verify it is up, and then kill -9 it.
>
>I tried putting this inside the script:
>/opt/mqm/samp/bin/amqsput SYSTEM.DEFAULT.LOCAL.QUEUE SOLARIS1 &
>
>and got this in the trigger monitor window:
>__________________________________________________
>/var/mqm/peterscript.sh 'TMC    2PETER
>Sample AMQSPUT0 start
>target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
>Sample AMQSPUT0 end
>End of application trigger.
>
>__________________________________________________
>Waiting for a trigger message
>
>
>It just ends amqsput right away. It is not running in the background. And
>notice the Waiting for Trigger message line does not come up either. But if
>I then try retriggering it in the foreground again, I get this:
>
>/var/mqm/peterscript.sh 'TMC    2PETER
>Sample AMQSPUT0 start
>target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
>Sample AMQSPUT0 end
>End of application trigger.
>
>__________________________________________________
>Waiting for a trigger message
>
>I didn't get the chance to add my message; amqsput ends right away again,
>but now the Waiting for Trigger Message comes up, and now I can retrigger
>correctly in the foreground as I did in the beginning.
>
>
>I also tried putting the & in the Environment Data of the Process Def, I
>got
>this:
>__________________________________________________
>Waiting for a trigger message
>Sample AMQSPUT0 start
>target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
>Sample AMQSPUT0 end
>
>again no Waiting for Trigger message error. Altering the Process def to
>remove the & and trying to trigger again gave me this:
>
>/var/mqm/peterscript.sh 'TMC    2PETER
>Sample AMQSPUT0 start
>target queue is SYSTEM.DEFAULT.LOCAL.QUEUE
>test message to put
>
>Sample AMQSPUT0 end
>End of application trigger.
>
>__________________________________________________
>Waiting for a trigger message
>
>This time it didn't need that double triggering to get amqsput to show up
>properly.
>
>
>
>Any ideas of how to get it to start up in the background properly?
>
>
>
>
>
>Peter Potkay
>MQSeries Specialist
>The Hartford Financial Services
>[EMAIL PROTECTED]
>x77906
>IBM MQSeries Certified
>
>
>
>
>This communication, including attachments, is for the exclusive use of
>addressee and may contain proprietary, confidential or privileged
>information. If you are not the intended recipient, any use, copying,
>disclosure, dissemination or distribution is strictly prohibited. If
>you are not the intended recipient, please notify the sender
>immediately by return email and delete this communication and destroy all
>copies.
>
>Instructions for managing your mailing list subscription are provided in
>the Listserv General Users Guide available at http://www.lsoft.com
>Archive: http://vm.akh-wien.ac.at/MQSeries.archive
>
>Instructions for managing your mailing list subscription are provided in
>the Listserv General Users Guide available at http://www.lsoft.com
>Archive: http://vm.akh-wien.ac.at/MQSeries.archive

_________________________________________________________________
Planning a family vacation? Check out the MSN Family Travel guide!
http://dollar.msn.com

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive


This communication, including attachments, is for the exclusive use of
addressee and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, any use, copying,
disclosure, dissemination or distribution is strictly prohibited. If
you are not the intended recipient, please notify the sender
immediately by return email and delete this communication and destroy all copies.

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to