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 » General Discussion » I am a newbie, please help .. thanks

Post new topic  Reply to topic
 I am a newbie, please help .. thanks « View previous topic :: View next topic » 
Author Message
matthewho007
PostPosted: Tue Jan 04, 2005 12:28 am    Post subject: I am a newbie, please help .. thanks Reply with quote

Newbie

Joined: 04 Jan 2005
Posts: 1

2 queues used. One queue is a request queue while another is response queue.
THe server process get the request from the request queue and put back the response into the response queue.
I need to write a client part to send a request into the request queue and get back the response from the response queue. However, I can send the request and the server process put back the response into the response queue (the server process put back the message ID which extracted from the request messge into the response message). However, my program can't get back the correct one. Please help. Thanks......


The code is as below:

Const MQGMO_SYNCPOINT = &H2
Const MQPMO_SYNCPOINT = &H2
Const MQPMO_NEW_CORREL_ID = &H80
Const MQGMO_NONE = &H0
Const MQMO_MATCH_MSG_ID = &H1
Const MQMO_MATCH_CORREL_ID = &H2
Const MQMO_MATCH_GROUP_ID = &H4
Const MQMO_MATCH_MSG_SEQ_NUMBER = &H8
Const MQMO_MATCH_OFFSET = &H10
Const MQMO_MATCH_MSG_TOKEN = &H20
Const MQMO_NONE = &H0
Const MQOO_OUTPUT = &H10
Const MQOO_INQUIRE = &H20
Const MQOO_INPUT_AS_Q_DEF = &H1

Dim MQSess, QMgr, getQueue, putQueue, putMsg, pmo, gmo, gmsg, gs

MQSess = CreateObject("MQAX200.MQSession")
QMgr = MQSess.AccessQueueManager("QM_icbc125")

putQueue = QMgr.AccessQueue("Matthew_Queue1", MQOO_INQUIRE Or MQOO_OUTPUT) '16=MQOO_OUPTUT

putMsg = MQSess.AccessMessage()
putMsg.Format = "MQSTR "
putMsg.ReplyToQueueName = "Matthew_Queue2"
putMsg.ReplyToQueueManagerName = "QM_icbc125"
putMsg.WriteString("Hello ASP world 111222!")

pmo = MQSess.accessPutMessageOptions()
'pmo.MatchOptions = MQMO_MATCH_MSG_ID
'pmo.Options = MQPMO_SYNCPOINT
putQueue.put(putMsg, pmo)
'putQueue.MatchOptions = MQMO_MATCH_MSG_ID + MQMO_MATCH_CORREL_ID

getQueue = QMgr.AccessQueue(putMsg.ReplyToQueueName, MQOO_INQUIRE Or MQOO_INPUT_AS_Q_DEF, _
putMsg.ReplyToQueueManagerName)

gmo = MQSess.AccessGetMessageOptions()
gmo.WaitInterval = 1000

gmsg = MQSess.AccessMessage()
gmsg.MessageId = putMsg.CorrelationId

getQueue.Get(gmsg, gmo)
Dim len
len = gmsg.MessageLength

Response.Write(gmsg.readstring(len))
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Jan 04, 2005 6:07 am    Post subject: Reply with quote

Jedi Knight

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

Go take a look at:

http://www.developer.ibm.com/tech/sampmq.html

There are some programs that do what you are looking for. The names are something like mqreq* and mqsrv*.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » I am a newbie, please help .. thanks
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.