|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQGET |
« View previous topic :: View next topic » |
Author |
Message
|
zoom508 |
Posted: Tue Jun 04, 2002 12:34 am Post subject: MQGET |
|
|
 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 |
|
 |
oz1ccg |
Posted: Tue Jun 04, 2002 1:56 am Post subject: |
|
|
 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 |
|
 |
zoom508 |
Posted: Tue Jun 04, 2002 3:53 am Post subject: |
|
|
 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 |
|
 |
zoom508 |
Posted: Tue Jun 04, 2002 4:09 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|