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 » VBScript and MQSeries client 5.3

Post new topic  Reply to topic
 VBScript and MQSeries client 5.3 « View previous topic :: View next topic » 
Author Message
shogan2003
PostPosted: Wed May 12, 2004 6:16 am    Post subject: VBScript and MQSeries client 5.3 Reply with quote

Centurion

Joined: 03 Jul 2003
Posts: 133
Location: London

Hi

I need to run MQSeries 5.3 client software on a Win2K platform.

I am restricted to VBScript.

I've downloaded the client software; there are .vbp files but I wonder whether there is a CSD I should download with other samples.

Has anyone got this to vbs to work with MQSeries client ?

Thanks in advance

Sean Hogan
_________________
MQSI2 certified specialist
MQSeries certified specialist
Back to top
View user's profile Send private message Send e-mail
JasonE
PostPosted: Wed May 12, 2004 6:57 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

You cant use the vb interface from vbscript, but you can call the activex interface. Code similar to the following

Code:

strQueueMgr = "QM"
qname = "QL"

MQOO_INPUT_AS_Q_DEF = CLNG(1)
 
 set mqsession = CreateObject("mqax200.mqsession")

 set aqm = mqsession.AccessQueueManager(strQueueMgr)

 Set pq = aqm.AccessQueue(qname, 16 or 8192) ' MQOO_OUTPUT or MQ00_FAIL_IF_QUIESCING
 Set pmsg = mqsession.AccessMessage()
                   
 ps = "ABCDEFGHIJKLMNOPQRSTUVWXYZ···ÀÀÀ"
 pmsg.writeString ps
 Set pmo = mqsession.AccessPutMessageOptions()
 pmsg.format = "MQSTR"
 pmsg.CharacterSet = "819"
 pq.Put pmsg, pmo

 set pmsg = Nothing
 set pq = Nothing
 set aqm = Nothing
 set mqsession = Nothing


PS Always use the latest fixpacks if possible, anyway. They dont contain more samples (well, they do add .net support and samples, but not new ones for existing languages)
Back to top
View user's profile Send private message
shogan2003
PostPosted: Wed May 12, 2004 7:22 am    Post subject: Reply with quote

Centurion

Joined: 03 Jul 2003
Posts: 133
Location: London

Thanks for the reply. Is the sample you gave something I could embed in a .vbs script file ?
_________________
MQSI2 certified specialist
MQSeries certified specialist
Back to top
View user's profile Send private message Send e-mail
JasonE
PostPosted: Wed May 12, 2004 7:46 am    Post subject: Reply with quote

Grand Master

Joined: 03 Nov 2003
Posts: 1220
Location: Hursley

That is my (only) .vbs file, but to be fair I normally launch it with cscript rather than via an asp or something like that so I cant really answer, sorry!

BTW to run it with client bindings you need mqserver or the mqchl* env vars for a client channel table.
Back to top
View user's profile Send private message
shogan2003
PostPosted: Wed May 12, 2004 7:49 am    Post subject: Reply with quote

Centurion

Joined: 03 Jul 2003
Posts: 133
Location: London

Jason,

Thanks. I'll give it a go
_________________
MQSI2 certified specialist
MQSeries certified specialist
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » VBScript and MQSeries client 5.3
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.