ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Put message to local q when qmgr starts

Post new topic  Reply to topic Goto page 1, 2  Next
 Put message to local q when qmgr starts « View previous topic :: View next topic » 
Author Message
wbimb
PostPosted: Mon May 05, 2008 9:15 pm    Post subject: Put message to local q when qmgr starts Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

Does anyone know how can i put a message to a local queue when Qmgr starts

I tried creating a service with amqsput TEST TESTQMgr but it doesnt fire amqsput
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon May 05, 2008 9:18 pm    Post subject: Re: Put message to local q when qmgr starts Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

wbimb wrote:

I tried creating a service with amqsput TEST TESTQMgr but it doesnt fire amqsput


What does this means, are you getting any error?
If so, Please post that....rather being very abstract.

go to sample directory --> /opt/mqm/samp/bin and execute the same and verify.

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
wbimb
PostPosted: Mon May 05, 2008 9:21 pm    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

I m using MQ v6 on Windows XP

so in start command i put amqsput

and in start args i put TEST TESTQMgr <c:\Message.txt

but it doesnt start amqsput
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon May 05, 2008 9:26 pm    Post subject: Re: Put message to local q when qmgr starts Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

[quote="Gaya3]
go to sample directory --> /opt/mqm/samp/bin and execute the same and verify.[/quote]

Did you try this....

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
wbimb
PostPosted: Mon May 05, 2008 9:31 pm    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

Yes Gaya

When i execute it from command prompt

amqsput TEST TESTQMgr <c:\Message.txt

it works fine
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon May 05, 2008 10:15 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

why do you want to create a service for amqsput

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
wbimb
PostPosted: Mon May 05, 2008 10:17 pm    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

I want to put a message to a local queue when the Queue Manager starts, so i thought it will be possible with service,

Do you know anyother way i can achieve it
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 06, 2008 12:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wbimb wrote:
I want to put a message to a local queue when the Queue Manager starts, so i thought it will be possible with service,


It should be. Esnure the amqsput runs after the queue manager has finished coming up, and diagnose using MQ reason codes in the normal way.

wbimb wrote:
Do you know anyother way i can achieve it


Achieve what? The queue manager effectively talking to itself? I struggle to see what possible use this could be to you, and I would be devistated to discover this was your only option......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
wbimb
PostPosted: Tue May 06, 2008 1:10 am    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

It is not....amsgput is not coming up

If I manually start the service and sametime check task manager process i dont see any amqsput process getting started
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 06, 2008 1:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wbimb wrote:
It is not....amsgput is not coming up


Then you've got a problem with the service configuration somewhere, and the usual diagnotics should be applied. My guess (and it's only a guess) is amqsput is trying to write to stdout & there's no stdout context for it. Speak to your Windows admin.

You might also want to rewrite amqsput so it's non-interactive.

I still fail to see why you'd want to do something so apparently pointless.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue May 06, 2008 6:29 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

I'll guess: the poster wants to trigger an application at qmgr startup.

1 (guess) down; 9 to go...
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue May 06, 2008 6:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bruce2359 wrote:
I'll guess: the poster wants to trigger an application at qmgr startup.


It's a fair guess. But why (in that circumstance) would the poster not start the triggered application directly as a service and save a step? Why set up a service to trigger it?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue May 06, 2008 7:01 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

wbimb: exactly what business process or function are you trying to achieve by putting a message in a queue at qmgr startup?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed May 07, 2008 12:30 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

amqsput expects StdIn input or redirection of input from a file. I'm pretty sure the Service cannot handle redirection.

Therefore, you will need to alter / update amqsput for your needs.

Here's a working sample that puts a message on a queue at queue manager startup:


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
wbimb
PostPosted: Wed May 07, 2008 9:25 pm    Post subject: Reply with quote

Centurion

Joined: 17 Aug 2006
Posts: 144

Hey Roger

Thanks. I modified amqsput as mentioned by you and it worked
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » Put message to local q when qmgr starts
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.