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 » MQTMC2 and Need Qname that I am calling

Post new topic  Reply to topic
 MQTMC2 and Need Qname that I am calling « View previous topic :: View next topic » 
Author Message
rmohanr
PostPosted: Wed Mar 26, 2003 11:38 am    Post subject: MQTMC2 and Need Qname that I am calling Reply with quote

Novice

Joined: 02 Jan 2002
Posts: 12

Hello,
I am writing an application (sample.exe) to get xml message from the ques and convert it to plain text string to be picked by another program.
We have three ques and I am using VB. Sample.exe will be triggered by each que.

How can I find out from which que my program was triggered. I am looking for some example in VB. Can some one please let me know how to do this with MQTMC2?

I don't know how to use MQTMC2 in VB. How to decalre and how to get the structure filled in with right values.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Mar 26, 2003 2:09 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The MQTMC2 structure is passed to your program as a flattened string in the command line arguments.

The Application Programming guide says this, in the section on Trigger Monitors:
Quote:
The command string passed by the trigger monitor to the operating system is built as follows:

The ApplId from the relevant PROCESS definition (if created)
The MQTMC2 structure, enclosed in quotation marks
The EnvData from the relevant PROCESS definition (if created)
where ApplId is the name of the program to run - as it would be entered on the command line.

The parameter passed is the MQTMC2 character structure. A command string is invoked which has this string, exactly as provided, in 'quotation marks', in order that the system command will accept it as one parameter.


So if you are using the provided trigger monitor (haven't written your own), then you will get the MQTMC2 by taking the indicated command line parameter, and treating it as an MQTMC2 structure. How you do this from VB, I don't know.
Back to top
View user's profile Send private message
rmohanr
PostPosted: Wed Mar 26, 2003 2:53 pm    Post subject: [Solved]MQTMC2 and Need Qname that I am calling Reply with quote

Novice

Joined: 02 Jan 2002
Posts: 12

Thanks Jeff ! I owe you a six pack. I read the manual part even before I post question to this forum. But I didn't understand properly.

Your first sentence
"The MQTMC2 structure is passed to your program as a flattened string in the command line arguments."
and last sentence
" you will get the MQTMC2 by taking the indicated command line parameter" Ring my bells.

There is a reserved word "command" will give you the command line parameterd passed to your program. I got this and Thanks

JeffLowrey wrote:
The MQTMC2 structure is passed to your program as a flattened string in the command line arguments.

The Application Programming guide says this, in the section on Trigger Monitors:
Quote:
The command string passed by the trigger monitor to the operating system is built as follows:

The ApplId from the relevant PROCESS definition (if created)
The MQTMC2 structure, enclosed in quotation marks
The EnvData from the relevant PROCESS definition (if created)
where ApplId is the name of the program to run - as it would be entered on the command line.

The parameter passed is the MQTMC2 character structure. A command string is invoked which has this string, exactly as provided, in 'quotation marks', in order that the system command will accept it as one parameter.


So if you are using the provided trigger monitor (haven't written your own), then you will get the MQTMC2 by taking the indicated command line parameter, and treating it as an MQTMC2 structure. How you do this from VB, I don't know.
Back to top
View user's profile Send private message
tillywern
PostPosted: Thu Mar 27, 2003 8:30 am    Post subject: Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

Check out my response to your post in the General Section
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
rmohanr
PostPosted: Thu Mar 27, 2003 1:40 pm    Post subject: Reply with quote

Novice

Joined: 02 Jan 2002
Posts: 12

See my reply in General section with example code that I used. Thanks for all your help

tillywern wrote:
Check out my response to your post in the General Section
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Mar 27, 2003 4:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

mohan:

By this time you would have observed that you would get a reply if you post it in any of the forums in this site. Please abstain from posting it in multiple forums. It will make it easier for people like me who are following your question-answer dialogue closely. I am also interested in knowing how you achieve what you are trying to.

Please continue the post in the other dialogue.

Thanks
-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQTMC2 and Need Qname that I am calling
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.