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 » MQ Request Reply Program on AS400 using RPG ILE

Post new topic  Reply to topic
 MQ Request Reply Program on AS400 using RPG ILE « View previous topic :: View next topic » 
Author Message
Sangmesh
PostPosted: Wed May 06, 2009 11:07 am    Post subject: MQ Request Reply Program on AS400 using RPG ILE Reply with quote

Newbie

Joined: 06 May 2009
Posts: 2

Hello,
I am trying to write MQ Program using RPG ILE on AS400. The program is request type and I want get message using Correlation ID.
When I put i am using following option.

C Z-ADD MTRQST MDMT
C Z-ADD ROCMTC MDREP

The receiving program processes the messages and sends back the message Id in correlation ID field.

When I do get I am using

C GMWT ADD GMATM GMOPT
C ADD MOCORI GMMO

and

C MOVEL MINONE MDMID
C MOVEL CINONE MDCID
C MOVEL MDMID MDCID

it is getting all the messages instead of getting just the message with matching correlation ID.


Please let me know what are the correct parameters I need to use to get only those messages that matches the correlation id.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed May 06, 2009 11:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Moved to more relevant section
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 06, 2009 8:04 pm    Post subject: Reply with quote

Grand High Poobah

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

I see that you are clearing the msgid and correlid using MQMI_NONE and MQCI_NONE. Are you sure that before you do the get you are correctly moving the msgId of the previous message to the correlId of the MQMD?

From the behavior you display this does not seem to be the case.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Sangmesh
PostPosted: Thu May 07, 2009 5:14 am    Post subject: Reply with quote

Newbie

Joined: 06 May 2009
Posts: 2

Hi,
Here is the complete get code. I am moving message ID to correlation ID before get.but it does nothing.I have similar program in Java and C-Sharp ..They do get the message with matching correlation ID.But i dont know may i am doing something wrong in RPG ILE.

C MOVE OCODE CCODE
C MOVEL MDMID MDCID
** first 70 bytes of replies only
C Z-ADD 70 BUFLEN
** 5 minute limit for first reply, reduced for later message
C Z-ADD 60000 GMWI
*
** Start loop to get messages
C CCODE DOWNE CCFAIL
*
C** MOVE MDMID MDCID
C** GET options are Wait and Accept-truncated-message
C GMWT ADD GMATM GMOPT
C ADD MOCORI GMMO


C** clear answer because MQGET only fills to length of message
C MOVEL *BLANKS ANSWER 70
* call ...
C CALLP MQGET(HCONN : HREPLY : MQMD : MQGMO :
C BUFLEN : ANSPTR : MSGLEN : CCODE :
C REASON)
*
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 » MQ Request Reply Program on AS400 using RPG ILE
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.