Posted: Thu Jan 23, 2003 7:41 am Post subject: MQGET by CorrelId using Perl
Novice
Joined: 23 Jan 2003 Posts: 20
Hello,
I am trying to use the Perl MQ API to get messages from a queue by CorrelId, has anyone acheived this? I have traced the script and all parameters appear correct when the module issues the MQGET() but the return code is 2 reason 2033 when there are messages with the correct correlId on the queue. HELP!!!
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
Yes. I've written an entire three-tier transactional system which operated on 20 queue managers in a cluster all using perl. You didn't mention if you were using the OO version of the perl API or not, but my first guess is that you aren't clearing the appropriate fields in the MQMD hash/object which means you won't retrieve any message on the MQGET (2033). Ensure that MatchOptions is set to MQMO_MATCH_CORREL_ID. Ensure that the MsgId field is set to MQMI_NONE. If everything looks right and it still doesn't work, simply change the MQMO_MATCH_CORREL_ID to MQMO_NONE, and see if you get any messages off the queue. If you still get a 2033, then you have some other problem, because your code won't be trying to match on anything anymore... _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
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