Author |
Message
|
ajiali |
Posted: Thu Dec 15, 2005 3:24 am Post subject: set MQCHLTAB and MQCHLLIB dynamically |
|
|
Newbie
Joined: 15 Dec 2005 Posts: 9
|
Hi,
How do I set the variables MQCHLTAB and MQCHLLIB from my Powerbuilder Client application ? Are the only possibilities AUTOEXEC and DOS Window ? I want to make this change in effect without restarting/logging off my machine. It is very urgent.
Pls help, Thanks in advance
Aji |
|
Back to top |
|
 |
wschutz |
Posted: Thu Dec 15, 2005 3:29 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Tell us exactly what you are trying to accomplish. Why do you need to change the client channel table you are using?
I don't think you can set those variables from your application and have the same application use the new settings .... _________________ -wayne |
|
Back to top |
|
 |
ajiali |
Posted: Thu Dec 15, 2005 4:03 am Post subject: |
|
|
Newbie
Joined: 15 Dec 2005 Posts: 9
|
I have 3 regions, on selecting a combo box i want to change my channel definition file path dynamically |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Dec 15, 2005 4:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The Windows API has functions for setting the environment in the scope of the current application.
The way to solve your particular problem, however, is to create a single channel table that has all the channels you need in it, as recommended in the documentation.
You should select one queue manager somewhere, and define dummy svrconn and cltconn channels on it, that point to all the qms you need and have the right qmgr info in them.
Then use that AMQCHL.TAB file, and point your one environment variable setting at it. Then your UI can allow people to select the QM name, and they will get the right connection information. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Dec 15, 2005 4:23 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
and define dummy svrconn |
I don't think you need those ....
to expand on Jeff's suggestion... when you define the clntconn's, you can specify the QMNAME in the definition. Then, on your MQCONN call, you pass a queue manager name (from your selection box) and the MQ client will search the channel table for a matching QMNAME and use that channel definition.
Does Powerbuilder support MQCONNX ? _________________ -wayne |
|
Back to top |
|
 |
ajiali |
Posted: Thu Dec 15, 2005 4:46 am Post subject: |
|
|
Newbie
Joined: 15 Dec 2005 Posts: 9
|
I have no permission to change channel definition file, 3 channel files are existing |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Dec 15, 2005 4:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You change the channel def file in the qmgr by defining the channels.
If you cannot copy/move or replace the channel def file because of permissions on your client system you need to talk to your client's system admin group.
Enjoy  |
|
Back to top |
|
 |
ajiali |
Posted: Thu Dec 15, 2005 4:51 am Post subject: |
|
|
Newbie
Joined: 15 Dec 2005 Posts: 9
|
3 channel definition files and I have to code to handle this situation |
|
Back to top |
|
 |
ajiali |
Posted: Thu Dec 15, 2005 4:53 am Post subject: |
|
|
Newbie
Joined: 15 Dec 2005 Posts: 9
|
3 channel definition files are existing and I have to manage this situation |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Dec 15, 2005 4:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
ajiali wrote: |
3 channel definition files are existing and I have to manage this situation |
Please read my answer again. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ajiali |
Posted: Thu Dec 15, 2005 5:02 am Post subject: |
|
|
Newbie
Joined: 15 Dec 2005 Posts: 9
|
Quote: |
I have changed values of MQCHLTAB and MQCHLLIB dynamically and called windows API SendMessageTimeout() for the immediate effect of this change. THis works perfectly, but this reflects in my application only after restarting my application. I am looking to avoid restarting of application |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Dec 15, 2005 5:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you are not doing this within your application, then it won't take effect until you restart your application.
You have to also be somewhat careful with scope when you change the environment. It may be that you are not changing what counts as the global environment for the program, when you make the change.
Also, you should really just merge the three channel tables. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Dec 15, 2005 5:59 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Sorry for my ignorance about Powerbuilder, it's been way too long since I did anything with it.
How are yo calling MQ from PB? .net classes?? You can full specify the connection properties for the client connection without needing any channel tables at all. _________________ -wayne |
|
Back to top |
|
 |
Toronto_MQ |
Posted: Thu Dec 15, 2005 7:05 am Post subject: |
|
|
 Master
Joined: 10 Jul 2002 Posts: 263 Location: read my name
|
Please don't *triple* post.
-Edit-
Quadruple post!! |
|
Back to top |
|
 |
xxx |
Posted: Thu Dec 15, 2005 7:36 am Post subject: |
|
|
Centurion
Joined: 13 Oct 2003 Posts: 137
|
As all the gurus suggested ,
Client channel table should have all the entries that it needs to have, i.e all the CLIENT CONNS to different QMANAGERS it needs to connect ,
So tha application will just pass the Qmanger name and Queue it needs to talk and MQ will work as a charm,
You don't need to set your channels dynamically or stop or start applications
Let's say From NewYork , LA , DC and SFO are there destinations,
the airlines can then have one filght , say NY to LY , then bring that flight back to NY and send to DC and vice versa
or Use there different flights and operate them at the same time, |
|
Back to top |
|
 |
|