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 » HELP !!!!! WITH MQCONNX IN PERL

Post new topic  Reply to topic
 HELP !!!!! WITH MQCONNX IN PERL « View previous topic :: View next topic » 
Author Message
pappus
PostPosted: Wed Sep 05, 2001 12:19 pm    Post subject: Reply with quote

Newbie

Joined: 21 Aug 2001
Posts: 5

Is there anyone out there in the world that has connected to MQ using the MQCONNX call from perl. If so, please send me the code snippet. I posted this message 10 days ago and got no resposnse so far.
Thank You.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bduncan
PostPosted: Wed Sep 05, 2001 4:16 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Pappus,
Sorry I didn't respond to your first message. Going back, I noticed that it was posted within the flow of another discussion on Perl. This is probably why I missed it, so it's good that you reposted it as a new thread. Anyhow, I've had extensive experience with Perl and MQ, and while I have used MQCONNX in the past, I don't think I have any sample code handy that uses it.
My question to you is, what difficulties are you running into? Are you using it and getting MQSeries errors, or are you just trying to figure out how to implement it? I ask, because normally you don't need to use MQCONNX. The only thing it provides above the regular MQCONN is the ability to specify connect options. It's typically used to specify the type of bindings to use. So maybe you could give a little more detail on how you are trying to use MQCONNX?
thanks...


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
pappus
PostPosted: Thu Sep 06, 2001 5:32 am    Post subject: Reply with quote

Newbie

Joined: 21 Aug 2001
Posts: 5

In my application I have a broker written in Java listening for messages from clients. When it receives a message, it puts it on a Process queue and then executes a Perl program,(all our server code is written in perl) on a separate thread and passes it the messageId/correlId to process. The problem is, when it executes the perl code, it does not see the MQSERVER environment variable. To get around the problem, I am creating a batch file from java with "set MQSERVER" command followed by the perl script call. I do not like this solution because it is not a platform independent. I prefer to use MQCONNX all the time. I would appreciate it, if you could post some sample code.
Thanks.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bduncan
PostPosted: Thu Sep 06, 2001 9:13 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Another question: Are you running a single queue manager on the server? If so, and if it's the default queue manager, you can simply use MQCONN and specify the queue manager name as "" (blank) and your process will connect to the default queue manager. Otherwise, why not pass the queue manager name as a parameter to the perl program just like you are already passing the msgid and correlid?


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
pappus
PostPosted: Thu Sep 06, 2001 9:30 am    Post subject: Reply with quote

Newbie

Joined: 21 Aug 2001
Posts: 5

Its not a question of passing or not passing a QManager name. Actually I am passing the QManager name and Queue name too. But, more important than that, the perl code needs to know the channel/host/port. That's where I am having trouble. We have multiple queue managers running on different machines to serve as dev/qa/prod environments and that's the reason I cannot rely on MQSERVER environment variable. I have to use MQCONNX call..
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bduncan
PostPosted: Thu Sep 06, 2001 12:16 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

I'm still not clear as to whether you have tried to implement MQCONNX and you are having problems, or you are just looking for an example of how to do it? If I'm not mistaken the CPAN MQ perl module comes with some HTML documents showing how to use the various calls...


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
pappus
PostPosted: Fri Sep 07, 2001 4:42 am    Post subject: Reply with quote

Newbie

Joined: 21 Aug 2001
Posts: 5

Yes. I have tried using MQCONNX lot of different ways without success. Following is one of the ways that I tried:
--------------------------------------------
$QMGR = "QM.TOR.1" ;
$Connection =
{ ConnectionName => "mqhost00009(1415)",
ChannelName => "S.QM.TOR.1"
};
$Coption =
{
ClientConnPtr => $Connection,
Version => MQCNO_VERSION_2
};
$Hconn = MQCONNX($QMGR, $Coption, $CompCode, $Reason);
--------------------------------------------
and NO, the CPAN perl module documentation does not give any usefull examples.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bduncan
PostPosted: Fri Sep 07, 2001 11:28 am    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

pappus,
So does the code snippet you provided actually compile? Is perl complaining about syntax errors, or does the compilation work, but it isn't behaving as you expect? If there are any associated MQSeries reason codes that would be very helpful. One thing I did stumble upon, is that the MQSeries documentation states:
"If the application is not running as an MQ client, ClientConnOffset and ClientConnPtr are ignored"
That might be your problem if you are connecting to a server...


_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » HELP !!!!! WITH MQCONNX IN PERL
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.