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 » Qmgr Alias

Post new topic  Reply to topic
 Qmgr Alias « View previous topic :: View next topic » 
Author Message
kats
PostPosted: Fri May 02, 2008 11:04 am    Post subject: Qmgr Alias Reply with quote

Voyager

Joined: 20 Apr 2006
Posts: 78

Yes, this is widely discussed and I did search it before asking.
If you think I missed an imp link while googling, please forward me the link instead of answering. I'm thank ful to you either way.

Ran a test in UAT:

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzah.doc/qc10790_.htm


Qmgr: ABC

define qremote(Q.52)
define XMITQ(XMQ)
define SDR channel(ABC.CLUSQM)

Qmgr: CLUSQM

define ql(Q.52)
Define receiver channel(ABC.CLUSQM)
define qremote(YORK) rname(' ') rqmname(CLUSQM)

Now how can I put message on qlocal(Q.52) on YORK?

amqsput Q.52 YORK
fails with 2058

but

amqsput Q.52 ABC
works fine.

Am I testing it right?

(FYI...My application wants to put message on YORK qmgr and I do not want to create YORK qmgr. I want to create an alias qmgr YORK for existing qmgr: CLUSQM)

Any comments!

Thanks in advance.
_________________
If everything goes well, don't panic, it won't last for long.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 02, 2008 11:59 am    Post subject: Re: Qmgr Alias Reply with quote

Grand High Poobah

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

kats wrote:
(FYI...My application wants to put message on YORK qmgr and I do not want to create YORK qmgr. I want to create an alias qmgr YORK for existing qmgr: CLUSQM)


Assuming XMQ is the transmit queue used to service the channel ABC.CLUSQM

Try this:

Qmgr: ABC

define qremote(Q.52) rqmname(YORK)
define qremote(YORK) rname(' ') rqmname(CLUSQM)
OR
define qalias(YORK) targq(XMQ)
OR
define xmitq(YORK)
OR
....
OR
....


Remember that all applications (including amqsput) connect to their local qmgr, hence the 2058 trying to connect to YORK. Note also that amqsput assumes local objects. It could (and your application problably does) set the open object to YORK so all you need is a route called YORK that points to your CLUSQM that WMQ can resolve.

Why call the xmitq XMQ? Call it CLUSQM and save yourself one layer of alias!


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Fri May 02, 2008 12:09 pm    Post subject: Re: Qmgr Alias Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

kats wrote:

amqsput Q.52 YORK
fails with 2058

but

amqsput Q.52 ABC
works fine.

Am I testing it right?


Nope. You got the 2058 error code because you are trying to connect to a QM called YORK which is not present on your machine.

Code:

/* @(#) samples/c/amqsput0.c, samples, p600, p600-200-tfix5 1.34.1.1 05/05/26 12:21:14 */
 /********************************************************************/
 /*                                                                  */
 /* Program name: AMQSPUT0                                           */
 /*                                                                  */
 /* Description: Sample C program that puts messages to              */
 /*              a message queue (example using MQPUT)               */
 /* <N_OCO_COPYRIGHT>                                                */
 /* Licensed Materials - Property of IBM                             */
 /*                                                                  */
 /* 63H9336                                                          */
 /* (c) Copyright IBM Corp. 1994, 2005 All Rights Reserved.          */
 /*                                                                  */
 /* US Government Users Restricted Rights - Use, duplication or      */
 /* disclosure restricted by GSA ADP Schedule Contract with          */
 /* IBM Corp.                                                        */
 /* <NOC_COPYRIGHT>                                                  */
 /********************************************************************/
 /*                                                                  */
 /* Function:                                                        */
 /*                                                                  */
 /*                                                                  */
 /*   AMQSPUT0 is a sample C program to put messages on a message    */
 /*   queue, and is an example of the use of MQPUT.                  */
 /*                                                                  */
 /*      -- messages are sent to the queue named by the parameter    */
 /*                                                                  */
 /*      -- gets lines from StdIn, and adds each to target           */
 /*         queue, taking each line of text as the content           */
 /*         of a datagram message; the sample stops when a null      */
 /*         line (or EOF) is read.                                   */
 /*         New-line characters are removed.                         */
 /*         If a line is longer than 99 characters it is broken up   */
 /*         into 99-character pieces. Each piece becomes the         */
 /*         content of a datagram message.                           */
 /*         If the length of a line is a multiple of 99 plus 1       */
 /*         e.g. 199, the last piece will only contain a new-line    */
 /*         character so will terminate the input.                   */
 /*                                                                  */
 /*      -- writes a message for each MQI reason other than          */
 /*         MQRC_NONE; stops if there is a MQI completion code       */
 /*         of MQCC_FAILED                                           */
 /*                                                                  */
 /*    Program logic:                                                */
 /*         MQOPEN target queue for OUTPUT                           */
 /*         while end of input file not reached,                     */
 /*         .  read next line of text                                */
 /*         .  MQPUT datagram message with text line as data         */
 /*         MQCLOSE target queue                                     */
 /*                                                                  */
 /*                                                                  */
 /********************************************************************/
 /*                                                                  */
 /*   AMQSPUT0 has the following parameters                          */
 /*       required:                                                  */
 /*                 (1) The name of the target queue                 */
 /*       optional:                                                  */
 /*       --------(2) Queue manager name                         */
 /*                 (3) The open options                             */
 /*                 (4) The close options                            */
 /*       --------(5) The name of the target queue manager         */
 /*                 (6) The name of the dynamic queue                */
 /*                                                                  */
 /********************************************************************/

_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
kats
PostPosted: Mon May 05, 2008 9:23 am    Post subject: Re: Qmgr Alias Reply with quote

Voyager

Joined: 20 Apr 2006
Posts: 78

Got it. Thanks guys!!
_________________
If everything goes well, don't panic, it won't last for long.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Qmgr Alias
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.