' create the first object to access MQAX code
Set MqS = CreateObject("MQAX200.MqSession")
' access the default queue manager
Set qm = MqS.AccessQueueManager(QMgr)
' access a standard queue that should be there, for output and input
set q = qm.AccessQueue(QName, 16 or 1 ) ' 16 - Output, 1 - Input
sub put_data (inst)
' create a new message object
Set pmsg = MqS.AccessMessage()
' prepare data and write it into the message
ps = inst
pmsg.WriteString ps
' set Put Message Options
Set PMO = MqS.AccessPutMessageOptions()
PMO.Options = PMO.Options + MQPMO_NO_SYNCPOINT
' now put the message onto the MQSeries queue
q.Put pmsg, PMO
end sub
function get_data
on error resume next
dim outmsg
outmsg = ""
'Loop through the queue until there are no messages left.
do
Set GMO = MqS.AccessGetMessageOptions()
GMO.Options = GMO.Options + MQGMO_NO_SYNCPOINT
Set gmsg = MqS.AccessMessage()
'If we know the messageid we can use this feature.
'gmsg.MessageId = pmsg.MessageId
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.