Author |
Message
|
rmohanr |
Posted: Wed Mar 26, 2003 11:38 am Post subject: MQTMC2 and Need Qname that I am calling |
|
|
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 |
|
 |
jefflowrey |
Posted: Wed Mar 26, 2003 2:09 pm Post subject: |
|
|
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 |
|
 |
rmohanr |
Posted: Wed Mar 26, 2003 2:53 pm Post subject: [Solved]MQTMC2 and Need Qname that I am calling |
|
|
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 |
|
 |
tillywern |
Posted: Thu Mar 27, 2003 8:30 am Post subject: |
|
|
 Centurion
Joined: 28 Jan 2003 Posts: 109 Location: Colorado
|
Check out my response to your post in the General Section |
|
Back to top |
|
 |
rmohanr |
Posted: Thu Mar 27, 2003 1:40 pm Post subject: |
|
|
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 |
|
 |
vennela |
Posted: Thu Mar 27, 2003 4:52 pm Post subject: |
|
|
 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 |
|
 |
|