Well, this time amqsget ALWAYS starts up in the foreground and the output
looks the same, whether I have the & in the script file and the end of the
command, in the Env Data of the process def, or no & anywhere at all.



-----Original Message-----
From: Awerbuch, David (CALYON) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 4:34 PM
To: [EMAIL PROTECTED]
Subject: Re: How to trigger amqsput into the background


Peter,

When you have an application that expects keyboard input (like amqsput) and
run it in the background, the program gets an immediate EOF on the first
read.  In this case, amqsput is getting the EOF and is terminating without
having processed a message.

I am guessing that this is a simple test you are trying, to prove that the
trigger actually works and that the target application starts up properly.
I would suggest for this test that you run amqsget; amqsget will wait for (I
believe) 15 seconds, and then terminate on NO_MSGS_AVAIALBLE.

Good luck, let us know what happenned.
Dave A.


-----Original Message-----
From: Potkay, Peter M (ISD, IT) [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 4:08 PM
To: [EMAIL PROTECTED]
Subject: How to trigger amqsput into the background


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


*** Calyon ****************************************************
This message and/or any attachments (the "message") is intended for the sole
use of its addressee.  If you are not the addressee, please immediately
notify the sender and then destroy the message.  The unauthorized
disclosure, use, dissemination or copying (either whole or partial) of this
e-mail, or any information it contains, is prohibited. E-mails are
susceptible to alteration and their integrity cannot be guaranteed.  As this
message and/or any attachments may have been altered without our knowledge,
its content is not legally binding on CALYON Corporate and Investment Bank.
All rights reserved.

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

Reply via email to