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 Discussion » How To Connect To Remote Queue Manager ?

Post new topic  Reply to topic
 How To Connect To Remote Queue Manager ? « View previous topic :: View next topic » 
Author Message
debugme
PostPosted: Thu Jan 22, 2004 9:17 am    Post subject: How To Connect To Remote Queue Manager ? Reply with quote

Apprentice

Joined: 14 Jan 2004
Posts: 27

Dear Friends,

I have MQ 5.3 installed on a Win2K box called WinBox01.

I have an MQ application running on a Solaris 5.8 box called
SunBox01. This box does NOT run any version of MQ. I
have managed to compile it using the Solaris binaries and
the fantastic amount of help the kind people on this forum
have extended to me.

What I need to do, is make the application on SunBox01
'connect' to the local queue manager on WinBox01 and
query it for various queue attributes.

My connection code looks like this for a local connection,
when I run the application on WinBox01. But I am not sure
what changes to make in it, so it can be run on SunBox01
and connect to WinBox01's queue manager.

Both the boxes are connected on a local network, of course

Code:

MQCHAR* queueManagerName = ...
MQHCONN connection = ...
MQLONG statusCode = ...
MQLONG reasonCode = ...
MQCONN(queueManagerName, &connection, &statusCode, &reasonCode);
...


Any snippets in C would be much appreciated...

regards, Asad.
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Jan 22, 2004 9:24 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You can relink your program to use the client libraries (mqic) as opposed to the server libraries (mqm). You can then export an environment variable (MQSERVER=SYSTEM.DEF.SVRCONN/TCP/hostname) and run your program remotely as an MQ client. You'll need to make sure that you have a listener running on the MQ machine.

If you search this site for amqsputc, you'll probably find some appends regarding the testing of your client connection.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
debugme
PostPosted: Mon Jan 26, 2004 1:37 am    Post subject: Thanks, but what about... Reply with quote

Apprentice

Joined: 14 Jan 2004
Posts: 27

Dear bower5932,

Thanks for the suggestions. I don't have a problem
recompiling with the client libraries, but exactly how
would I export an environment variable ? Also how
would I set-up a listener ?

I guess these questions may seem dumb, but this is
my first job out of university and the learning curve
is pretty steep for a newbie like me...

regards, Asad.
Back to top
View user's profile Send private message
JasonE
PostPosted: Mon Jan 26, 2004 2:43 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

In unix, its generally something like
EXPORT MQSERVER='channelname/TCP/hostname.domain.com(port)'
eg
EXPORT MQSERVER='SYSTEM.DEF.SVRCONN/TCP/127.0.0.1(1414)'

You can set it in your .profile for a specific user, or globally somehow for all users (not sure how).

For a listener on the windows box, bring up the MQ Services GUI, expand MQSeries, click on the QMgr you are trying to connect to
If there is a 'Listener' in Running state, you can use that already, you just need to know the port (right mouse on it, properties, find the Port in the tabbed pane)

If there isnt, right mouse on rhs panel in the gap, then New->Listener. Fill in the port (dont fill in local addr) and click ok, then start it (rightmouse on the listener, Action->Start

From the command line you can use amqmdain crtlsr, but I'll leave that as an exercise for the reader (amqmdain is documented in 5.3 docs)
Back to top
View user's profile Send private message
debugme
PostPosted: Tue Jan 27, 2004 4:52 am    Post subject: Thanks again for all your help ! Reply with quote

Apprentice

Joined: 14 Jan 2004
Posts: 27

Dear Jason,

This is great !

Thanks for being so generous with both your time and knowledge.
I have been making steady progress with my work, thanks to the
enormous amount of help, which I have received from yourself
and others like you on this forum.

regards, Asad.
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 Discussion » How To Connect To Remote Queue Manager ?
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.