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 » IBM MQ API Support » perl MQSeries MQGET

Post new topic  Reply to topic
 perl MQSeries MQGET « View previous topic :: View next topic » 
Author Message
sming
PostPosted: Fri May 06, 2005 1:52 pm    Post subject: perl MQSeries MQGET Reply with quote

Newbie

Joined: 06 May 2005
Posts: 5

Hi all,
I am debugging a perl script that essentially does a Get() on an MQSeries::Queue object.

All goes swimmingly until the call to Get() where the error message:
MQGET failed (Reason = 2186)
is always returned.

After some Google'ing, 2186 is mapped to:
"Get-message options structure not valid."

So I debugged the Get() call to find the following hash ref being passed:
DB<16> p Dumper($GetMsgOpts)
$VAR1 = {
'Options' => 24577,
'WaitInterval' => 10000
};

- does this look sane/sensible/correct?
- if not, what should I be passing?

Then I found the Get() code snippet on this website (under the downloads section) and found that the following hash ref is passed:
DB<5> p Dumper($GetMsgOpts)
$VAR1 = {
'MatchOptions' => 0,
'Options' => 24577,
'WaitInterval' => 10000
};

That also resulted in the 2186 error.

AFAICT I am using the appropriate versions of the MQ perl module (1.23) and they've been built and installed correctly.

Any help much appreciated, I've spent a day and a half on this already!
Peter
Back to top
View user's profile Send private message
bower5932
PostPosted: Fri May 06, 2005 1:57 pm    Post subject: Reply with quote

Jedi Knight

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

Now help on the actual problem, but you can get the 2186 without googling:
Code:
C:>mqrc 2186

      2186  0x0000088a  MQRC_GMO_ERROR


The 24577 converts to x6001 which (from cmqc.h) gives wait, fail if quiescing, and convert which should be valid. This might save you some time in the future on researching your problem.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Fri May 06, 2005 7:42 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If the message format is not string (MQSTR) you might have a problem with the convert option. Try to do a get without it and see how it goes.

Back to top
View user's profile Send private message Send e-mail
sming
PostPosted: Sun May 08, 2005 10:19 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2005
Posts: 5

fjb_saper wrote:
If the message format is not string (MQSTR) you might have a problem with the convert option. Try to do a get without it and see how it goes.


thanks man, I'll take a look when back at work tomorrow.
pete
Back to top
View user's profile Send private message
zpat
PostPosted: Sun May 08, 2005 11:13 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

You would get "Format Error" if it was not MQSTR and you specified MQGMO_CONVERT, I imagine.
Back to top
View user's profile Send private message
EddieA
PostPosted: Sun May 08, 2005 7:20 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
You would get "Format Error" if it was not MQSTR and you specified MQGMO_CONVERT, I imagine.

Kind of. You would get the message unconverted, a 2110 warning, and an entry in the logs stating that an exit, the same name as the Format, could not be found.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
sming
PostPosted: Mon May 09, 2005 5:37 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2005
Posts: 5

Thanks again guys. I am indeed passing MQSTR and no convert that I know of. I include the MQGET call that is failing and a dump of each of the parameters. I'd seriously appreciate any insight you lot may have! :

my $buffer = MQGET(
$self->{QueueManager}->{Hconn},
$self->{Hobj},
$args{Message}->MsgDesc(),
$GetMsgOpts,
$datalength,
$self->{"CompCode"},
$self->{"Reason"},
);


p Dumper($self->{QueueManager}->{Hconn})
$VAR1 = 6;

p Dumper($self->{Hobj})
$VAR1 = 1073773104;

p Dumper($args{Message}->MsgDesc())
$VAR1 = {
'Encoding' => 273,
'MessageType' => 8,
'Format' => 'MQSTR ',
'CodedCharSetId' => 0
};

p Dumper($GetMsgOpts)
$VAR1 = {
'MatchOptions' => 0,
'Options' => 24577,
'WaitInterval' => 10000
};

p Dumper($datalength)
$VAR1 = 32767;

p Dumper($self->{"CompCode"} )
$VAR1 = 2;

p Dumper($self->{"Reason"})
$VAR1 = 2195;

Many thanks!
pete

N.B. The "Dumper" function is the procedural invocation of Data::Dumper.
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon May 09, 2005 11:02 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
p Dumper($self->{"Reason"})
$VAR1 = 2195;

2195 : MQRC_UNEXPECTED_ERROR

That's a different code than before. For this one, ypu'll need to go look at the FDC that should have been cut.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
sming
PostPosted: Mon May 09, 2005 11:12 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2005
Posts: 5

EddieA wrote:

That's a different code than before. For this one, ypu'll need to go look at the FDC that should have been cut.
Cheers,


Correct, but I've accidentally mislead you The output I posted was _before_ the call to MQGET. After the call, $self->{"Reason"} is indeed 2186.

Pete.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon May 09, 2005 11:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sming wrote:
Correct, but I've accidentally mislead you The output I posted was _before_ the call to MQGET.


If you're getting a 2195 before the GET then it doesn't matter what the GET returns - as things are already broken.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
sming
PostPosted: Mon May 09, 2005 11:57 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2005
Posts: 5

jefflowrey wrote:

If you're getting a 2195 before the GET then it doesn't matter what the GET returns - as things are already broken.


Not so. In the MQSeries::Queue:Get method:
...
$self->{"CompCode"} = MQSeries::MQCC_FAILED;
$self->{"Reason"} = MQSeries::MQRC_UNEXPECTED_ERROR;
...

I think this is just defensive initialisation in practice i.e. "assume failure" before the MQGET call itself is performed.

pete
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 » IBM MQ API Support » perl MQSeries MQGET
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.