Author |
Message
|
marksinnott |
Posted: Mon Oct 06, 2003 11:12 am Post subject: Basic MQ Question and VB |
|
|
Novice
Joined: 06 Oct 2003 Posts: 21
|
Hi Id be grateful if someone could help
We have installed mq on NT server XXXXXXX WITH A QUEUE MANAGER NAMED MTMQMQMQ AND A PAIR OF Q'S
aaaa.bbb.apps
aaaa.bbb.apps.REPLY
I THEN USE THE FOLLOWING VB CODE TO PUT A MESSAGE ON Q
Set MQSess = CreateObject("MQAX200.MQSession")
Set QMgr = MQSess.AccessQueueManager("MTMQMQMQ")
Set Queue = QMgr.AccessQueue("aaaa.bbb.apps", _
MQOO_OUTPUT)
Set PutMsg = MQSess.AccessMessage()
PutMsgStr = "MAD WORLD"
PutMsg.MessageData = PutMsgStr
Set PutOptions = MQSess.AccessPutMessageOptions()
Queue.Put PutMsg, PutOptions
BUT I GET AN ERROR 2058 ON THE
Set QMgr = MQSess.AccessQueueManager("MTMQMQMQ")
Am I doing something silly ?
How does MQ know where to look for the MQ server ??
Is there an additional step i need ???
If anyone has any help or samples it would be great
If there a place / resource where i can get some sample code for putting messages on a quue with a correlation id and wait for response ?
Thanks in advance |
|
Back to top |
|
 |
mrlinux |
Posted: Mon Oct 06, 2003 12:10 pm Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Couple of questions
1) is the code on same box as the SERVER ???
2) Check the case of the queue manager name both have to match _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
marksinnott |
Posted: Mon Oct 06, 2003 12:25 pm Post subject: |
|
|
Novice
Joined: 06 Oct 2003 Posts: 21
|
Hi
THANK YOU FOR YOUR PROMPT RESPONSE
The MQ Server is a completely different box. If I look at the event log on my client i get the message
EVENT Log Meaage
Type of remote channel not suitable for action requested.
The operation requested cannot be performed because channel 'MQTH.MTW2BR01' on the remote machine is not of a suitable type. For example, if the local channel is defined as a sender the remote machine must define its channel as either a receiver or requester.
Check that the channel name is specified correctly. If it is, check that the remote channel has been defined correctly.
ALSEO IN YOUR POST YOU MENTION SOME AREAS FOR LOOKING AT
aRE THESE URLS ??? |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Oct 06, 2003 12:30 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What is the value of your MQServer environment variable on the machine running the code? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ping master |
Posted: Tue Oct 07, 2003 1:40 pm Post subject: |
|
|
 Centurion
Joined: 20 Sep 2002 Posts: 116 Location: USA
|
if it is a remote queue, I believe you have to set everything up(ENV) and make your transmission queue same as the remote queue. Im trying to learn this too, where is there an example. Im assuming thats all you would need to get your code above working, any vb gurus out there? |
|
Back to top |
|
 |
|