<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>a Hursley view on WebSphere MQ</title>
	<atom:link href="http://hursleyonwmq.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hursleyonwmq.wordpress.com</link>
	<description>A place to talk with people who work on WebSphere MQ</description>
	<pubDate>Thu, 17 Jul 2008 10:04:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>We&#8217;re moving!</title>
		<link>http://hursleyonwmq.wordpress.com/2008/02/18/were-moving/</link>
		<comments>http://hursleyonwmq.wordpress.com/2008/02/18/were-moving/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 12:45:24 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/?p=126</guid>
		<description><![CDATA[We&#8217;re moving to join the developerWorks hosted blog on messaging - so please update your bookmarks and feed-readers to point to:
http://www.ibm.com/developerworks/blogs/page/messaging/
The new blog covers more than just WebSphere MQ, so if you also work with products  such as WebSphere Message Broker, you should find even more to interest you. If it&#8217;s just WMQ you [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We&#8217;re moving to join the developerWorks hosted blog on messaging - so please update your bookmarks and feed-readers to point to:</p>
<p><a href="http://www.ibm.com/developerworks/blogs/page/messaging/">http://www.ibm.com/developerworks/blogs/page/messaging/</a></p>
<p>The new blog covers more than just WebSphere MQ, so if you also work with products  such as WebSphere Message Broker, you should find even more to interest you. If it&#8217;s just WMQ you want, there is a <a href="http://www.ibm.com/developerworks/blogs/rss/messaging?catname=/WebSphere%20MQ">WMQ-only feed</a>.</p>
<p>We will leave these posts up for as long as possible, as a resource for people who find this site via Google, but we won&#8217;t be adding any new posts here.</p>
<p>Thanks to everyone who has read and commented on our posts here, and we hope you enjoy the developerWorks blog.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/126/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/126/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/126/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/126/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/126/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=126&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2008/02/18/were-moving/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Using PowerShell with remote queue managers</title>
		<link>http://hursleyonwmq.wordpress.com/2008/01/16/using-powershell-with-remote-queue-managers/</link>
		<comments>http://hursleyonwmq.wordpress.com/2008/01/16/using-powershell-with-remote-queue-managers/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 14:58:57 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[powershell]]></category>

		<category><![CDATA[supportpac]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2008/01/16/using-powershell-with-remote-queue-managers/</guid>
		<description><![CDATA[I wanted to announce the release of the most requested feature for the PowerShell library for WebSphere MQ SupportPac : support for administering remote queue managers. 
I&#8217;ve already covered my work on PowerShell for WebSphere MQ at some length on this blog, so I won&#8217;t duplicate that here. (If you are interested in a recap, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I wanted to announce the release of the most requested feature for the <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">PowerShell library for WebSphere MQ</a> SupportPac : support for <strong>administering remote queue managers</strong>. </p>
<p>I&#8217;ve already covered my work on PowerShell for WebSphere MQ at some length on this blog, so I won&#8217;t duplicate that here. (<em>If you are interested in a recap, <a href="http://www.phpbber.com/phpbb/viewtopic.php?t=6&amp;mforum=powershellforwe">this is a good place to start</a></em>). </p>
<p><img align="left" vspace="10" hspace="10" src='http://hursleyonwmq.files.wordpress.com/2008/01/080115-laptop.jpg' alt='Using PowerShell with remote queue managers' />With this <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">latest release</a>, you can now manage queue managers across multiple servers from a single PowerShell window on your local workstation. </p>
<p>You can now write commands which query and/or modify your queues, channels, etc. across multiple queue managers spanning multiple servers on multiple operating systems. All in a single command or line of script.</p>
<p>It currently works with queue managers running on <a target="_blank" href="http://www-306.ibm.com/software/integration/wmq/requirements/index.html">supported</a> <strong>Windows and UNIX-based operating systems</strong>. (It is not currently possible to administer z/OS queue managers with this, however work on this has begun and should be added in a future release).</p>
<p>Ideas for what can be done with this <a href="http://www.phpbber.com/phpbb/viewforum.php?f=3&amp;mforum=powershellforwe">are welcomed</a> - I&#8217;ve put a couple of examples after the break. </p>
<p><span id="more-123"></span></p>
<p><strong>Example 1: Check all of your queues on all queue managers across multiple servers for any that are full</strong></p>
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; $allqmgrs = Get-WMQQueueManager -Connections $myremoteconns
PS C:\&gt; Get-WMQQueue -Qmgr $allqmgrs | Where { $_.CurrentDepth -eq $_.MaximumDepth } | Select Name, @{e={$_.QueueManager.Name};n='Queue Manager'}, @{e={$_.QueueManager.Hostname};n='Server'}</pre>
<p>which will draw a table containing a list of any queues which are full, showing their name, and the name of their queue manager and the hostname of the server it is on.</p>
<p>.<br />
<strong>Example 2: Change the SSL Cipher Specification setting for all channels currently using NULL_MD5 to TRIPLE_DES_SHA_US on all remote queue managers</strong></p>
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; $allqmgrs = Get-WMQQueueManager -Connections $myremoteconns
PS C:\&gt; Get-WMQChannel -Qmgr $allqmgrs | Where { $_.SSLCipherSpec -eq "NULL_MD5" } | Set-WMQChannel -SSLCipherSpec "TRIPLE_DES_SHA_US"</pre>
<p>More examples can be found in the PowerShell &#8216;Cookbook&#8217; document that is contained in the <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">SupportPac download zip</a>. </p>
<p>Finally, note that there is no need for PowerShell or any other custom code to be installed on the remote servers. The WebSphere MQ PowerShell library uses a client connection to communicate to remote queue manager using PCF. As a result, the setup required on the queue managers is the same as for other administration tools such as WebSphere MQ Explorer (<em>requiring a valid server connection channel and active channel listener</a></em>). </p>
<p>As always, feedback on this is very welcome - either here or in the <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">SupportPac forum</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/123/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/123/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=123&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2008/01/16/using-powershell-with-remote-queue-managers/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>

		<media:content url="http://hursleyonwmq.files.wordpress.com/2008/01/080115-laptop.jpg" medium="image">
			<media:title type="html">Using PowerShell with remote queue managers</media:title>
		</media:content>
	</item>
		<item>
		<title>Diagnosing problems with Data Conversion</title>
		<link>http://hursleyonwmq.wordpress.com/2007/12/18/diagnosing-problems-with-data-conversion/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/12/18/diagnosing-problems-with-data-conversion/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 22:45:50 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[ccsid]]></category>

		<category><![CDATA[conversion]]></category>

		<category><![CDATA[data conversion]]></category>

		<category><![CDATA[encoding]]></category>

		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/12/18/diagnosing-problems-with-data-conversion/</guid>
		<description><![CDATA[A few weeks ago, Saket posted a link to a very readable document on Data Conversion under WebSphere MQ.
The post has seemed very popular, so I thought I might be helpful to follow it up with some thoughts on diagnosing problems when using data conversion. 
The document Saket pointed at is pretty much the definitive [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A <a href="http://hursleyonwmq.wordpress.com/2007/10/31/websphere-mq-and-ccsids-encoding-and-data-conversion/">few weeks ago</a>, <a href="http://hursleyonwmq.wordpress.com/author/srungta/">Saket</a> posted a link to a very readable document on <a target="_blank" href="http://www-1.ibm.com/support/docview.wss?uid=swg27005729">Data Conversion under WebSphere MQ</a>.</p>
<p>The post has seemed very popular, so I thought I might be helpful to follow it up with some thoughts on diagnosing problems when using data conversion. </p>
<p>The document Saket pointed at is pretty much the definitive reference document, but in this post I will try and add some general observations, and describe a simple technique for diagnosing data conversion problems if things go wrong. </p>
<p><span id="more-122"></span>The most common cause of problems relating to data conversion is that messages do not have the expected CCSID values. To start with, let&#8217;s recap the two main ways to set message CCSIDs:</p>
<p><strong>Applications setting the CCSID</strong> </p>
<p>When putting a message, the &#8220;putting&#8221; application can set the CCSID field in the message descriptor. </p>
<p>The &#8220;getting&#8221; application can set the same CCSID field in the message descriptor when it gets the message. </p>
<p>Note that WebSphere MQ returns the actual CCSID of the message when MQGET returns. Often, this is the CCSID in the MQGET request. However, in the result of a conversion error, MQGET returns an unconverted message, with the CCSID field of the original message in the message descriptor. </p>
<p><em>A common error in WMQ application programs is to not set a requested CCSID in the message descriptor before every MQGET, resulting in the unexpected use of a different CCSID overwritten by a previous failed MQGET.</em> </p>
<p><strong>Using queue manager defaults</strong> </p>
<p>When putting a message, the &#8220;putting&#8221; application can set the CCSID field in the message descriptor to <code>MQCCSI_Q_MGR</code>. This means the queue manager&#8217;s character set should be used - &#8220;<a target="_blank" href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js01148.htm">the queue manager changes this value in the message descriptor to the true character-set identifier of the queue manager</a>&#8220;.  </p>
<p>The &#8220;getting&#8221; application can set the CCSID field in the message descriptor to <code>MQCCSI_Q_MGR</code>. MQGET will return the converted message together with the CCSID used.</p>
<p>This approach is simple, and useful when you are transferring messages in one language and one CCSID. </p>
<p>But what about <strong>transferring messages using multiple languages and CCSIDS</strong>?</p>
<p>The <a href="http://www-1.ibm.com/support/docview.wss?uid=swg27005729&amp;aid=1" target="_blank">Data Conversion</a> document referred to above describes some approaches, and is a good place to start. </p>
<p>In general, a good plan is to convert data into Unicode as soon as possible - allowing you to do the bulk of your work in a &#8220;language neutral&#8221; way. </p>
<p>In situations where this is not an option, a good way to process mixed language CCSIDs is to use separate queue managers, or at least separate queues, per language. In this way, you can predetermine the CCSID to use. </p>
<p>An alternative approach is to use BROWSE to get each message first, with the expectation that it will fail due to a conversion error. This means that the message will not be removed from the queue, allowing a second MQGET to be safely carried out with the correct CCSID value - obtained from the message descriptor returned by the failed browse. </p>
<p>Similar to an earlier post of mine on <a href="http://hursleyonwmq.wordpress.com/2007/02/21/handling-truncated-messages/">handling truncated messages</a>, care needs to be taken to ensure that the second MQGET gets the same message that is got by the initial BROWSE using MQGMO_BROWSE_MSG_UNDER_CURSOR, and MQGMO_LOCK to prevent another application from removing the message inbetween MQI calls.</p>
<p><strong>Debugging data conversion problems</strong></p>
<p>Any such approach is inevitably complex, and customers wanting to mix languages in a WMQ system need to carefully review their overall system design. </p>
<p>In the event that this results in unexplained data conversion errors, the following is one way to debug the problem.</p>
<ul>
<li>Stop the sending channel.</li>
<li>Modify the &#8220;putting&#8221; application to dump the CCSID in the message descriptor together with some of the message - ideally in hexadecimal.</li>
<li>Run the &#8220;putting&#8221; application so that it sends a message which causes a conversion problem. (The stopped channel means that the message will end up on the transmission queue.) Store the dumped CCSID and message contents from the application.</li>
<li>Browse the transmission queue (with data conversion disabled) so that you can view the contents. Store the CCSID and the message contents there. </li>
<li>Compare the dump from the application with the contents of the transmission queue. </li>
<li>Disable the &#8220;getting&#8221; application, then start the sending channel so that the message is taken from the transmission queue.</li>
<li>Browse the destination queue (with data conversion disabled) so that you can view the contents. Store the CCSID and message contents there. </li>
<li>Compare the contents of the destination queue with the previous output</li>
<li>If the CCSID has changed, this will be because the channel has data conversion enabled. This is a common source of problems - it always converts to the receiving queue mangers CCSID which is not always the intended behaviour. It is often more straightforward to perform conversion by the MQGET issued by the &#8220;getting&#8221; application - rather than altering messages before they reach the destination queue. </li>
<li>Modify the &#8220;getting&#8221; application to dump the CCSID it sets in the message descriptor before the MQGET call, the CCSID in the message descriptor returned by the MQGET call, and some of the message returned - ideally in hexadecimal. </li>
<li>Compare the output with previous output.</li>
</ul>
<p>Following these steps is often enough to identify the point at which the problem occurs. </p>
<p>This can either uncover a problem in your configuration, or provide useful information if you need to seek further assistance from WMQ Service.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/122/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/122/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=122&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/12/18/diagnosing-problems-with-data-conversion/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Looking for problems with your WebSphere MQ objects using the PowerShell &#8216;next-gen’ command-line</title>
		<link>http://hursleyonwmq.wordpress.com/2007/12/14/looking-for-problems-with-your-websphere-mq-objects-using-the-powershell-%e2%80%98next-gen%e2%80%99-command-line/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/12/14/looking-for-problems-with-your-websphere-mq-objects-using-the-powershell-%e2%80%98next-gen%e2%80%99-command-line/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 01:43:38 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/12/14/looking-for-problems-with-your-websphere-mq-objects-using-the-powershell-%e2%80%98next-gen%e2%80%99-command-line/</guid>
		<description><![CDATA[Last part of a series of posts on working with IBM WebSphere MQ from Windows PowerShell
Over my last four posts, I&#8217;ve given an introduction to how to use Windows PowerShell to administer WebSphere MQ, using SupportPac MO74.
For my final post in this series, I want to look at some more advanced uses of PowerShell, focusing [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;border:thin silver solid;background:#eeeeee;padding:1em;">Last part of a series of posts on working with IBM WebSphere MQ from Windows PowerShell</p>
<p>Over <a href="http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/">my</a> <a href="http://hursleyonwmq.wordpress.com/2007/12/11/creating-websphere-mq-objects-in-the-powershell-next-gen-command-line/">last</a> <a href="http://hursleyonwmq.wordpress.com/2007/12/12/finding-your-websphere-mq-objects-with-the-powershell-next-gen-command-line/">four</a> <a href="http://hursleyonwmq.wordpress.com/2007/12/13/modifying-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/">posts</a>, I&#8217;ve given an introduction to how to use Windows PowerShell to administer WebSphere MQ, using <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">SupportPac MO74</a>.</p>
<p>For my final post in this series, I want to look at some more advanced uses of PowerShell, focusing on things that cannot be done easily with runmqsc or WebSphere MQ Explorer.</p>
<p>The last four posts have covered the cmdlet basics : <code>New-WMQ</code>, <code>Get-WMQ</code> and <code>Set-WMQ</code>. Where things get interesting is in combining them through the use of the object pipeline.</p>
<p><span id="more-121"></span>Let&#8217;s start with some imaginary scenarios for a WMQ sys-admin. Simplistic, but they should suffice for purposes of demonstration.</p>
<hr />
<p><strong>&#8220;Some of the queues used by the sales team are getting a bit full. Can you increase the amount of space in them?&#8221;</strong></p>
<p>To clarify:<br />
&#8220;<u>by the sales team</u>&#8221; means queues with names beginning with &#8220;SALES.&#8221;<br />
&#8220;<u>a bit full</u>&#8221; means queues that are ten messages away from their maximum message depth<br />
&#8220;<u>increase</u>&#8221; means double the existing maximum message depth</p>
<p>With some use of the pipeline, we can do this in a single line which will check all queue managers on our system.</p>
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; Get-WMQQueue | Where {$_.QueueType -eq "Local" -and $_.CurrentDepth -gt ($_.MaximumDepth - 10)}
| foreach {Set-WMQQueue $_ -MaximumDepth ($_.MaximumDepth * 2)}</pre>
<p>The command gets all queues, then filters them so only queues with a current depth greater than ten less than their maximum depth go into the pipeline. Each of the objects in the pipeline is then passed to a <code>Set-WMQQueue</code> command to modify the maximum depth property - using the current maximum depth property to start with. </p>
<p>This means that each <code>Set-WMQQueue</code> command can be setting the max depth of each queue to a different value. The <code>ForEach</code> cmdlet allows for more sophisticated modifications than a static command like
<pre style="font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">Set-WMQQueue -MaximumDepth 100</pre>
<hr />
<p><strong>&#8220;We&#8217;re starting to see errors with the channels on a queue manager. What has changed with them since last week, when they were working fine?</strong></p>
<p>When you reach a known good point, you can save object definitions to CSV file:
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; Get-WMQChannel -QmgrName MyQm | Export-Csv mychans.csv</pre>
<p>Then, at a later date when you need to see what has changed:
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; Compare-Object (Import-Csv mychans.csv) (Get-WMQChannel -QmgrName MyQm) -Property Name, ChannelType, ConnectionName, TransmissionQueueName, ...
</pre>
<p>This command is explicitly specifying the attributes to consider when making a comparison. It might be easier to use <code>Get-Member -MemberType Properties</code> to get all of them more easily.</p>
<hr />
<p><strong>&#8220;I need to verify my SSL configuration.&#8221;</strong></p>
<p>To start with, why not check that your SSL key repository files are in the right place?
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; Get-WMQQueueManager | Select Name, @{e={ ( $_.SSLKeyRepository + ".kdb") | Test-Path };n='Key repository present'}, @{e={ ( $_.SSLKeyRepository + ".kdb" ) | Test-Path };n='Stash file present'}

Name                           Key repository present        Stash file present
----                           ----------------------        ------------------
NEW                    ...                      False                     False
qmgr1fish              ...                       True                      True
TESTQM                 ...                      False                     False
TESTQM2                ...                       True                      True

PS C:\&gt;</pre>
<hr />
<p><strong>&#8220;We need to check our transmission queues.&#8221;</strong></p>
<p>We can check that all of our channels have transmission queue name properties which refer to an actual local queue, which has Usage set to &#8216;Transmission Queue&#8217;, and is put enabled.
<pre style="width:125%;overflow:scroll;font-size:1.2em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">PS C:\&gt; Get-WMQChannel -QmgrName qmgr1test | Where {$_.Name -notlike "SYSTEM.*" } | Select Name, TransmissionQueueName, @{e={ (Get-WMQQueue -qmgrname qmgr1test -Name ($_.TransmissionQueueName) | Where {$_.Usage -eq "Transmission" -and $_.InhibitPut -eq "Allowed"}) -ne $null }; n='Valid transmission queue'}

Name                    TransmissionQueueName         Valid transmission queue
----                    ---------------------         ------------------------
broken                  nonexistent                                      False
qmgr1test.qmgr2test     xmit_queue                                        True

PS C:\&gt;</pre>
<hr />
<p><strong>A command-line &#8216;Healthcheck&#8217;?</strong></p>
<p>It should be possible to write such PowerShell commands that implement all of the functions in the WebSphere MQ Explorer &#8216;Tests&#8217; plugin (introduced in <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg27008496">v6.0.2.0</a>). </p>
<p>These could be grouped together and saved into functions - making it easier to run them repeatedly as needed. The functions could include comparing the output with the output from previous known-good runs and/or emailing it to a sys-admin. The execution of these could even be scheduled to run regularly.</p>
<p>Over time, it should be possible to build up a toolbox of scripts that can thoroughly but quickly check all of your queue managers.</p>
<p><strong>What&#8217;s next?</strong></p>
<p>The aim of this series of posts was to demonstrate the benefits of using PowerShell over traditional runmqsc scripting. </p>
<p>For more examples, there is a &#8220;Cookbook for &#8216;PowerShell for WebSphere MQ&#8217;&#8221; - which contains dozens of worked examples for using PowerShell with your queue managers. <a href="http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&amp;li_formnum=L-SBRY-79KGEK&amp;accepted_url=ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/mo74.zip">Download the MO74 zip file</a> and you will find the powershellcookbook.pdf included. </p>
<p>I hope that readers will be able to take this further and think of more ways to use PowerShell - I&#8217;ve set up <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">a forum where more command examples can be shared</a>. As I think of more examples (or try porting more tests from the WMQ Explorer &#8216;Tests&#8217; plugin), I will <a href="http://www.phpbber.com/phpbb/viewforum.php?f=3&amp;mforum=powershellforwe">post them there</a>.</p>
<p><strong>What do you think?</strong></p>
<p>What do you think about this? <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">Feedback on the SupportPac</a> or the potential of PowerShell administration for WebSphere MQ, is very welcome. If you have any questions, I&#8217;d also be happy to try and answer them.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/121/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/121/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/121/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/121/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/121/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=121&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/12/14/looking-for-problems-with-your-websphere-mq-objects-using-the-powershell-%e2%80%98next-gen%e2%80%99-command-line/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Modifying your WebSphere MQ objects with the PowerShell &#8216;next-gen&#8217; command-line</title>
		<link>http://hursleyonwmq.wordpress.com/2007/12/13/modifying-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/12/13/modifying-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 00:58:51 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/12/13/modifying-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/</guid>
		<description><![CDATA[Part 4 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell
This week, I&#8217;ve been demonstrating how to use Windows PowerShell to administer WebSphere MQ systems, using the support provided by SupportPac MO74.
On Tuesday, I discussed creating new WMQ objects from PowerShell. Today, I want to talk about how to modify [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;border:thin silver solid;background:#eeeeee;padding:1em;">Part 4 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell</p>
<p>This week, I&#8217;ve been demonstrating how to use <a target="_blank" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">Windows PowerShell</a> to administer WebSphere MQ systems, using the support provided by <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">SupportPac MO74</a>.</p>
<p>On Tuesday, I discussed <a href="http://hursleyonwmq.wordpress.com/2007/12/11/creating-websphere-mq-objects-in-the-powershell-next-gen-command-line/">creating new WMQ objects from PowerShell</a>. Today, I want to talk about how to modify existing WebSphere MQ objects. </p>
<p><span id="more-120"></span>The commands all start with <code>Set-WMQ</code>:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-Command Set-WMQ*

  CommandType     Name
  -----------     ----
  Cmdlet          Set-WMQChannel
  Cmdlet          Set-WMQListener
  Cmdlet          Set-WMQNamelist
  Cmdlet          Set-WMQProcess
  Cmdlet          Set-WMQQueue
  Cmdlet          Set-WMQQueueManager
  Cmdlet          Set-WMQService

PS C:\&gt;  </pre>
<p>The <code>Set-WMQ</code> commands will attempt to modify any object passed to it down the pipeline. Properties are specified in the same way as with the <code>New-WMQ</code> commands as described on Tuesday.</p>
<p>For example, to modify the description of the queue MYDEMOQ on MYQMGR to &#8220;modified description&#8221;, you can type:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue MYDEMOQ MYQMGR | Set-WMQQueue -Description "modified description"
</pre>
<p>To modify multiple objects, pass multiple objects down the pipeline to the <code>Set-WMQ</code> command:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue | Where { $_.Name -notmatch "SYSTEM.*" } | Set-WMQQueue -MaximumDepth 10
</pre>
<p>This sets the maximum depth of all non-system queues (all queues with names that don&#8217;t begin with &#8220;SYSTEM.&#8221;) on all local queue managers, to 10 messages.</p>
<p>Similarly, the following command sets the description of all put-inhibited queues on TESTQMGR to &#8220;i am a put inhibited queue&#8221;.
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue -QmgrName TESTQMGR | Where { $_.InhibitPut -eq "Inhibited" } | Set-WMQQueue -Description "i am a put inhibited queue"
</pre>
<p><strong>What&#8217;s next?</strong></p>
<p>This is starting to demonstrate the benefits of using PowerShell over traditional runmqsc scripting. Refer to yesterday&#8217;s post to see how you can make queries identify objects which meet complex criteria. Being able to modify objects which are a result of these queries is very powerful. In tomorrow&#8217;s post, I&#8217;ll look at some advanced uses of PowerShell for WebSphere MQ.</p>
<p>If you can&#8217;t wait till then, or want more examples, there is a &#8220;Cookbook for &#8216;PowerShell for WebSphere MQ&#8217;&#8221; - which contains dozens of worked examples for using PowerShell with your queue managers. <a href="http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&amp;li_formnum=L-SBRY-79KGEK&amp;accepted_url=ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/mo74.zip">Download the MO74 zip file</a> and you will find the powershellcookbook.pdf included. </p>
<p><strong>What do you think?</strong></p>
<p>What do you think about this? <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">Feedback on the SupportPac</a> or the potential of PowerShell administration for WebSphere MQ, is very welcome. If you have any questions, I&#8217;d also be happy to try and answer them. </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/120/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/120/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=120&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/12/13/modifying-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Finding your WebSphere MQ objects with the PowerShell &#8216;next-gen&#8217; command-line</title>
		<link>http://hursleyonwmq.wordpress.com/2007/12/12/finding-your-websphere-mq-objects-with-the-powershell-next-gen-command-line/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/12/12/finding-your-websphere-mq-objects-with-the-powershell-next-gen-command-line/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 01:49:01 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/12/12/finding-your-websphere-mq-objects-with-the-powershell-next-gen-command-line/</guid>
		<description><![CDATA[Part 3 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell
In my last couple of posts, I&#8217;ve been demonstrating the support for using Windows PowerShell to administer WebSphere MQ systems, using SupportPac MO74.
On Monday, I discussed getting WMQ objects with PowerShell. Today, I want to talk in more detail about [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;border:thin silver solid;background:#eeeeee;padding:1em;">Part 3 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell</p>
<p>In my last couple of posts, I&#8217;ve been demonstrating the support for using <a target="_blank" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">Windows PowerShell</a> to administer WebSphere MQ systems, using <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">SupportPac MO74</a>.</p>
<p>On Monday, I discussed <a href="http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/">getting WMQ objects with PowerShell</a>. Today, I want to talk in more detail about getting <strong>specific</strong> objects into PowerShell.</p>
<p><span id="more-119"></span>Recall that, to get objects, you use a <code>Get-WMQ</code> command.
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-Command Get-WMQ*

  CommandType     Name
  -----------     ----
  Cmdlet          Get-WMQChannel
  Cmdlet          Get-WMQListener
  Cmdlet          Get-WMQNamelist
  Cmdlet          Get-WMQProcess
  Cmdlet          Get-WMQQueue
  Cmdlet          Get-WMQQueueManager
  Cmdlet          Get-WMQService

PS C:\&gt;  </pre>
<p>As discussed on Monday, by default, you get <strong>every property</strong> of <strong>every queue</strong> on <strong>every queue manager</strong> on your local system. There are two approaches to narrowing down the objects that you get:</p>
<p><strong>Getting specified objects into the pipeline</strong></p>
<p>You can limit the objects that <code>Get-WMQ</code> commands put into the pipeline by specifying object names and/or which queue managers to query. For example, identify specific objects:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue SYSTEM.DEFAULT.LOCAL.QUEUE 
</pre>
<p>or use wildcards to specify several:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue T*MYCLUSTER*
</pre>
<p>You can do the same with the queue manager name:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue S*SALES* QMGR*
</pre>
<p><strong>Filtering - getting specified objects out of the pipeline</strong></p>
<p>You can be more specific by piping the collection of objects through a <code>Where</code> command. For example, to get sender channels:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQChannel | Where { $_.ChannelType -eq "Sender" }
</pre>
<p>You can do a variety of comparisons, including:</p>
<ul>
<li><strong><code>-eq</code></strong> - equals </li>
<li><strong><code>-ne</code></strong> - not equal </li>
<li><strong><code>-gt</code></strong> - greater than </li>
<li><strong><code>-ge</code></strong> - greater than or equal </li>
<li><strong><code>-le</code></strong> - less than or equal </li>
<li><strong><code>-lt</code></strong> - less than </li>
<li><strong><code>-match</code></strong> - match against a regular expression </li>
<li><strong><code>-notmatch</code></strong> - inverse match using regular expressions </li>
<li><strong><code>-like</code></strong> - perform pattern matching with wildcards </li>
<li><strong><code>-notlike</code></strong> - perform inverse pattern matching with wildcards </li>
<li><strong><code>-contains</code></strong> - determine elements in a group </li>
<li><strong><code>-notcontains</code></strong> - determine excluded elements in a group </li>
</ul>
<p>Comparisons can be combined in different ways, including:</p>
<ul>
<li><strong><code>-and</code></strong> </li>
<li><strong><code>-or</code></strong> </li>
</ul>
<p>So, to get all transmission queues which have been put-inhibited:
<pre style="width:130%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue | Where { $_.QueueType -eq "Local" -and $_.Usage -eq "Transmission" -and $_.InhibitPut -eq "Inhibited" }
</pre>
<p>To get all queues with more than ten messages in:
<pre style="width:130%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue | Where { $_.CurrentDepth -gt 10 }
</pre>
<p>Object attributes can be used on both sides of the comparison. For example, to get all queues which are 10 messages away from being full:
<pre style="width:130%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue | Where { $_.CurrentDepth -gt ($_.MaximumDepth - 10) }
</pre>
<p>As discussed on Monday, once you have the objects you want in the pipeline, you can pipe them to a <code>Select</code> command to get the attributes you want out of them:
<pre style="width:130%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue | Where { $_.CurrentDepth -gt ($_.MaximumDepth - 10) } | Select Name, CurrentDepth
</pre>
<p>This draws a table, with the name and current depth of all queues which are ten messages away from being full.</p>
<p><strong>What&#8217;s next?</strong></p>
<p>This is where PowerShell for WebSphere MQ is starting to get very powerful. You can use complex queries that are not just not possible with runmqsc. But there&#8217;s still lots more to cover. In tomorrow&#8217;s post, I&#8217;ll talk about modifying existing WebSphere MQ objects.</p>
<p>If you can&#8217;t wait till then, or want more examples, there is a &#8220;Cookbook for &#8216;PowerShell for WebSphere MQ&#8217;&#8221; - which contains dozens of worked examples for using PowerShell with your queue managers. <a href="http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&amp;li_formnum=L-SBRY-79KGEK&amp;accepted_url=ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/mo74.zip">Download the MO74 zip file</a> and you will find the powershellcookbook.pdf included. </p>
<p><strong>What do you think?</strong></p>
<p>What do you think about this? <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">Feedback on the SupportPac</a> or the potential of PowerShell administration for WebSphere MQ, is very welcome. If you have any questions, I&#8217;d also be happy to try and answer them. </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/119/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/119/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=119&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/12/12/finding-your-websphere-mq-objects-with-the-powershell-next-gen-command-line/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating WebSphere MQ objects with the PowerShell &#8216;next-gen&#8217; command-line</title>
		<link>http://hursleyonwmq.wordpress.com/2007/12/11/creating-websphere-mq-objects-in-the-powershell-next-gen-command-line/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/12/11/creating-websphere-mq-objects-in-the-powershell-next-gen-command-line/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 00:03:44 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/12/11/creating-websphere-mq-objects-in-the-powershell-next-gen-command-line/</guid>
		<description><![CDATA[Part 2 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell
Yesterday, I wrote about the support for using Windows PowerShell to administer WebSphere MQ systems, using the support introduced by SupportPac MO74, and demonstrated how to get your WMQ objects. 
Today, I&#8217;m going to talk about how to create new [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;border:thin silver solid;background:#eeeeee;padding:1em;">Part 2 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell</p>
<p><a href="http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/">Yesterday</a>, I wrote about the support for using <a target="_blank" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">Windows PowerShell</a> to administer WebSphere MQ systems, using the support introduced by <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">SupportPac MO74</a>, and demonstrated how to get your WMQ objects. </p>
<p>Today, I&#8217;m going to talk about how to create new WMQ objects.</p>
<p><span id="more-118"></span>The commands all start with <code>New-WMQ</code>:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-Command New-WMQ*

  CommandType     Name
  -----------     ----
  Cmdlet          New-WMQChannel
  Cmdlet          New-WMQListener
  Cmdlet          New-WMQNamelist
  Cmdlet          New-WMQProcess
  Cmdlet          New-WMQQueue
  Cmdlet          New-WMQService

PS C:\&gt;  </pre>
<p>To create a new local queue, you can open PowerShell and type <code>New-WMQQueue</code>
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEW_Q_NAME -QueueType Local
</pre>
<p>This might not be what you want - by default, <code>New-WMQQueue</code> will create this queue on <strong>every queue manager</strong> on your local system. </p>
<p>To limit this, you should specify which queue managers you want the command to run on. There are lots of ways to do this - I demonstrated several of these in yesterday&#8217;s post on getting WebSphere MQ objects to see what I mean. As a reminder, here are a few. Remember - these are all equivalent:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEW_Q_NAME -Qmgr (Get-WMQQueueManager TESTQM) -QueueType Local
PS C:\&gt; New-WMQQueue NEW_Q_NAME -QmgrName TESTQM -QueueType Local
PS C:\&gt; New-WMQQueue NEW_Q_NAME (Get-WMQQueueManager TESTQM) -QueueType Local
PS C:\&gt; New-WMQQueue -Name NEW_Q_NAME -QmgrName TESTQM -QueueType Local
</pre>
<p>Or if you want it split up across multiple lines:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; $myQmgr = Get-WMQQueueManager TESTQM
PS C:\&gt; New-WMQQueue NEW_Q_NAME -Qmgr $myQmgr -QueueType Local
</pre>
<p>Passing multiple queue managers to the command lets you create the new queue on multiple queue managers with a single command.
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEW_Q_NAME -QmgrName TES* -QueueType Local
   </pre>
<p>Obviously, QueueType isn&#8217;t the only property you can set. Tab-completion is supported for all <code>New-</code> commands, so you can type:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -
</pre>
<p>After the hyphen (-), press tab. Keep pressing Tab to cycle through the possible attributes.
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -DefaultInputOpenOption
</pre>
<p>Properties that take strings can be types after the parameter. Put it in quotes if you want to use spaces:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -Description "This is my description"
</pre>
<p>Properties that take numbers can just be provided as-is:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -MaximumDepth 100
</pre>
<p>For properties that take constant values, type the name of the constant:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -InhibitPut Inhibited
</pre>
<p>If you can&#8217;t remember the possible options are, you can type something wrong, and PowerShell will tell you what the valid options are:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -InhibitGet CANTREMEMBER
New-WMQQueue : Cannot bind parameter 'InhibitGet'.
Cannot convert value "CANTREMEMBER" to type "WebSphereMQ.MQC+InhibitGetTypes" due to invalid enumeration values.
Specify one of the following enumeration values and try again.
The possible enumeration values are "Allowed, Inhibited".
</pre>
<p>If you have gotten used to the runmqsc names for these attributes, these can also be used - the runmqsc names have been added to the cmdlets as aliases:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -GET Inhibited
</pre>
<p>You can use as many attributes as you want
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue NEWQ2 -QmgrName TESTQM -QueueType Local -InhibitPut Inhibited -MaximumDepth 100 -InhibitGet Inhibited -TriggerType Every -Description mydescription -ProcessName THEPROC
</pre>
<p>The same approach works for other WebSphere MQ objects:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQChannel MYChan -ChannelType Sender -TransmissionQueueName XMITQ -ConnectionName "dlane.hursley.ibm.com(9294)"
PS C:\&gt; New-WMQListener MYLstr -TransportType TCP -StartMode Qmgr -Port 9922
</pre>
<p><strong>Other tricks</strong></p>
<p>As with runmqsc, when you create an object, you can specify an existing object as a template with the &#8220;like&#8221; option:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue MYNEWQUEUE -Like (Get-WMQQueue CLONEME_Q TESTQM)
</pre>
<p>You can change some attributes in the new copy by adding these to the New command:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; New-WMQQueue MYNEWQUEUE -Like (Get-WMQQueue CLONEME_Q TESTQM) -Description modified
</pre>
<p><strong>What&#8217;s next?</strong></p>
<p>There&#8217;s still lots more that you can do. Tomorrow, I&#8217;ll write about how to search for WebSphere MQ objects in PowerShell. </p>
<p>If you can&#8217;t wait till then, or want more examples, there is a &#8220;Cookbook for &#8216;PowerShell for WebSphere MQ&#8217;&#8221; - which contains dozens of worked examples for using PowerShell with your queue managers. <a href="http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&amp;li_formnum=L-SBRY-79KGEK&amp;accepted_url=ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/mo74.zip">Download the MO74 zip file</a> and you will find the powershellcookbook.pdf included. </p>
<p><strong>What do you think?</strong></p>
<p>What do you think about this? <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">Feedback on the SupportPac</a> or the potential of PowerShell administration for WebSphere MQ, is very welcome. If you have any questions, I&#8217;d also be happy to try and answer them.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/118/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/118/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=118&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/12/11/creating-websphere-mq-objects-in-the-powershell-next-gen-command-line/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting your WebSphere MQ objects with the PowerShell &#8216;next-gen&#8217; command-line</title>
		<link>http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 00:02:37 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/</guid>
		<description><![CDATA[Part 1 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell
Windows PowerShell is an object-oriented command line shell and scripting language, available for Windows XP, Windows Vista, and Windows Server 2003.
With the release of SupportPac MO74 (WebSphere MQ - Windows Powershell Library), Windows PowerShell can now be used to administer [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:center;border:thin silver solid;background:#eeeeee;padding:1em;">Part 1 of a series of posts on working with IBM WebSphere MQ from Windows PowerShell</p>
<p><a target="_blank" href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx">Windows PowerShell</a> is an object-oriented command line shell and scripting language, available for Windows XP, Windows Vista, and Windows Server 2003.</p>
<p>With the release of <a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24017698">SupportPac MO74 (WebSphere MQ - Windows Powershell Library)</a>, Windows PowerShell can now be used to administer WebSphere MQ. In the next few posts, I&#8217;ll go through a few common WMQ system administration tasks in PowerShell. </p>
<p>For people new to Window PowerShell, I&#8217;ve added a few links to good resources for beginners at the end of my post. </p>
<p>Instructions on installing the PowerShell support for WebSphere MQ can be found in the <a href="ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/mo74.pdf">MO74 documentation</a> (pdf). I&#8217;ll be writing about what you can do once you&#8217;ve done that.</p>
<p>To start with - getting your WMQ objects.</p>
<p><span id="more-117"></span>The commands all start with <code>Get-WMQ</code>:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-Command Get-WMQ*

  CommandType     Name
  -----------     ----
  Cmdlet          Get-WMQChannel
  Cmdlet          Get-WMQListener
  Cmdlet          Get-WMQNamelist
  Cmdlet          Get-WMQProcess
  Cmdlet          Get-WMQQueue
  Cmdlet          Get-WMQQueueManager
  Cmdlet          Get-WMQService

PS C:\&gt;  </pre>
<p>To get queues, you can open PowerShell and type <code>Get-WMQQueue</code>
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue

...  </pre>
<p>I won&#8217;t show the output you get here, because it&#8217;s pretty big. Try it&#8230; you&#8217;ll get <strong>every property</strong> of <strong>every queue</strong> on <strong>every queue manager</strong> on your local system. </p>
<p>Remember that PowerShell is an object-oriented shell. Get-WMQQueue is getting you every queue object, and in the absence of any instructions to the contrary, is dumping all of them with all their properties on the console. </p>
<p>You can make this a little more friendly by choosing which attributes you are interested in:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueue | Select Name, Description, CurrentDepth, MaximumDepth

...  </pre>
<p>Get-WMQQueue is still getting all queues, with all their properties, from all local queue managers. But this time, before sending them to the console, we pipe the objects through a Select command which selects the attributes we want - giving us a nice table of results.</p>
<p>This works in the same way for other WMQ objects. To get listeners:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener | Select Name, TransportType, StartMode, Port

Name                                    TransportType             StartMode             Port
----                                    -------------             ---------             ----
CENTLSTR                                          TCP                  Qmgr             9282
SYSTEM.DEFAULT.LISTENER.LU62                     LU62                Manual
SYSTEM.DEFAULT.LISTENER.NETBIOS               NetBIOS                Manual
SYSTEM.DEFAULT.LISTENER.SPX                       SPX                Manual
SYSTEM.DEFAULT.LISTENER.TCP                       TCP                Manual                0

PS C:\&gt;  </pre>
<p>You don&#8217;t have to get all objects into the pipeline&#8230; so if I wanted to look for listeners beginning with &#8216;C&#8217;:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener C* | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>This is a short list because I&#8217;ve only got one queue manager on my box at the moment. What if I had more than one queue manager, but didn&#8217;t want to put objects from all queue managers in the pipeline?</p>
<p>There are so many ways to do this&#8230; here are a few:</p>
<p>Use positional parameters - first a listener name, then a queue manager. Get a handle to a queue manager and put it in a variable for use by <code>Get-WMQListener</code>
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; $myqmgr = Get-WMQQueueManager TESTQM
PS C:\&gt; Get-WMQListener C* $myqmgr | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>Use named parameters - but otherwise the same as above
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; $myqmgr = Get-WMQQueueManager TESTQM
PS C:\&gt; Get-WMQListener -Name C* -Qmgr $myqmgr | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>Use positional parameters - first a listener name, then a queue manager. Get the queue manager by including an inner <code>Get-WMQQueueManager</code> command.
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener C* (Get-WMQQueueManager TESTQM) | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>Use a named parameter for the queue manager - get the queue manager by including an inner <code>Get-WMQQueueManager</code> command again
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener C* -Qmgr (Get-WMQQueueManager TESTQM) | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>Use a named parameter for the queue manager, but this time use the QmgrName parameter, so <code>Get-WMQListener</code> has to get a handle to the queue manager itself
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener C* -QmgrName TESTQM | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>Use positional parameters for both listener name and queue manager - again relying on <code>Get-WMQListener</code> to get it&#8217;s own handle to the queue manager
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener C* TESTQM | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>Get the queue manager, and pass it down the pipeline to the <code>Get-WMQListener</code> command
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQQueueManager TESTQM | Get-WMQListener C* | Select Name, TransportType, StartMode, Port

Name              TransportType            StartMode              Port
----              -------------            ---------              ----
CENTLSTR                    TCP                 Qmgr              9282

PS C:\&gt;  </pre>
<p>You don&#8217;t have to get just one queue manager. All of these examples would work if you used a wildcard to get multiple queue managers. </p>
<p>For example:
<pre style="width:125%;overflow:scroll;font-size:1.1em;background-color:#0000A0;border:1px solid silver;color:white;padding:3px;">

PS C:\&gt; Get-WMQListener C* (Get-WMQQueueManager TEST*) | Select Name, TransportType, StartMode, Port

Name                  TransportType            StartMode              Port
----                  -------------            ---------              ----
CENTLSTR                        TCP                 Qmgr              9282
CENT_ON_TESTQM2                 TCP               Manual              9283

PS C:\&gt;  </pre>
<p><strong>What&#8217;s next?</strong></p>
<p>There&#8217;s lots more that you can do. Tomorrow, I&#8217;ll write about how to create WebSphere MQ objects in PowerShell. </p>
<p>If you can&#8217;t wait till then, or want more examples, there is a &#8220;Cookbook for &#8216;PowerShell for WebSphere MQ&#8217;&#8221; - which contains dozens of worked examples for using PowerShell with your queue managers. <a href="http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?popup=Y&amp;li_formnum=L-SBRY-79KGEK&amp;accepted_url=ftp://ftp.software.ibm.com/software/integration/support/supportpacs/individual/mo74.zip">Download the MO74 zip file</a> and you will find the powershellcookbook.pdf included. </p>
<p><strong>What do you think?</strong></p>
<p>What do you think about this? <a href="http://www.phpbber.com/phpbb/index.php?mforum=powershellforwe">Feedback on the SupportPac</a> or the potential of PowerShell administration for WebSphere MQ, is very welcome. If you have any questions, I&#8217;d also be happy to try and answer them. </p>
<p><strong>Recommended resources for PowerShell beginners</strong></p>
<ul>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=B4720B00-9A66-430F-BD56-EC48BFCA154F&amp;displaylang=en">Windows PowerShell Documentation Pack</a> - the definitive documentation</li>
<li><a href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/default.mspx">Windows PowerShell Owner&#8217;s Manual</a> - task oriented beginner&#8217;s guide</li>
<li><a href="http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032306183&amp;EventCategory=3&amp;culture=en-US&amp;CountryCode=US">Next Generation Command Line Scripting</a> - a webcast by the inventor of PowerShell</li>
<li><a href="https://blogs.technet.com/chitpro-de/archive/2007/05/10/english-version-of-windows-powershellcourse-book-available-for-download.aspx">Windows PowerShell book</a> - free book available from msdn</li>
<li><a href="http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/index.mspx">What can I do with Windows PowerShell?</a> - sample scripts</li>
<li><a href="http://powershelllive.com/blogs/lunch/default.aspx">Mastering PowerShell in your lunchbreak</a> - nice series of lessons</li>
<li><a href="http://www.slideshare.net/dalelane/an-introduction-to-windows-powershell/">An introduction to Windows PowerShell</a> - PowerPoint presentation on using PowerShell</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/117/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/117/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/117/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/117/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/117/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=117&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/12/10/getting-your-websphere-mq-objects-in-the-powershell-next-gen-command-line/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Some rambling thoughts on the two full repositories in your WebSphere MQ cluster&#8230;</title>
		<link>http://hursleyonwmq.wordpress.com/2007/11/18/some-rambling-thoughts-on-the-two-full-repositories-in-your-websphere-mq-cluster/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/11/18/some-rambling-thoughts-on-the-two-full-repositories-in-your-websphere-mq-cluster/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 16:38:28 +0000</pubDate>
		<dc:creator>ivanstone</dc:creator>
		
		<category><![CDATA[clustering]]></category>

		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/11/18/some-rambling-thoughts-on-the-two-full-repositories-in-your-websphere-mq-cluster/</guid>
		<description><![CDATA[How many full repositories should you have in a WebSphere MQ cluster? The Queue Manager Clusters manual says &#8220;preferably two&#8221; and &#8220;Having only two full repositories is sufficient for all but very exceptional circumstances&#8221; (see doc). 
The reason for having two rather one is for availability reasons (one is a single point of failure). Single [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>How many full repositories should you have in a WebSphere MQ cluster? The Queue Manager Clusters manual says &#8220;preferably two&#8221; and &#8220;Having only two full repositories is sufficient for all but very exceptional circumstances&#8221; (see <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzah.doc/qc11230_.htm">doc</a>). </p>
<p>The reason for having two rather one is for availability reasons (one is a single point of failure). Single point of failure is probably somewhat of an overstatement, as the impact of all full repositories being unavailable is that definitional changes (e.g. define/alter cluster queues or cluster queue receiver channels) cannot be shared with the cluster. </p>
<p>Application messages between available cluster queue managers can still flow when full repositories are not available, so the impact is to cluster object changes rather directly on application traffic.</p>
<p><span id="more-116"></span>I recommend having exactly two full repositories per cluster unless you have a very good reason. This is by far the most common cluster configuration. &#8220;Good&#8221; reasons (judged by users, rather than myself) for not having two, include&#8230;</p>
<ul>
<li>It&#8217;s a development system, I&#8217;m just playing, a single full repository will suffice.</li>
<li>In our environment some full repositories are difficult to reach or are regularly deleted (it happens!), having more than two full repositories may be useful.</li>
<li>Someone architected is like that years ago, it works, and I don&#8217;t want to change it.</li>
</ul>
<p>So are there any other reasons not to have two full repositories? Yes, including&#8230;</p>
<ol>
<li>The more full repositories you have, the more internal messages will be flowed between them.</li>
<li>Partials repositories only publish to two full repositories anyway.</li>
<li>The more full repositories you have, the less flexible the cluster is to changing the set of full repositories. This is because all full repositories should have manually defined cluster sender channels to all other full repositories in the cluster because &#8220;full repositories republish the publications they receive through the manually-defined CLUSSDR channels, which must point to other full repositories in the cluster&#8221; (see previous doc link). Full repositories will not republish the publications they receive to other full repositories over auto-defined only channels. So when adding a full repository you should define a cluster sender to every other full repository and also go round all the other full repositories and define a cluster sender to the full repository being added. The more full repositories, the more queue managers you will have to administrate when changing the set of full repositories.  This overhead is not associated with adding a partial repository, which simple requires that you define objects on the partial repository being added to the cluster.</li>
</ol>
<p>It is possible for a cluster to work if the full repositories are not fully interconnected to one another, which avoids the less-flexible-cluster argument, but creates another problem. The problem that arises from not fully interconnecting full repositories is that definitonal changes may not reach other full repositories, especially if channels are down, which will leave a set of cluster queue managers with an out of date  view of the cluster. For instance, imagine we have four full repositories, connected by manually defined cluster senders, as follows:</p>
<ul>
<li>QM1 has a cluster sender to QM2</li>
<li>QM2 has a cluster sender to QM1 and QM3</li>
<li>QM3 has a cluster sender to QM2 and QM4</li>
<li>QM4 has a cluster sender to QM3</li>
</ul>
<p>If you alter a cluster object on QM1 the change is sent via the manually defined cluster sender channels. QM1 sends the change to QM2, which sends it to QM3, which sends it to QM4. In this manner, all full repositories become aware of the change.</p>
<p>So imagine that QM2 is down and you alter a cluster object on QM1. The change cannot be sent to QM2, so QM3 and QM4 (which are both running) do not receive the change either. The change info will sit on the SYSTEM.CLUSTER.TRANSMIT.QUEUE on QM1 until QM2 is once again available, at which point the change will flow to QM2 and then on to QM3 and QM4. Using this model, full repositories are dependant on the availability of themsleves and other queue managers to keep an up-to-date view of the cluster.</p>
<p>And now imagine that all full repositories are fully inter-connected with manually defined cluster sender channels. If QM2 is down and a change is made to a cluster object on QM1, both QM3 and QM4 receive the change (directly from QM1). The change info will sit on the SYSTEM.CLUSTER.TRANSMIT.QUEUE on QM1 until QM2 is once again available, at which point the change will flow to QM2. Using this model, full repositories are only dependant on the availability of themsleves to keep an up-to-date view of the cluster.</p>
<p>In summary, have exactly two full repositories per cluster unless you have a very good reason and fully interconnect them with manually defined cluster sender channels.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/116/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/116/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=116&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/11/18/some-rambling-thoughts-on-the-two-full-repositories-in-your-websphere-mq-cluster/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Finding WMQ constants / bit-flags</title>
		<link>http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 09:33:29 +0000</pubDate>
		<dc:creator>peterbroadhurst</dc:creator>
		
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/</guid>
		<description><![CDATA[Here&#8217;s a little utility which allows you to match an integer against WMQ constants, or find WMQ bit flags it contains.
You might find it useful if you are looking at output from an application which prints WMQ fields as an integer, or in hex.

Don&#8217;t forget the &#8216;mqrc&#8217; utility which comes with WMQ, as this is [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here&#8217;s a little utility which allows you to match an integer against WMQ constants, or find WMQ bit flags it contains.</p>
<p>You might find it useful if you are looking at output from an application which prints WMQ fields as an integer, or in hex.<br />
<span id="more-113"></span><br />
<em>Don&#8217;t forget the &#8216;mqrc&#8217; utility which comes with WMQ, as this is especially useful for AMQXXXX numbers.</em></p>
<h3>Screenshots</h3>
<p><img src="http://hursleyonwmq.files.wordpress.com/2007/11/wmqflags1.jpg" alt="Screenshot1" /><br />
<img src="http://hursleyonwmq.files.wordpress.com/2007/11/wmqflags2.jpg" alt="Screenshot2" /></p>
<h3>Usage</h3>
<ol>
<li>Save the source below as WmqBitFlags.java in a directory called hursleyonwmq.<br />
For example: <code>c:\utils\hursleyonwmq</code></li>
<li>Set your CLASSPATH environment variable to include the directory where you created hursleyonwmq and <code>com.ibm.mq.jar</code>
<pre>set CLASSPATH=c:\utils;c:\Program Files\IBM\WebSphere MQ\java\lib\com.ibm.mq.jar</pre>
</li>
<li>Compile<br />
<code>javac hursleyonwmq\WmqBitFlags.java</code></li>
<li>Run<br />
<code>java hursleyonwmq.WmqBitFlags</code></li>
</ol>
<h3>Source</h3>
<pre>package hursleyonwmq;

import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Iterator;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

public class WmqBitFlags extends JFrame implements ActionListener, ChangeListener {

  static final long serialVersionUID = -3064567943053904981L;

  private JTextField  prefixField  = new JTextField("MQOO_", 20);
  private JTextField  valueField   = new JTextField(Integer.toHexString(Integer.MAX_VALUE), 15);
  private JCheckBox   hexCB        = new JCheckBox("Hex?", true);
  private JCheckBox   endianCB     = new JCheckBox("BE?", true);
  private JButton     goButton     = new JButton("Find WMQ Flags");
  private JTextArea   outputArea   = new JTextArea(10, 60);

  /** Disable endian checkbox with hex checkbox */
  public void stateChanged(ChangeEvent ce) {
    if (ce.getSource() == hexCB) endianCB.setEnabled(hexCB.isSelected());
  }

  /** When the user clicks the button, find all matching flags */
  public void actionPerformed(ActionEvent ae) {

    String prefix = prefixField.getText().toUpperCase();
    String valueStr = valueField.getText().replaceAll("\\s", "");
    outputArea.setText("");

    // Parse the integer
    int val = -1;
    try {
      if (valueStr.length() == 0) valueStr = "0";
      if (hexCB.isSelected()) {
        // Do we need to byte-swap?
        if (!endianCB.isSelected()) {
          // Ensure we have an even number of characters
          if (valueStr.length() % 2 == 1) valueStr = "0" + valueStr;
          String swappedValStr = "";
          // Do the swap
          for (int i = 0; i &lt; valueStr.length(); i += 2) {
            swappedValStr = valueStr.substring(i,i+2) + swappedValStr;
          }
          valueStr = swappedValStr;
        }
        val = Integer.parseInt(valueStr, 16);
      }
      else {
        val = Integer.parseInt(valueStr, 10);
      }
    }
    catch (NumberFormatException e) {
      JOptionPane.showMessageDialog(this, "Bad integer: \"" + valueStr + "\"",
          "Error", JOptionPane.ERROR_MESSAGE);
      return;
    }

    // Print the hex value of the string we're using
    String outString = "Prefix: \"" + prefix +
      "\" Value: " + val +
      " (0x" + Integer.toHexString(val) + ")\n";

    // Check we've got the MQC/MQException classes
    Class constants = null;
    Class reasons = null;
    try {
      constants = ClassLoader.getSystemClassLoader().loadClass("com.ibm.mq.MQC");
      reasons = ClassLoader.getSystemClassLoader().loadClass("com.ibm.mq.MQException");
    }
    catch (ClassNotFoundException e) {
      JOptionPane.showMessageDialog(this, e.toString() +
          "\nEnsure your CLASSPATH contains com.ibm.mq.jar", "Error", JOptionPane.ERROR_MESSAGE);
      return;
    }

    // Get a list of all integer public fields with the specified prefix
    ArrayList matchingFields = new ArrayList();
    Field[] fields = constants.getFields();
    for (int i = 0; i &lt; fields.length; i++) {
      Field field = fields[i];
      if (field.getType() == int.class &amp;&amp;
          ((field.getModifiers() &amp; Modifier.FINAL) != 0) &amp;&amp;
          field.getName().toUpperCase().startsWith(prefix)) {
        matchingFields.add(field);
      }
    }
    fields = reasons.getFields();
    for (int i = 0; i &lt; fields.length; i++) {
      Field field = fields[i];
      if (field.getType() == int.class &amp;&amp;
          ((field.getModifiers() &amp; Modifier.FINAL) != 0) &amp;&amp;
          field.getName().toUpperCase().startsWith(prefix)) {
        matchingFields.add(field);
      }
    }

    // Check for exact matches with constants
    outString += "\nExact matches:\n";
    outString +=   "--------------\n";
    Iterator iterator = matchingFields.iterator();
    while (iterator.hasNext()) {
      Field field = (Field)iterator.next();
      Integer fieldVal = null;
      try {
        fieldVal = (Integer)field.get(null);
      }
      catch (Exception e) {
        JOptionPane.showMessageDialog(this, "Unable to query MQC." + field.getName(),
            "Error", JOptionPane.ERROR_MESSAGE);
        return;
      }
      // Is this a match?
      if (fieldVal.intValue() == val) {
        outString += field.getName() + "\n";
      }
    }

    // Check each bit in the source integer against the list
    outString += "\nMatches as bit flags:\n";
    outString +=   "---------------------\n";
    for (int bit = 0; bit &lt; 32; bit++) {
      int matchInt = 1 &lt;&lt; bit;
      // Is this bit specified?
      if ((val &amp; matchInt) == matchInt) {
        iterator = matchingFields.iterator();
        while (iterator.hasNext()) {
          Field field = (Field)iterator.next();
          Integer fieldVal = null;
          try {
            fieldVal = (Integer)field.get(null);
          }
          catch (IllegalAccessException e) {
            JOptionPane.showMessageDialog(this, "Unable to query MQC." + field.getName(),
                "Error", JOptionPane.ERROR_MESSAGE);
            return;
          }
          // Is this a match?
          if (fieldVal.intValue() == matchInt) {
            outString += field.getName() + " (0x" + Integer.toHexString(fieldVal.intValue()) + ")\n";
          }
        }
      }
    }

    // Display the change
    outputArea.setText(outString);

  }

  /** Constructor lays out and displays the dialog */
  private WmqBitFlags() {
    super("WMQ bit flags");
    Font fixedWidthFont = new Font("Monospaced", Font.PLAIN, 12);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container mainContent = getContentPane();
    mainContent.setLayout(new BorderLayout());
    Container inputContainer = new Container();
    inputContainer.setLayout(new FlowLayout());
    inputContainer.add(new JLabel("Flag Prefix: "));
    prefixField.setFont(fixedWidthFont);
    prefixField.setToolTipText("Only search for flags with the specified prefix");
    inputContainer.add(prefixField);
    inputContainer.add(new JLabel("Value: "));
    valueField.setFont(fixedWidthFont);
    valueField.setToolTipText("The integer to search for enabled WMQ bit flags");
    inputContainer.add(valueField);
    hexCB.addChangeListener(this);
    hexCB.setToolTipText("Has the integer been specified in hex?");
    inputContainer.add(hexCB);
    endianCB.setToolTipText("Is the hex big-endian? Un-tick for binary hex output on Windows or Linux x86/x86-64/IA64");
    inputContainer.add(endianCB);
    goButton.setToolTipText("Search for WMQ bit flags with the specified prefix in the value");
    goButton.addActionListener(this);
    inputContainer.add(goButton);
    mainContent.add(inputContainer, BorderLayout.NORTH);
    outputArea.setEditable(false);
    outputArea.setFont(fixedWidthFont);
    JScrollPane scrollPane = new JScrollPane(outputArea);
    scrollPane.setPreferredSize(new Dimension(400, 600));
    mainContent.add(scrollPane, BorderLayout.CENTER);
    pack();
    setVisible(true);
  }

  /** main method */
  public static void main(String[] args) throws Exception {
    new WmqBitFlags();
  }

}</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/113/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/113/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=113&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/11/12/finding-wmq-constants-bit-flags/feed/</wfw:commentRss>
	
		<media:content url="http://hursleyonwmq.files.wordpress.com/2007/11/wmqflags1.jpg" medium="image">
			<media:title type="html">Screenshot1</media:title>
		</media:content>

		<media:content url="http://hursleyonwmq.files.wordpress.com/2007/11/wmqflags2.jpg" medium="image">
			<media:title type="html">Screenshot2</media:title>
		</media:content>
	</item>
		<item>
		<title>WebSphere MQ and CCSIDs, Encoding and Data conversion</title>
		<link>http://hursleyonwmq.wordpress.com/2007/10/31/websphere-mq-and-ccsids-encoding-and-data-conversion/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/10/31/websphere-mq-and-ccsids-encoding-and-data-conversion/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 19:16:57 +0000</pubDate>
		<dc:creator>Saket Rungta</dc:creator>
		
		<category><![CDATA[JMS]]></category>

		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/10/31/websphere-mq-and-ccsids-encoding-and-data-conversion/</guid>
		<description><![CDATA[Ever puzzled by CCSIDs, Encoding or Data conversion issues? Here is an excellent document on this topic.
Data Conversion Under WebSphere MQ
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ever puzzled by CCSIDs, Encoding or Data conversion issues? Here is an excellent document on this topic.</p>
<p><a href="http://www-1.ibm.com/support/docview.wss?uid=swg27005729">Data Conversion Under WebSphere MQ</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/111/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/111/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=111&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/10/31/websphere-mq-and-ccsids-encoding-and-data-conversion/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/srungta-128.jpg" medium="image">
			<media:title type="html">Saket Rungta</media:title>
		</media:content>
	</item>
		<item>
		<title>Making WMQ Explorer feel more responsive</title>
		<link>http://hursleyonwmq.wordpress.com/2007/10/05/making-mq-explorer-feel-more-responsive/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/10/05/making-mq-explorer-feel-more-responsive/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 19:59:28 +0000</pubDate>
		<dc:creator>Russell Finn</dc:creator>
		
		<category><![CDATA[Explorer]]></category>

		<category><![CDATA[administration]]></category>

		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/10/05/making-mq-explorer-feel-more-responsive/</guid>
		<description><![CDATA[It seems that not everyone knows this and it&#8217;s well worth knowing.
The default preferences for WMQ Explorer are to show progress dialogs for a minimum of 3 seconds.  For example, when deleting a queue there is a progress dialog displayed saying &#8220;Deleting the object named MY_QUEUE&#8221;.   You will always be waiting for [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It seems that not everyone knows this and it&#8217;s well worth knowing.</p>
<p>The default preferences for WMQ Explorer are to show progress dialogs for a minimum of 3 seconds.  For example, when deleting a queue there is a progress dialog displayed saying &#8220;Deleting the object named MY_QUEUE&#8221;.   You will always be waiting for 3 seconds before getting the &#8220;The object &#8216;MY_QUEUE&#8217; was deleted successfully&#8221; message, even though the command itself was actioned in less than a second.</p>
<p>Given that you just asked for the queue to be deleted you might not want to artificially wait for 3 seconds.</p>
<p><a href='http://hursleyonwmq.files.wordpress.com/2007/10/071005_wmqexplorer1.gif' title='Screenshot of the main WMQ Explorer preferences screen'><img hspace="10" align="left" width="259" height="185" src='http://hursleyonwmq.files.wordpress.com/2007/10/071005_wmqexplorer1.gif?w=259&h=185' alt='Screenshot of the main WMQ Explorer preferences screen' /></a>You can change the minimum display time down to zero.  This makes the Explorer seem much more responsive.</p>
<p>Choose Windows -&gt; Preferences and click on the &#8220;WebSphere MQ Explorer&#8221; folder to bring up the panel below.  </p>
<p>Change the value from 3 to 0.</p>
<p></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/108/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/108/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=108&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/10/05/making-mq-explorer-feel-more-responsive/feed/</wfw:commentRss>
	
		<media:content url="http://hursleyonwmq.files.wordpress.com/2007/10/071005_wmqexplorer1.gif" medium="image">
			<media:title type="html">Screenshot of the main WMQ Explorer preferences screen</media:title>
		</media:content>
	</item>
		<item>
		<title>What happens to WebSphere MQ if the time changes?</title>
		<link>http://hursleyonwmq.wordpress.com/2007/08/21/what-happens-to-websphere-mq-if-the-time-changes/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/08/21/what-happens-to-websphere-mq-if-the-time-changes/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 00:02:53 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/08/21/what-happens-to-websphere-mq-if-the-time-changes/</guid>
		<description><![CDATA[The changes to Daylight Savings Time (DST) in the United States this year raised questions about the way time is handled by various software programs. 
The implications of the DST change for WebSphere MQ are fairly straightforward. In summary, there are no issues with the WMQ runtime (on either the servers or clients) as WebSphere [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The <a href="http://www.ibm.com/support/alerts/us/en/daylightsavingstimealert.html">changes to Daylight Savings Time (DST) in the United States</a> this year raised questions about the way time is handled by various software programs. </p>
<p>The implications of the DST change for WebSphere MQ are fairly straightforward. In summary, there are no issues with the WMQ runtime (on either the servers or clients) as WebSphere MQ uses <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a> and is essentially oblivious to DST. There are some issues surrounding the Java runtime environments supplied with WebSphere MQ. <a href="http://www-1.ibm.com/support/docview.wss?uid=swg21246616">This is all well documented in a TechNote on IBM.com</a>.</p>
<p>Despite this, the DST changes this year were a good reminder of the implications of making changes to the system clock on servers. In this post I will discuss some implications with WebSphere MQ.</p>
<p><span id="more-107"></span><strong>Duplicate MsgIds, CorrelIds, GroupIds, ConnIds</strong></p>
<p>WebSphere MQ generates unique identifiers for a number of values, such as the <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js01297.htm">unique message identifier, MsgId</a>. Although they aren&#8217;t straightforward timestamps, part of the value is generated based upon a timestamp in UTC. As such, changes to the system clock does make it possible that the queue manager will generate values for these identifiers which have been previously used.</p>
<p>This should not cause any errors within the queue manager. WebSphere MQ allows applications to generate identifiers externally to the queue manager, which therefore may reuse identifiers (<em>although this is something that we <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js01297.htm">strongly discourage</a></em>). As a result, duplicate identifiers have never been something that we could absolutely prevent, and therefore are generally able to handle. </p>
<p>It is possible that duplicate identifiers may cause problems in the logic of some WebSphere MQ applications which rely on these IDs. For example, it may cause applications to get an incorrect reply message, or for message groups to contain incorrect members, or message sequence numbers to be reused. How significant a problem this will be is entirely dependent on the design of the WebSphere MQ application, and how it handles these values.</p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqnar.doc/amqnar10.htm">WebSphere MQ Publish/Subscribe</a> stores information on SYSTEM.BROKER queues, and uses MsgIds to retrieve it. As such, it is possible that duplicate message identifiers could cause errors in the WebSphere MQ Publish/Subscribe Broker. </p>
<p><strong>Expiring messages</strong></p>
<p>Consider a message which has a <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js01159.htm">specified time-to-live after which it becomes eligible to be discarded</a> (if it has not already been got from the destination queue). In these cases, the queue manager stores the time that the message arrives, and uses this to perform comparisons with the current time to identify if a message should expire. </p>
<p>If the system clock changes after such a message is put, then it is possible that messages may be expired too soon, or not expire when intended. This may cause a problem for applications which rely on message expiry. </p>
<p>With persistent messages, the stored arrival time will be written to disk and will be restored after the restart of a queue manager. Restarting a queue manager after changing the system time will therefore not resolve any such problems. </p>
<p><strong>MQGET with WAIT</strong></p>
<p>Consider a WebSphere MQ application which performs an MQGET and specifies that it wants to <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/fg12760_.htm">wait for a message for a period of time</a> before timing-out. If the system clock changes after the MQGET is issued, but before a message is got or the time-out occurs, then the time change may cause some applications to remain in the MQGET call for longer or shorter than was intended. </p>
<p>This is unlikely to cause a significant problem in most instances, however this is again dependent upon the application design. Restarting the queue manager would ensure that any possible issues for this particular problem are prevented. </p>
<p>It is worth noting that waits will generally last for the requested interval regardless of time changes. WMQ typically requests notification from the operating system after a specified interval rather than at a specific end-time. As a result, WMQ&#8217;s behaviour in this regard will ultimately be dependent upon different operating systems&#8217; handling of intervals in the event of time changes. However, this behaviour cannot be guaranteed and should not be relied upon. </p>
<p><strong>Trigger intervals</strong></p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/js03176.htm">TriggerInterval</a> is a queue manager attribute used to restrict the number of trigger messages. It is intended to allow for a queue server that ends before processing all the messages on the queue. The purpose of the trigger interval is to reduce the number of duplicate trigger messages that are generated.</p>
<p>Changes to the system clock during triggering may cause the trigger interval to be generated too early or too late. Whether this causes a problem depends on how significantly TriggerInterval is being relied upon in a given environment. </p>
<p>The trigger interval is reset when a queue manager is restarted, so restarting the queue manager after the system time is changed will avoid any possibility for problems in this area.</p>
<p><strong>Batch heartbeat</strong></p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic18840_.htm">Batch heartbeats</a> allow sender channels to determine whether the remote channel instance is still active before going indoubt. </p>
<p>Changes to the system clock could cause an extra heartbeat to be generated or for one to be missed. It is unlikely that this would cause a problem, however restarting affected channels should be sufficient to resolve any issues that arise. </p>
<p><strong>Batch interval</strong></p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic18550_.htm">Batch intervals</a> are used to specify a time after which a batch should be committed even if it has not reached the <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic18250_.htm">specified size</a>. </p>
<p>Changing the system clock during an in-flight batch could cause a batch to be submitted earlier (if the clock is moved forwards) or later (if the clock is moved backwards) than intended. </p>
<p>Whether this causes a significant problem will depend on how much the batch interval is relied upon to ensure that batches are committed. For example, in an environment where <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic18250_.htm">BatchSize</a> is set so high that it is never reached</a>, then moving the system clock backwards a long way could result in a notable wait before messages are committed. Typically, however, most customers have <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic18250_.htm">BatchSize</a> set to a value that is sufficient to avoid this. </p>
<p>This value will be reset when a channel is restarted, so restarting affected channels should be sufficient to resolve any issues that arise.</p>
<p><strong>Queue service intervals</strong></p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzax.doc/userev.htm">Queue service interval events</a> indicate whether a queue was &#8217;serviced&#8217; within a user-defined time interval. Changing the system time could affect this function - such as causing the queue manager to generate unnecessary queue service interval events if the clock is moved forwards (far enough to cause it to mistakenly think that the queue has not been serviced for too long), or to fail to generate an event if the clock is moved backwards. </p>
<p>Whether this causes a problem will depend on how these events are being handled and used, however it is likely that unexpected queue service interval events will be relatively easy to match up with a server time change. </p>
<p><strong>Other monitoring</strong></p>
<p>WebSphere MQ v6 introduced the collection of a number of new statistics fields, such as <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzax.doc/rtmpmfe.htm">QTIME - used to indicate the length of time that messages are staying on a queue</a>. The queue manager reports these values based upon differences between timestamps. As such, in the event that the system time is changed, it is possible that these monitoring values may no longer be reliable. </p>
<p>These values are provided to aid user administration and problem diagnosis, and are not relied upon by the queue manager. As such, it is unlikely that this would cause any significant problems. </p>
<p><strong>User-visible timestamps</strong></p>
<p>There are places within WebSphere MQ where timestamps are collected for displaying to the user, such as the creation and last-alteration date of queue managers and queue manager objects. These values are not used by the queue manager for processing, so should not cause any problems other than potentially misleading or confusing a system administrator with values which may appear to be incorrect. </p>
<p><strong>Avoiding problems in the first place</strong></p>
<p>The best practice is to avoid any changes to the system clock in the first place. Once a system has become confused because of changes to the time, there may be no clear way to resolve the situation (e.g. to identify what how messages with duplicate message identifiers should have been handled). </p>
<p>Where possible, changes to timezones are preferable to changes to the underlying system clock - as these are not subject to the problems outlined in my post. This is because the WMQ runtime uses UTC rather than local time, as mentioned in my introduction. </p>
<p>If a change to the system clock is unavoidable, a good precaution against the risk of duplicate identifiers mentioned above is to end the queue manager during the period when time will be &#8220;repeated&#8221; on the server. For example, if you need to move the clock back an hour, then end the queue manager for an hour. In this way, the queue manager should not experience any duplicate timestamps. </p>
<p><strong>Using NTP</strong></p>
<p>It should be possible to run WebSphere MQ on servers using NTP (Network Time Protocol) to keep time synchronized across multiple machines. </p>
<p>The potential for generating duplicate identifiers discussed above can be lessened through the configuration of NTP to favour slewing rather than stepping the system clock. In this way, if the system clock is ahead of the correct time, it will be slowed down to allow the correct time to &#8220;catch up&#8221; rather than stepping the clock back to the correct time immediately. In this way, queue managers on that server may be less likely to encounter duplicate timestamps.  </p>
<p>NTP adjustments are typically minor enough that the potential for the other time difference/interval-related issues discussed here are not noticeable. </p>
<p><strong>Implications for non-distributed platforms</strong></p>
<p>Please note that I am referring to distributed platforms in the discussion in this post. </p>
<p>It is worth highlighting that, unlike distributed platforms, there are in fact specific problems when making time changes on iSeries systems running WebSphere MQ due to the use of the journal. This is explained in the <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqwag.doc/dst.htm#dst">WebSphere MQ System Administration Guide for iSeries</a>.</p>
<p><strong>Summary</strong></p>
<p>In this post, I have outlined a number of implications of changes to the time on a system with WebSphere MQ running. This should not be taken as a definitive list of all possible implications, and there may be other issues that I have not considered. </p>
<p>With one exception (<em>potential problems in WebSphere MQ Publish/Subscribe in the event of duplicate MsgId values</em>), none of these implications are issues which would cause errors or problems in the queue manager operation. And most of the issues can be resolved by restarting the queue manager or channels in use. </p>
<p>The implications outlined generally issues which may cause confusion in the logic of applications connecting to WebSphere MQ if the unexpected behaviour is not handled correctly. For example, a change to system time which causes messages to be got later than intended is not going to cause errors within the queue manager, but may cause problems for the application concerned. </p>
<p>As such, it is worth considering the design of your WebSphere MQ applications in the light of such implications if significant time changes are required on production servers.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/107/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/107/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=107&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/08/21/what-happens-to-websphere-mq-if-the-time-changes/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dalelane-128.jpg" medium="image">
			<media:title type="html">dalelane</media:title>
		</media:content>
	</item>
		<item>
		<title>Init Script for IBM WebSphere MQ on Linux</title>
		<link>http://hursleyonwmq.wordpress.com/2007/08/02/init-script-for-ibm-websphere-mq-on-linux/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/08/02/init-script-for-ibm-websphere-mq-on-linux/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 16:30:17 +0000</pubDate>
		<dc:creator>Phil Willoughby</dc:creator>
		
		<category><![CDATA[administration]]></category>

		<category><![CDATA[tools]]></category>

		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/08/02/init-script-for-ibm-websphere-mq-on-linux/</guid>
		<description><![CDATA[We&#8217;re pleased to announce the availability of SupportPac MSL1: WebSphere MQ for Linux - Automatic Startup.  It provides an init script which will start IBM WebSphere MQ queue managers when the system is started, and stop them cleanly when the system is shut down.
A configuration file allows system administrators to specify which local queue [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We&#8217;re pleased to announce the availability of SupportPac MSL1: WebSphere MQ for Linux - Automatic Startup.  It provides an init script which will start IBM WebSphere MQ queue managers when the system is started, and stop them cleanly when the system is shut down.</p>
<p>A configuration file allows system administrators to specify which local queue managers are to be controlled.  The default behaviour is to control all local queue managers.</p>
<p>The supplied init script assumes the existence of an LSB-compliant init system - RedHat users may need to install a RedHat-supplied RPM named lsb.rpm or redhat-lsb.rpm to meet this requirement.</p>
<p><a href="http://www-1.ibm.com/support/docview.wss?rs=171&amp;uid=swg24016554&amp;loc=en_US&amp;cs=utf-8&amp;lang=en">SupportPac MSL1 is available here</a></p>
<p>Once installed, see the man pages ibm.com-WebSphereMQ( <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> and ibm.com-WebSphereMQ(5) for details of its configuration.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/hursleyonwmq.wordpress.com/106/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/hursleyonwmq.wordpress.com/106/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hursleyonwmq.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hursleyonwmq.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hursleyonwmq.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hursleyonwmq.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hursleyonwmq.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hursleyonwmq.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hursleyonwmq.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hursleyonwmq.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hursleyonwmq.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hursleyonwmq.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hursleyonwmq.wordpress.com&blog=673735&post=106&subd=hursleyonwmq&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hursleyonwmq.wordpress.com/2007/08/02/init-script-for-ibm-websphere-mq-on-linux/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/philwilloughby-128.jpg" medium="image">
			<media:title type="html">Phil Willoughby</media:title>
		</media:content>
	</item>
		<item>
		<title>Using WebSphere MQ Explorer with SSL</title>
		<link>http://hursleyonwmq.wordpress.com/2007/07/30/using-websphere-mq-explorer-with-ssl/</link>
		<comments>http://hursleyonwmq.wordpress.com/2007/07/30/using-websphere-mq-explorer-with-ssl/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 05:29:54 +0000</pubDate>
		<dc:creator>Dale Lane</dc:creator>
		
		<category><![CDATA[Explorer]]></category>

		<category><![CDATA[administration]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[webspheremq]]></category>

		<guid isPermaLink="false">http://hursleyonwmq.wordpress.com/2007/07/30/using-websphere-mq-explorer-with-ssl/</guid>
		<description><![CDATA[I&#8217;ve posted before about setting up WebSphere MQ Explorer as a read-only viewer using setmqaut and MCAUSER ids - a post which has proved quite useful to some readers. 
A similar topic which seems to raise questions is using WebSphere MQ Explorer to administer remote queue managers where all server-connection channels are secured using SSL/TLS.
In [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve posted before about setting up <a href="http://hursleyonwmq.wordpress.com/2007/02/08/using-websphere-mq-explorer-as-a-read-only-viewer/">WebSphere MQ Explorer as a read-only viewer using setmqaut and MCAUSER ids</a> - a post which has proved quite useful to some readers. </p>
<p>A similar topic which seems to raise questions is using WebSphere MQ Explorer to administer remote queue managers where all server-connection channels are secured using SSL/TLS.</p>
<p>In this post, I will give some background about the issues surrounding using WMQ Explorer with SSL, and outline how it can be used with multiple queue managers.</p>
<p><span id="more-103"></span><br />
<font color="white">.</font></p>
<h2>Making client connections</h2>
<p>Let me start with a little background. To use WMQ Explorer with a remote queue manager, you create a client connection in WMQ Explorer to a server connection channel on the queue manager. </p>
<p>You can do this <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa12160_.htm">manually by putting the hostname and server-connection channel name in the Add Queue Manager wizard</a>. </p>
<p>Alternatively, if you need to specify more information you can use a <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzaf.doc/uchtab.htm">client channel definition table (CCDT)</a> : creating a client channel on a queue manager (specifying values for all the different attributes) and using the file it creates as the source of a channel definition.</p>
<p>If you want to use SSL, then you need to use some of the client channel SSL parameters (such as to identify an <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzae.doc/ic12040_.htm">SSL Cipher Specification</a> to use, matching the spec on both client and server ends of the channel). This means you need to use a CCDT to specify a connection for WMQ Explorer. </p>
<h3>Connections to multiple queue managers</h3>
<p>When using a WMQ Explorer to administer multiple queue managers on multiple remote servers, there are a number of general approaches, including:</p>
<ul>
<li>use <strong>a single CCDT file</strong>
<p> typically <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaf.doc/zcc1.htm#zcc1">a single queue manager on a development machine is used to create several client connection channels</a> - one to each of the queue managers to be administered with the WMQ Explorer. The single CCDT file created by that queue manager can be transferred to the system running the WMQ Explorer and used to define the connections to all remote queue managers.
</li>
<li>use <strong>multiple CCDT files</strong>
<p> <a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaf.doc/zcc2.htm#zcc2">creating both server and client connection channels on each remote queue manager</a> to be administered with WMQ Explorer, and using each of the CCDT files from them all.
</li>
</ul>
<p>Either way, WebSphere MQ Explorer does not store the client channel definition information itself, so it is important that a permament location for the CCDT file(s) is found before identifying a file to WMQ Explorer.</p>
<p><a href='http://hursleyonwmq.files.wordpress.com/2007/07/070730-wmqexplorerccdtprefs.gif' title='Identifying a CCDT file to WMQ Explorer'><img src='http://hursleyonwmq.files.wordpress.com/2007/07/070730-wmqexplorerccdtprefs.thumbnail.gif' alt='Identifying a CCDT file to WMQ Explorer' /></a>  </p>
<p><font color="white">.</font></p>
<h2>Locating the SSL certificate repositories</h2>
<p>Once the connection has been defined, the next step is to identify the repositories which will be used as the source of SSL certificates to authenticate the connection. </p>
<p>There are two main choices regarding authentication:</p>
<ul>
<li>
      Queue managers (servers) authenticate WMQ Explorer (client) only </p>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic12050_.htm">set <code>SSLCAUTH</code> to <code>OPTIONAL</code></a> on the queue managers&#8217; server-connection channel definition</li>
</ul>
</li>
<li>
      Queue managers (servers) authenticate WMQ Explorer (client), and WMQ Explorer authenticates queue managers </p>
<ul>
<li><a href="http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzae.doc/ic12050_.htm">set <code>SSLCAUTH</code> to <code>REQUIRED</code></a> on the queue managers&#8217; server-connection channel definition</li>
</ul>
</li>
</ul>
<p><font color="white">.</font></p>
<h3>
Creating key repositories and certificates<br />
</h3>
<p>It is outside the scope of this post to go into much detail about creating SSL certificates and repositories - but I have <a href="http://hursleyonwmq.wordpress.com/2007/02/05/an-introduction-to-ssl-configuration/">written about SSL before</a> if more background is needed. </p>
<p>The only major difference to note for our purposes here is that (as a Java application) <strong>SSL certificate repositories created for use by WMQ Explorer must be a Java Key Store - .jks file</strong>. </p>
<p>If creating a new key repository, use <code>-type jks</code> if creating the keystore using GSkit at a command prompt. </p>
<p>If the key repository has already been created in a different format, it can be converted to JKS using GSkit&#8217;s <code>-keydb -convert</code> command.</p>
<p><font color="white">.</font></p>
<h3>
Server authentication<br />
 </h3>
<p><strong>Queue Managers authenticating a connection from WMQ Explorer</strong></p>
<p>For server authentication only, the queue manager needs: </p>
<ul>
<li>The personal certificate issued to the queue manager by it&#8217;s CA (certificate authority)</li>
<li>The queue manager&#8217;s private key </li>
</ul>
<p>both of which will be contained in a key repository file (often key.kdb), identified by the queue manager&#8217;s <code>SSLKEYR</code> attribute.</p>
<p><font color="white">.</font></p>
<p>WebSphere MQ Explorer needs:</p>
<ul>
<li>The CA (certificate authority) certificate for the queue manager&#8217;s CA, or the personal certificate issued to the queue manager by it&#8217;s CA</li>
</ul>
<p>which should be stored in the key repository file (often key.jks), identified as the <strong>Trusted Certificate Store</strong> in the WMQ Explorer SSL Preferences. </p>
<p><a href='http://hursleyonwmq.files.wordpress.com/2007/07/070730-wmqexplorersslprefs.gif' title='WebSphere MQ Explorer - SSL Certificate Stores'><img src='http://hursleyonwmq.files.wordpress.com/2007/07/070730-wmqexplorersslprefs.thumbnail.gif' alt='WebSphere MQ Explorer - SSL Certificate Stores' /></a></p>
<p><font color="white">.</font></p>
<h3>
Client authentication<br />
</h3>
<p><strong>WMQ Explorer authenticating a connection to a queue manager</strong></p>
<p>For both server and client authentication, the queue manager needs: </p>
<ul>
<li>The personal certificate issued to the queue manager by it&#8217;s CA (certificate authority)</li>
<li>The queue manager&#8217;s private key </li>
<li>The CA (certificate authority) certificate for WMQ Explorer, or the personal certificate issued to WMQ Explorer by it&#8217;s CA</li>
</ul>
<p>all of which will be contained in a key repository file (o