Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Connecting to a MQ Series queue via VBA (Excel Spreadsheet)

Posted on 2004-10-01
3
Medium Priority
?
3,175 Views
Last Modified: 2016-09-25
Anyone have any examples of this being done....it's a shot in the dark but why not.
0
Comment
Question by:greedy1
3 Comments
 
LVL 3

Accepted Solution

by:
KeithWatson earned 400 total points
ID: 12213236
Why not indeed...

You will need to reference the MQAX200.dll in Tools->References

This code assumes the queue manager lives on the same machine, or you have the MQ Client software with appropriate configuration. If not, you'll need to set IP number/port and channel information.

Dim Session As MQSession
Dim QueueManager As MQQueueManager
Dim Queue As MQQueue

Set Session = New MQSession
Set QueueManager = New MQQueueManager

QueueManager.Name="QueueManagerName"
QueueManager.Connect

Set Queue = QueueManager.AccessQueue(“QueueName”, MQOO_OUTPUT)


There is more detail provided in the IBM redbook at:

http://www.redbooks.ibm.com/redbooks/pdfs/sg246506.pdf

Hope that helps,

Keith.
0
 

Author Comment

by:greedy1
ID: 12217421
Awesome...I even made it to the redbook, but didn't clue in on the Active X part, haven't tried it yet but it should be ok.  thanks again.
0
 

Expert Comment

by:Chirag Shrimali
ID: 41814417
Guyz, thanks for the sample code, can you highlight how to use the above code if mq in installed on different. Have browsed net for few days, however unable to make out how to define channel, host and port definations. Any help will be appriciated
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question