On Wed, Feb 22, 2012 at 10:46:35PM +0530, Santosh Sadangi wrote:
> Hi Team,
> 
>  
> 
> Many Thanks for your reply.I am new to perl and mqseries.i am facing so many
> problem to connect to my local mqseries queue.
> 
> 
> Sorry for such a big below mail.I am writing this mail,as you can understand 
> my
> problem clearly ,which would help me to resolve the issue.
> 
>  
> 
> Step-1-Following is my Environment details
> 
>  
> 
> SunOS 5.10 Generic_144488-09 sun4v sparc SUNW,SPARC-Enterprise-T5220
> MQseries version-6.0
> Perl 5.8

that sounds fine.

> Step-2-
> 
>  
> 
> I have first used the object oriented approach.When i used that approach and
> wrote the script like below,i have got the below error.which i have specified
> below.
> 
>  
> 
> Code:
> -Mandatory parameter 'AutoConnect' missing in call to
> MQSeries::QueueManager::Connect
>         MQSeries::QueueManager::Connect('MQSeries::QueueManager=HASH(0x7ae7ec)
> ') called at Mqutils.pm line 63
>         Mqutils::openQueueMgr('Mqutils=HASH(0x32590)', 'QM.A108020',
> 10.225.98.86, 1414, 'QM.A108020', 'request') called at ./mq_put.pl line 25
> -------------------------------------------------------------------------------------
> 
> Following is the snap shot of my perl script code.if you look the below code,
> the argument AutoConnect is already present inside Queuemanager::new in the
> last row.
> 
>  
> 
> Inspite of that when i am using the object,which is create by Quemanger
> constructer to call connect() api,it is giving the error,which i have 
> specified
> above.
> 
>  
> 
> Code:
> my $qm = MQSeries::QueueManager->new(
>                               QueueManager         => $qm_name,
>                               Carp                 => 0,
>                               CompCode             => 0,
>                               Reason               => 0,
>                               GetConvert           => 0,
>                               PutConvert           => 0,
>                               RetryCount           => 0,
>                               RetrySleep           => 0,
>                               RetryReasons         => 0,
>                               ConnectTimeout       => 0,
>                               ConnectTimeoutSignal => 0,
>                               ClientConn           => 0,
>                               SSLConfig            => 0,
>                               AutoConnect          => 0,
>                               AutoCommit           => 0,
>     )|| die "Unable to instantiate MQSeries::QueueManager object\n";
> print "After new and before connect\n";
> #  kick it off and see if it connects
> #    eval {
>         $qm->Connect()
>             || die(sprintf("Connect failed with CompCode: %s",
>                                "Reason %sn",$qm->CompCode(),$qm->Reason()));
> #    };

if i run this code (having defined $qm_name to be relevant here), i
get just this output:

    After new and before connect

and that's it.

> Step-3-
> 
>  
> 
> When i didnt suceed to resolve the above problem,I thought to use the MQAPI
> directly in my call,in the following way,which i am specifying below.
> 
>  
> 
> When i am using the below script,i am getting the junk comp code and reson 
> code
> and it is not either connecting to queue manager or sending message to queue.

what exactly do you get?  i get this:

   Inside openqueuemgr 
   Queue Manager is MQCRSH4 
   Santosh Inside connect
   -------------------------------------------
   mqnone is 0
   code is 2
   Reason is  2195
   Before calling MQCONN
   -------------------------------------------
   Connection to Queuemanager failed
   Use of uninitialized value in numeric eq (==) at 
/ms/user/a/anbrown/rm.helpme line 82.
   Use of uninitialized value in numeric eq (==) at 
/ms/user/a/anbrown/rm.helpme line 82.
   Use of uninitialized value in numeric eq (==) at 
/ms/user/a/anbrown/rm.helpme line 82.
   Use of uninitialized value in numeric eq (==) at 
/ms/user/a/anbrown/rm.helpme line 82.
   Reason is  2058

   After MQCONN

but that's expected since the perl code is using MQServer::MQSeries
and not MQClient::MQSeries.  the former only works for talking to
locally installed qmgrs.  the latter can be used to talk to local or
remote qmgrs.  why don't you try changing that first.

> So could you please help me how to resolve this problem,if it is a data
> conversion problem or anything wrong in my perl script.

try using MQClient::MQSeries instead of MQServer::MQSeries.  also fix
those warnings about uninitialized values (hint: you are mixing up
$Reason and $self->{"Reason"}).

> Code:
[snip]
> 
> 
> Step-4-if you look above code,even the control is not comming to any of the
> resoncode and compcode,which i have specified in the above if else condition.

it seemed to do so for me.  what output are you getting exactly?

> ________________________________________
> From: perl-mqser...@morganstanley.com [perl-mqser...@morganstanley.com]
> Sent: Wednesday, February 22, 2012 6:51 PM
> To: Santosh Sadangi
> Cc: modules@perl.org
> Subject: Re: CPAN Mqseries Module for Solaris5.10
> 
> On Wed, Feb 22, 2012 at 11:59:55AM +0530, Santosh Sadangi wrote:
> > Hi Team,
> >
> > I am new to perl and Cpan Mqseries.I have written one script to connect to
> > local queuemanager by using perl.However it is not connecting to my
> > Queuemanager and the error code and completion code which i am getting is a
> > junk value.
> >
> > Upon investigation i have found from the following cpanmqseries web link
> > that,MQSeries1.32 is not supporting Solaris5.10 64bit platfoem.
> >
> > http://search.cpan.org/~mqseries/MQSeries-1.32/README
> >
> > So could you please let me know?which version of CPANMqseries is supporting
> for
> > Solaris5.10 64bit platform.
> 
> they should all work on that platform, but you're not giving us much
> to go on here.  what completion and reason codes are you getting?  can
> you produce a small code sample that replicates the problem?
> 

Reply via email to