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 Installation/Configuration Support » MQGET

Post new topic  Reply to topic
 MQGET « View previous topic :: View next topic » 
Author Message
zoom508
PostPosted: Tue Jun 04, 2002 12:34 am    Post subject: MQGET Reply with quote

Newbie

Joined: 28 Apr 2002
Posts: 6
Location: France

Hi!

I'm developping an application that tries to get messages from a queue until this queue is empty. I use an MQGET call in a loop. The exit copndition of the loop is Reason code == 2033.

The first message is get without any problem, and the second MQGETCALL returns 2033 as Reason code, althought the queue isn't empty.
I don't understand!

Thanks for help !
Back to top
View user's profile Send private message Send e-mail
oz1ccg
PostPosted: Tue Jun 04, 2002 1:56 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hi zoom...,

Remember to initialize MSGID and CORELID in MQMD before each MQGET, because it typicly contains the result from the prevoius MQGET.

my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
zoom508
PostPosted: Tue Jun 04, 2002 3:53 am    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2002
Posts: 6
Location: France

Hi oz!

I've put in my code this line : md.MsgId = MQMI_NONE; (it's a C program)

When I compile I've got the following error :line 167.8: 1506-025 (S) Operand must be a modifiable lvalue.

I've also tried : md = {MQMD_DEFAULT}; and I got a syntax error.

How can I set the MsgId and CorrelId fields ?
_________________
Best Regards !
Zoom508
Back to top
View user's profile Send private message Send e-mail
zoom508
PostPosted: Tue Jun 04, 2002 4:09 am    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2002
Posts: 6
Location: France

I've found the solution :

memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId));

Now, my program works.

Thanks a lot for your help oz1ccg!
_________________
Best Regards !
Zoom508
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » 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.