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 » Trigger Monitor W/VB 6.0

Post new topic  Reply to topic
 Trigger Monitor W/VB 6.0 « View previous topic :: View next topic » 
Author Message
scrotia
PostPosted: Mon Jun 23, 2003 8:16 pm    Post subject: Trigger Monitor W/VB 6.0 Reply with quote

Newbie

Joined: 23 Jun 2003
Posts: 2

Hello all:

I'm working on an MQ app (in VB 6.0...as requested). I have a COM+ object that deals with the meat of the work.

The trigger monitor should pass the MQTMC2 data to the COM+ object; which will then use this info to connect to the triggered queue, and do further processing.

I need only to create the trigger monitor to complete the project.

Question. Has anyone have any sample code in VB for an ActiveExe trigger monitor? I see how it works in C++, however VB does not have the luxury of the int Main(args)....

Any help or advice is appreciated.
_________________
Thanks~
Back to top
View user's profile Send private message Send e-mail AIM Address
psanders
PostPosted: Tue Jun 24, 2003 10:39 am    Post subject: Reply with quote

Apprentice

Joined: 02 Apr 2002
Posts: 27

VB provides a function called Command that provides access to command line arguments. It's not great but it works.
Back to top
View user's profile Send private message
scrotia
PostPosted: Wed Jun 25, 2003 11:52 am    Post subject: Reply with quote

Newbie

Joined: 23 Jun 2003
Posts: 2

Thanks....I did end up using the Command$ function as a last resort.

If any one is interedted here is the code:

<snip>
Public Sub Main()


Dim QueueManager As String
Dim QueueName As String

' this is the COM+ app the does the work...
Dim MQControlApp As New MQBroker.MQControlApp

QueueManager = Trim(Mid(Command$, 686, 48))
QueueName = Trim(Mid(Command$, 10, 48))

'Pass the params to the COM+ dll to handle messages....
MQControlApp.GetQueueName QueueManager, QueueName


' Debugging code
' Open App.Path & "/Debug.txt" For Output As #2
' Print #2, "StrucId:" & Trim(Mid(Command$, 2, 4))
' Print #2, "Version:" & Trim(Mid(Command$, 6, 4))
' Print #2, "QName:" & Trim(Mid(Command$, 10, 48))
' Print #2, "ProcessName:" & Trim(Mid(Command$, 58, 48))
' Print #2, "TriggerData:" & Trim(Mid(Command$, 106, 64))
' Print #2, "ApplType:" & Trim(Mid(Command$, 170, 4))
' Print #2, "ApplId:" & Trim(Mid(Command$, 174, 256))
' Print #2, "EnvData:" & Trim(Mid(Command$, 430, 128))
' Print #2, "UserData:" & Trim(Mid(Command$, 558, 128))
' Print #2, "QMgrName:" & Trim(Mid(Command$, 686, 48))
' Close #2


End Sub

</snip>
_________________
Thanks~
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Trigger Monitor W/VB 6.0
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.