Author |
Message
|
kash3338 |
Posted: Mon Jan 30, 2012 10:29 pm Post subject: Get the Server Name in Flow |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
Hi,
Is there a way to get the Host Name where my Broker is installed from within the flow? I DO NOT WANT TO USE JAVA.
Also I would need to get the QueueManager and the Queue name from within the flow, I need the Queue Manager from where the node picks the data and not the Broker Queue Manager. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 30, 2012 11:10 pm Post subject: Re: Get the Server Name in Flow |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kash3338 wrote: |
Hi,
Is there a way to get the Host Name where my Broker is installed from within the flow? I DO NOT WANT TO USE JAVA.
Also I would need to get the QueueManager and the Queue name from within the flow, I need the Queue Manager from where the node picks the data and not the Broker Queue Manager. |
Use ESQL. There are special reserved words to get that information.
Bizarre question: unless you are using JMS nodes that are configured with JNDI, the broker qmgr and the qmgr from where the node picks the data are one and the same!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kash3338 |
Posted: Mon Jan 30, 2012 11:24 pm Post subject: Re: Get the Server Name in Flow |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
[quote="fjb_saper
There are special reserved words to get that information.
[/quote]
What is the Keyword to get the Host Name? I could not find it in doc. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jan 30, 2012 11:33 pm Post subject: Re: Get the Server Name in Flow |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kash3338 wrote: |
fjb_saper wrote: |
There are special reserved words to get that information.
|
What is the Keyword to get the Host Name? I could not find it in doc. |
Hostname is irrelevant. What is more important is the qmgr name. It will determine what the hostname was. Think about what happens when you have multiple brokers on the same hostname?
 _________________ MQ & Broker admin
Last edited by fjb_saper on Fri Feb 03, 2012 7:27 pm; edited 1 time in total |
|
Back to top |
|
 |
adubya |
Posted: Tue Jan 31, 2012 12:30 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
Support pac IA9C will allow you to make system environment variables available to your ESQL nodes, if you have an environment variable representing the hostname then you can access this in ESQL using IA9C.
Not aware of any other way of getting the hostname using native ESQL. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 31, 2012 8:09 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
adubya wrote: |
Support pac IA9C will allow you to make system environment variables available to your ESQL nodes, if you have an environment variable representing the hostname then you can access this in ESQL using IA9C.
Not aware of any other way of getting the hostname using native ESQL. |
System environment variables are already available, without the support pak using JCNs. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
adubya |
Posted: Tue Jan 31, 2012 8:27 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
From the OP
Quote: |
I DO NOT WANT TO USE JAVA. |
However the IA9C node is Java based according to the docs so I guess that's ruled out too! |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 31, 2012 8:39 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
adubya wrote: |
From the OP
Quote: |
I DO NOT WANT TO USE JAVA. |
However the IA9C node is Java based according to the docs so I guess that's ruled out too! |
For what reasons the OP is religiously opposed to Java programming language I do not know, there is nothing wrong with the JAVA language.
The straight-forward answer to the business problem is solved by one line of code in Java. Because the OP is zealously against using the one line of code, I suppose he can write many more lines of code in another language, but that has the potential of increasing the code maintenance costs. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Jan 31, 2012 9:23 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
There is a discussion here Java vs. ESQL, you might continue there.
adubya wrote: |
Not aware of any other way of getting the hostname using native ESQL. |
There are build in variables! Probably the support pack gives you more or enables this on an earlier version.
It is called Broker properties. I used BrokerName in my flow. _________________ Just use REFERENCEs
Last edited by mqsiuser on Tue Jan 31, 2012 11:03 am; edited 2 times in total |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jan 31, 2012 10:53 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
mqsiuser wrote: |
There is a discussion here "Java vs. ESQL", you might continue there. |
I've always enjoyed an agnostic view of software languages, even in my youth. I like to "Co-Exist" in whatever social group I am with. I do not find even a few ethnic policies or dogmas that I cannot adapt to, tolerate, or enjoy for the most part.
What puts an end to my open-mindedness is when I am confronted by prejudical attitudes, where people do not want to accept the most logical answer.
How this translates into WMB code, is not which compute node is better, but which one is best in a certain situation. Use of ESQL in one place in a flow does not preclude the use of Java in a different place. In fact, the two languages and two node types often interact with each other's data as the flow continues.
Why do people have these prejudical thoughts about <insert idea here>? There is something to be said for getting along with your neighbor. No one said you have to wholesale accept their point-of-view, just find some way to be kind and open to new ideas. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Jan 31, 2012 11:12 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
kash3338 wrote: |
Also I would need to get the QueueManager and the Queue name from within the flow, I need the Queue Manager from where the node picks the data and not the Broker Queue Manager. |
You can find the QMGR name, where the message entered your MQ-Environment (e.g. a boundary QMGR) in the MQMD (or RFH2-Header). Probably also the queue-name (I would investigate this with the debugger & a break-point)
lancelotlinc wrote: |
just find some way to be kind and open to new ideas. |
This thing about Java, ESQL (C code), XSLT (XPATH) and WTX and how it behaves in an Integration World is an incredibly interesting topic. There are quite some surprises coming up on projects, which no one expected when putting things in place first. _________________ Just use REFERENCEs |
|
Back to top |
|
 |
adubya |
Posted: Tue Jan 31, 2012 11:21 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
mqsiuser wrote: |
There is a discussion here Java vs. ESQL, you might continue there.
adubya wrote: |
Not aware of any other way of getting the hostname using native ESQL. |
There are build in variables! Probably the support pack gives you more or enables this on an earlier version.
It is called Broker properties. I used BrokerName in my flow. |
Yes, I understand but the machine hostname isn't available in the Broker properties. |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Jan 31, 2012 11:24 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
adubya wrote: |
Yes, I understand but the machine hostname isn't available in the Broker properties. |
ok, use java _________________ Just use REFERENCEs |
|
Back to top |
|
 |
adubya |
Posted: Tue Jan 31, 2012 11:27 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
mqsiuser wrote: |
adubya wrote: |
Yes, I understand but the machine hostname isn't available in the Broker properties. |
ok, use java |
Have you read the thread from the start ?  |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Jan 31, 2012 11:28 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
adubya wrote: |
mqsiuser wrote: |
adubya wrote: |
Yes, I understand but the machine hostname isn't available in the Broker properties. |
ok, use java |
Have you read the thread from the start ?  |
I did. _________________ Just use REFERENCEs |
|
Back to top |
|
 |
|