<?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:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The ramblings of a yorkshire tyke &#187; spgennard</title>
	<atom:link href="http://www.gennard.net/blog/author/spgennard/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gennard.net/blog</link>
	<description>Life, Rants and Programming In A Blog</description>
	<lastBuildDate>Sat, 10 Jul 2010 23:04:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Survey</title>
		<link>http://www.gennard.net/blog/2010/07/survey/</link>
		<comments>http://www.gennard.net/blog/2010/07/survey/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 23:04:37 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=627</guid>
		<description><![CDATA[There are no surveys to display.]]></description>
			<content:encoded><![CDATA[<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/07/survey/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extending Visual COBOL 2010</title>
		<link>http://www.gennard.net/blog/2010/07/extending-visual-cobol-2010/</link>
		<comments>http://www.gennard.net/blog/2010/07/extending-visual-cobol-2010/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 20:08:38 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[CLR]]></category>
		<category><![CDATA[COBOL]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[VisualCOBOL2010]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Spell Checker]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=610</guid>
		<description><![CDATA[One of the many great reasons for choosing Microsoft Visual Studio 2010 as our development platform for Visual COBOL 2010 is it ability to be extended&#8230; which we have done but you equally use third party extensions too. One of my favourite extensions is the spell checker for the editor, which is great for pointing [...]]]></description>
			<content:encoded><![CDATA[<p>One of the many great reasons for choosing Microsoft Visual Studio 2010 as our development platform for Visual COBOL 2010 is it ability to be extended&#8230; which we have done but you equally use third party extensions too.</p>
<p>One of my favourite extensions is the spell checker for the editor, which is great for pointing out spelling mistakes, which for me can only be a good thing <img src='http://www.gennard.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>To install the extension, it is as simple as downloading it, clicking on the downloaded file, restarting Visual Studio and using it.</p>
<p>The spell checker I use with Visual COBOL 2010 is:</p>
<p><a href="http://visualstudiogallery.msdn.microsoft.com/en-us/7c8341f1-ebac-40c8-92c2-476db8d523ce">http://visualstudiogallery.msdn.microsoft.com/en-us/7c8341f1-ebac-40c8-92c2-476db8d523ce</a></p>
<p>For those interested, here it is in action&#8230;</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="800" height="600" id="test1"><param name="movie" value="http://www.gennard.net/blog/wp-content/uploads/2010/07/2010-07-01_1558.swf" /><embed src="http://www.gennard.net/blog/wp-content/uploads/2010/07/2010-07-01_1558.swf" width="800" height="600" name="test1" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/07/extending-visual-cobol-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Method Chaining</title>
		<link>http://www.gennard.net/blog/2010/05/method-chaining/</link>
		<comments>http://www.gennard.net/blog/2010/05/method-chaining/#comments</comments>
		<pubDate>Thu, 27 May 2010 23:50:09 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[CLR]]></category>
		<category><![CDATA[COBOL]]></category>
		<category><![CDATA[cobol.net]]></category>
		<category><![CDATA[method-chaining]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Visual COBOL]]></category>
		<category><![CDATA[visualcobol]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=591</guid>
		<description><![CDATA[Creating objects with a complex constructor can be a bit of a pain in any language. One technique I have used is method chaining. It is not applicable to every type of class but it can be useful. Method chain can help simply the use class and allows more complex object initialisation without having to [...]]]></description>
			<content:encoded><![CDATA[<p>Creating objects with a complex constructor can be a bit of a pain in any language.     One technique I have used is method chaining.  It is not applicable to every type of class but it can be useful.</p>
<p>Method chain can help simply the use class and allows more complex object initialisation without having to worry about the order of the parameters and be done inline.</p>
<p>Consider the use of an &#8220;Account&#8221; class that takes Name, Address, Telephone and Country.  All of which are strings, the constructor with four strings would not be a great constructor.  </p>
<p>So you could have a simple constructor and four properties/methods.. however so set up the object would mean you have spread the setup over multiple lines.</p>
<p>Using method chain you can overcome this and even space in the &#8220;value&#8221; area of the object in your storage area.</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-weight: bold;">set</span> x <span style="color: #000000; font-weight: bold;">to</span> new <span style="color: #008000; font-weight: bold;">type</span> Account::Name<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;xx&quot;</span><span style="color: #339933;">&#41;</span>::<span style="color: #008000; font-weight: bold;">Address</span><span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;yy&quot;</span><span style="color: #339933;">&#41;</span> ::Telephone<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;yy&quot;</span><span style="color: #339933;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;::Country<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;zz&quot;</span><span style="color: #339933;">&#41;</span>::World<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Earth&quot;</span><span style="color: #339933;">&#41;</span></div></div>
<p>The trick of the pattern is to provide methods that always return this/self, so we can change the invokes together&#8230;    For example:</p>
<p>This technique could even be used to build up a series of items required, for example, the preparation and execution of a sql statement comes to mind&#8230; in a similar fashion to Linq.</p>
<p>So&#8230; lets look at an example:</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #a0a0a0; font-style: italic;">$set ilusing&quot;System.Collections.Generic&quot; </span><br />
<span style="color: #008000; font-weight: bold;">program-id</span><span style="color: #000066;">.</span> Program1 <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;MethodChaining1.Program1&quot;</span><span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">data</span> <span style="color: #008000; font-weight: bold;">division</span><span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">working-storage</span> <span style="color: #000080; font-weight: bold;">section</span><span style="color: #000066;">.</span><br />
01 accounts <span style="color: #008000; font-weight: bold;">type</span> <span style="color: #000080; font-weight: bold;">List</span><span style="color: #339933;">&#91;</span><span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #339933;">&#93;</span> <span style="color: #008000; font-weight: bold;">value</span> new <span style="color: #008000; font-weight: bold;">type</span> <span style="color: #000080; font-weight: bold;">List</span><span style="color: #339933;">&#91;</span><span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #339933;">&#93;</span><span style="color: #000066;">.</span> &nbsp; &nbsp; &nbsp;<br />
01 jAccount <span style="color: #008000; font-weight: bold;">type</span> Account <span style="color: #008000; font-weight: bold;">value</span><br />
&nbsp; &nbsp;new <span style="color: #008000; font-weight: bold;">type</span> Account::Name<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Mr Johnson&quot;</span><span style="color: #339933;">&#41;</span>::<span style="color: #008000; font-weight: bold;">Address</span><span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Somewhere, some place&quot;</span><span style="color: #339933;">&#41;</span><br />
&nbsp; &nbsp; ::Telephone<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;+44 1234 4321&quot;</span><span style="color: #339933;">&#41;</span><span style="color: #000066;">.</span><br />
01 sAccount <span style="color: #008000; font-weight: bold;">type</span> Account <span style="color: #008000; font-weight: bold;">value</span><br />
&nbsp; &nbsp;new <span style="color: #008000; font-weight: bold;">type</span> Account::Name<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Mr Smith&quot;</span><span style="color: #339933;">&#41;</span>::<span style="color: #008000; font-weight: bold;">Address</span><span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Nowhere place&quot;</span><span style="color: #339933;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;::Telephone<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;+44 1234 4321&quot;</span><span style="color: #339933;">&#41;</span>::Country<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Wales&quot;</span><span style="color: #339933;">&#41;</span><span style="color: #000066;">.</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
01 lAccount <span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span><span style="color: #000066;">.</span><br />
&nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> accounts::<span style="color: #000000; font-weight: bold;">Add</span><span style="color: #339933;">&#40;</span>jAccount<span style="color: #339933;">&#41;</span><br />
&nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> accounts::<span style="color: #000000; font-weight: bold;">Add</span><span style="color: #339933;">&#40;</span>sAccount<span style="color: #339933;">&#41;</span><br />
&nbsp;<br />
&nbsp;<span style="color: #000000; font-weight: bold;">perform</span> <span style="color: #000000; font-weight: bold;">varying</span> lAccount <span style="color: #008000; font-weight: bold;">through</span> accounts<br />
&nbsp; <span style="color: #000000; font-weight: bold;">display</span> lAccount<br />
&nbsp;<span style="color: #000000; font-weight: bold;">end-perform</span><br />
<br />
&nbsp;<span style="color: #000000; font-weight: bold;">goback</span><span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">program</span><span style="color: #000066;">.</span></div></div>
<p>WIth the class being:</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000; font-weight: bold;">class-id</span> Account<span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">working-storage</span> <span style="color: #000080; font-weight: bold;">section</span><span style="color: #000066;">.</span><br />
01 wName &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">string</span> property <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;Name&quot;</span><span style="color: #000066;">.</span><br />
01 wAddres &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">string</span> property <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;Address&quot;</span><span style="color: #000066;">.</span><br />
01 wCountry &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">string</span> property <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;Country&quot;</span><span style="color: #000066;">.</span><br />
01 wTelephone &nbsp;<span style="color: #008000; font-weight: bold;">string</span> property <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;Telephone&quot;</span><span style="color: #000066;">.</span><br />
01 wEmail &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">string</span> property <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #ff0000;">&quot;Email&quot;</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> New<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">local-storage</span> <span style="color: #000080; font-weight: bold;">section</span><span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span><span style="color: #000066;">.</span><br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> wCountry <span style="color: #000000; font-weight: bold;">to</span> <span style="color: #008000; font-weight: bold;">type</span> System<span style="color: #000066;">.</span>Globalization<span style="color: #000066;">.</span>RegionInfo::CurrentRegion::DisplayName<br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> Name public<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span> <span style="color: #008000; font-weight: bold;">using</span> uName <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">string</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ret <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #000066;">.</span><br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> self::Name <span style="color: #000000; font-weight: bold;">to</span> uName<br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> ret <span style="color: #000000; font-weight: bold;">to</span> self<br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> <span style="color: #008000; font-weight: bold;">Address</span> public<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span> <span style="color: #008000; font-weight: bold;">using</span> uAddress <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">string</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ret <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #000066;">.</span><br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> self::<span style="color: #008000; font-weight: bold;">Address</span> <span style="color: #000000; font-weight: bold;">to</span> uAddress<br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> ret <span style="color: #000000; font-weight: bold;">to</span> self<br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> Telephone public<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span> <span style="color: #008000; font-weight: bold;">using</span> uTelephone <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">string</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ret <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #000066;">.</span><br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> self::<span style="color: #008000; font-weight: bold;">Address</span> <span style="color: #000000; font-weight: bold;">to</span> uTelephone<br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> ret <span style="color: #000000; font-weight: bold;">to</span> self<br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> Email public<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span> <span style="color: #008000; font-weight: bold;">using</span> uEmail <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">string</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ret <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #000066;">.</span><br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> self::<span style="color: #008000; font-weight: bold;">Address</span> <span style="color: #000000; font-weight: bold;">to</span> uEmail<br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> ret <span style="color: #000000; font-weight: bold;">to</span> self<br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> Country public<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span> <span style="color: #008000; font-weight: bold;">using</span> uCountry <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">string</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ret <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">type</span> Account<span style="color: #000066;">.</span><br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> self::Country <span style="color: #000000; font-weight: bold;">to</span> uCountry<br />
&nbsp; <span style="color: #008000; font-weight: bold;">set</span> ret <span style="color: #000000; font-weight: bold;">to</span> self<br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<br />
<span style="color: #008000; font-weight: bold;">method-id</span> ToString public override<span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span> <span style="color: #000000; font-weight: bold;">returning</span> ret <span style="color: #008000; font-weight: bold;">as</span> <span style="color: #008000; font-weight: bold;">string</span><span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">set</span> ret <span style="color: #000000; font-weight: bold;">to</span> <span style="color: #008000; font-weight: bold;">String</span>::Format<span style="color: #339933;">&#40;</span><span style="color: #ff0000;">&quot;Name:{0}, Address:{1}, Telephone:{2}, Email:{3}, Country:{4}&quot;</span><span style="color: #000066;">,</span> <br />
&nbsp; &nbsp; &nbsp;self::Name<span style="color: #000066;">,</span> self::<span style="color: #008000; font-weight: bold;">Address</span><span style="color: #000066;">,</span> self::Telephone<span style="color: #000066;">,</span><br />
&nbsp; &nbsp; &nbsp;self::Email<span style="color: #000066;">,</span> self::Country<span style="color: #339933;">&#41;</span><br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">method</span><span style="color: #000066;">.</span><br />
<span style="color: #008000; font-weight: bold;">end</span> <span style="color: #008000; font-weight: bold;">class</span><span style="color: #000066;">.</span></div></div>
<p>Which when run with Visual COBOL gives: </p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Name:Mr Johnson, Address:+44 1234 4321, Telephone:, Email:, Country:United Kingdom<br />
Name:Mr Smith, Address:+44 1234 4321, Telephone:, Email:, Country:Wales</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/05/method-chaining/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Life under the dust cloud</title>
		<link>http://www.gennard.net/blog/2010/04/life-under-the-dust-cloud/</link>
		<comments>http://www.gennard.net/blog/2010/04/life-under-the-dust-cloud/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 07:20:16 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[COBOL]]></category>
		<category><![CDATA[India]]></category>
		<category><![CDATA[TechEd]]></category>
		<category><![CDATA[cobolator]]></category>
		<category><![CDATA[Microsoft india 2010]]></category>
		<category><![CDATA[palaces]]></category>
		<category><![CDATA[photos]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=585</guid>
		<description><![CDATA[The week before last I attended Microsoft TechEd here in India, which was a great success. I especially liked my boss &#8220;The COBOLATOR&#8220;, who did a great talk about his experiences with Microsoft and his views on using COBOL. This combined we another great talk by Paul/PaulA and Mark about how COBOL is everywhere and [...]]]></description>
			<content:encoded><![CDATA[<p>The week before last I attended Microsoft TechEd here in India, which was a great success.</p>
<p> I especially liked my boss &#8220;The <a href="http://www.cobol.se/Cobolator.html">COBOLATOR</a>&#8220;, who did a great talk about his experiences with Microsoft and his views on using COBOL.   This combined we another great talk by Paul/PaulA and Mark about how COBOL is everywhere and how Visual COBOL can seriously help you take advantage of existing COBOL code as well as showing how great COBOL is for new development made a great conference.</p>
<p>When I was not seeing my colleagues perform on stage, I was at our stand meeting people and I have to say the people at the conference were amazingly friendly and very happy to talk mere developer such as myself.   It was honestly refreshing to meet such open minded people with a honest interest in using Microsoft technology to its fullest.</p>
<p>Well that was then and now; me and several of my colleagues are trying to get home to the UK but due to the dust cloud caused by the Icelandic volcano we are stranded here.   However rather than going completely insane, we have tried to keep busy doing some work and visiting some local sites.</p>
<p>To that end, I have placed some of my photo’s from, these can be found [<a href="http://cid-cf721f64506e6226.skydrive.live.com/browse.aspx/.Public/India/India%20-%20Bangalore/Gardens%20and%20Palaces">Here</a>]. </p>
<p>I hope you find them interesting and thank goodness for the SkyDrive in the cloud <img src='http://www.gennard.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/04/life-under-the-dust-cloud/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iRiver Story firmware 1.71 + update</title>
		<link>http://www.gennard.net/blog/2010/04/iriver-story-firmware-1-71/</link>
		<comments>http://www.gennard.net/blog/2010/04/iriver-story-firmware-1-71/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 19:51:30 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[firmware]]></category>
		<category><![CDATA[iriver]]></category>
		<category><![CDATA[iriver story]]></category>
		<category><![CDATA[iriver story firmware]]></category>
		<category><![CDATA[iriver story firmware 1.71]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=569</guid>
		<description><![CDATA[Note: Updated since original post &#8211; see updates at the end of blog post I noticed yesterday that &#8220;Doren Katz&#8221; over @ http://doronkatz.com/iriver-story-firmware-171-update has found a firmware upgrade for the iRiver story. However, I failed to find the original download on any of the korean, china or japan iriver websites but non the less downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>Note: Updated since original post &#8211; see updates at the end of blog post</p>
<p>I noticed yesterday that &#8220;Doren Katz&#8221; over @ <a href=" http://doronkatz.com/iriver-story-firmware-171-update">http://doronkatz.com/iriver-story-firmware-171-update</a> has found a firmware upgrade for the iRiver story.</p>
<p>However, I failed to find the original download on any of the korean, china or japan iriver websites but non the less downloaded I downloaded it myself to have a look but rather than installing I decided to have a peek inside the ebook.hex file.</p>
<p>Firstly, this is really a .zip file with a false 128byte header, so its time to get the swiss-army does everything with files utility out and strip the header off with:</p>
<div class="codecolorer-container bash blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color: #c20cb9; font-weight: bold;">dd</span> <span style="color: #000000; font-weight: bold;">if</span>=ebook.hex <span style="color: #007800;">of</span>=ebook.zip <span style="color: #007800;">bs</span>=128 <span style="color: #007800;">skip</span>=<span style="color: #000000;">1</span></div></div>
<p>Next, lets look for what has changed between the different version&#8217;s, so as &#8220;unzip&#8221; includes the crc check for each file, we just need to create a text file with the files in sorted order with the appropriate crc check included.  I used a combination of unzip/awk/sort</p>
<div class="codecolorer-container bash blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #660033;">-v</span> ebook.zip <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $8, $7 }'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sort</span> <span style="color: #000000; font-weight: bold;">&gt;</span>ebook.17.txt</div></div>
<p>I did this for the ebook.hex from Doren&#8217;s site and the official 1.61 file.</p>
<p>So, what can I deduce from the update&#8230;</p>
<li>Russian support has been added</li>
<li>New files for wifi support have been added</li>
<li>New files include words &#8220;activate&#8221;/&#8221;deactivate&#8221;&#8230;.?</li>
<li>New files include words &#8220;net[2].png&#8221;</li>
<li>Adobe DRM support, Battery, book, mp3 player, comic and diary programs have changed</li>
<p>The big question is&#8230;.. should I install it?</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">6,12c6,12<br />
&lt; /app/Jmp3_player_copy dae2fc2f<br />
&lt; /app/adoberm.feb 4f1e60d8<br />
&lt; /app/battery.feb 724b81b7<br />
&lt; /app/book2pngd 8aa7a959<br />
&lt; /app/comic.feb 4890784e<br />
&lt; /app/diary.feb ff30e8e1<br />
&lt; /app/dictionary.feb 382ebe89<br />
---<br />
&gt; /app/Jmp3_player_copy 6a0faa48<br />
&gt; /app/adoberm.feb f674266f<br />
&gt; /app/battery.feb 7cdc4c54<br />
&gt; /app/book2pngd 17c806e5<br />
&gt; /app/comic.feb f6c6345f<br />
&gt; /app/diary.feb 25659da7<br />
&gt; /app/dictionary.feb 781e20e2<br />
14c14,15<br />
&lt; /app/fw_upgrade.feb 9b08005f<br />
---<br />
&gt; /app/flowdjvu.feb 95170f69<br />
&gt; /app/fw_upgrade.feb a977653a<br />
90a92,93<br />
&gt; /app/gui/dictionary/b7_language_ru.png 4ce08345<br />
&gt; /app/gui/dictionary/b7_language_ru_dim.png 3ab9d628<br />
179a183,189<br />
&gt; /app/gui/library/b2_top_icon_wifi_1.png fb4ce084<br />
&gt; /app/gui/library/b2_top_icon_wifi_2.png fe60db45<br />
&gt; /app/gui/library/b2_top_icon_wifi_3.png e9cdac53<br />
&gt; /app/gui/library/b2_top_icon_wifi_4.png d9a0fdfd<br />
&gt; /app/gui/library/b2_top_icon_wifi_5.png ed8c4569<br />
&gt; /app/gui/library/b2_top_icon_wifi_connect.png db8fe801<br />
&gt; /app/gui/library/b2_top_icon_wifi_fail.png 3e734ff4<br />
216a227<br />
&gt; /app/gui/meta/a1_adobe_popup.png 25262eb5<br />
253c264<br />
&lt; /app/gui/meta/a1_intro_logo.png d1e5db2b<br />
---<br />
&gt; /app/gui/meta/a1_intro_logo.png a491fb66<br />
296a308<br />
&gt; /app/gui/meta/a1_main_kr_2nd_10.png 7c2e457a<br />
376a389<br />
&gt; /app/gui/meta/blank.png 38292862<br />
398c411<br />
&lt; /app/gui/setting/b8_2depth_bg_05.png 4b7c4a52<br />
---<br />
&gt; /app/gui/setting/b8_2depth_bg_05.png 1763b35d<br />
405a419,423<br />
&gt; /app/gui/setting/b8_List_check.png 9fd674fc<br />
&gt; /app/gui/setting/b8_ade_activate.png 04751fb2<br />
&gt; /app/gui/setting/b8_ade_deactivate.png 96ae1647<br />
&gt; /app/gui/setting/b8_back.png 0eb541b8<br />
&gt; /app/gui/setting/b8_box.png 0a225807<br />
408a427,437<br />
&gt; /app/gui/setting/b8_level0.png ee96b67a<br />
&gt; /app/gui/setting/b8_level1.png 43455e96<br />
&gt; /app/gui/setting/b8_level2.png 0d10f8fc<br />
&gt; /app/gui/setting/b8_level3.png c075afa1<br />
&gt; /app/gui/setting/b8_level4.png 12a25883<br />
&gt; /app/gui/setting/b8_line.png 57fe49fe<br />
&gt; /app/gui/setting/b8_linegray.png 15001b71<br />
&gt; /app/gui/setting/b8_linepoint.png f3b228d5<br />
&gt; /app/gui/setting/b8_lock.png d3b59bc1<br />
&gt; /app/gui/setting/b8_net.png 0f4cda3e<br />
&gt; /app/gui/setting/b8_net2.png c4098194<br />
411a441,444<br />
&gt; /app/gui/setting/b8_smallcor.png 9b4d9088<br />
&gt; /app/gui/setting/b8_white_bg.png 725ec4ba<br />
&gt; /app/gui/setting/wifi_popup_1.png 926677b1<br />
&gt; /app/gui/setting/wifi_popup_2.png 46f9fee6<br />
428,443c461<br />
&lt; /app/memo 00000000<br />
&lt; /app/memo.feb 1646263a<br />
&lt; /app/memo/2009.03.07.Tue.am.11.15.50.m.txt b36689a0<br />
&lt; /app/memo/2009.04.01.Wed.pm.03.02.50.v.txt d20aa03c<br />
&lt; /app/memo/2009.04.22.Sat.pm.09.26.32.m.txt 379ceda0<br />
&lt; /app/memo/2009.04.25.Tue.am.11.27.55.m.txt 69a13eaf<br />
&lt; /app/memo/2009.04.30.Thu.am.01.04.17.v.txt d0ca0e8e<br />
&lt; /app/memo/2009.06.19.Fri.am.10.05.05.m.txt 04f06997<br />
&lt; /app/memo/2009.06.19.Fri.am.10.43.02.v.txt 893aa55e<br />
&lt; /app/memo/2009.06.22.Mon.pm.11.02.06.m.txt 833f50f3<br />
&lt; /app/memo/2009.06.27.Sat.pm.08.40.01.v.txt 6ccefec5<br />
&lt; /app/memo/2009.06.30.Tue.pm.01.45.05.v.txt 893aa55e<br />
&lt; /app/memo/2009.06.30.Tue.pm.01.46.03.v.txt 893aa55e<br />
&lt; /app/memo/test_01.txt 01361e77<br />
&lt; /app/memo/test_02.txt a72b03e7<br />
&lt; /app/memo/test_03.txt 6ded434e<br />
---<br />
&gt; /app/memo.feb f74f0cd8<br />
445,469c463,487<br />
&lt; /app/menu/mstring_chn_bun.xml 5edcdbaa<br />
&lt; /app/menu/mstring_chn_gan.xml 866b83af<br />
&lt; /app/menu/mstring_cze.xml f3753a46<br />
&lt; /app/menu/mstring_eng.xml 03655fa5<br />
&lt; /app/menu/mstring_esp.xml 6c3c3235<br />
&lt; /app/menu/mstring_fra.xml 0a94ed52<br />
&lt; /app/menu/mstring_ger.xml 1ccb1a09<br />
&lt; /app/menu/mstring_ita.xml 32079d5d<br />
&lt; /app/menu/mstring_jpn.xml 07c0942d<br />
&lt; /app/menu/mstring_kor.xml e5f3026a<br />
&lt; /app/menu/mstring_ned.xml c9475bd4<br />
&lt; /app/menu/mstring_pol.xml 227f5b6e<br />
&lt; /app/menu/mstring_rom.xml 73773188<br />
&lt; /app/menu/mstring_rus.xml c1a98068<br />
&lt; /app/menu/mstring_swe.xml 692f1666<br />
&lt; /app/menu/mstring_tur.xml 0fc0f613<br />
&lt; /app/music.feb 958c784c<br />
&lt; /app/mybook.feb 18b604cc<br />
&lt; /app/officev.feb fe8a2a0a<br />
&lt; /app/record.feb a60ca3d2<br />
&lt; /app/setting.feb f3df4f7b<br />
&lt; /app/sleep.feb 908aa125<br />
&lt; /app/start.feb bec9f5fc<br />
&lt; /app/textv.feb 4bccd791<br />
&lt; /flow_copy 91a64728<br />
---<br />
&gt; /app/menu/mstring_chn_bun.xml 32514995<br />
&gt; /app/menu/mstring_chn_gan.xml fc16c921<br />
&gt; /app/menu/mstring_cze.xml 060d4e95<br />
&gt; /app/menu/mstring_eng.xml 901e3399<br />
&gt; /app/menu/mstring_esp.xml 93ccd5ee<br />
&gt; /app/menu/mstring_fra.xml 72e85228<br />
&gt; /app/menu/mstring_ger.xml ec8509ad<br />
&gt; /app/menu/mstring_ita.xml d419b1e6<br />
&gt; /app/menu/mstring_jpn.xml 3612c90b<br />
&gt; /app/menu/mstring_kor.xml 58211d44<br />
&gt; /app/menu/mstring_ned.xml d42b8f79<br />
&gt; /app/menu/mstring_pol.xml f26e6a3e<br />
&gt; /app/menu/mstring_rom.xml 30f0eced<br />
&gt; /app/menu/mstring_rus.xml ce84b1c2<br />
&gt; /app/menu/mstring_swe.xml 93cb5772<br />
&gt; /app/menu/mstring_tur.xml ef70fff1<br />
&gt; /app/music.feb 9f5cf3ed<br />
&gt; /app/mybook.feb 0435904d<br />
&gt; /app/officev.feb e8aa5396<br />
&gt; /app/record.feb 32162b61<br />
&gt; /app/setting.feb 5defea8b<br />
&gt; /app/sleep.feb e643465b<br />
&gt; /app/start.feb c92d3234<br />
&gt; /app/textv.feb ec5cc8ec<br />
&gt; /flow_copy 4d2a5c88<br />
477c495,497<br />
&lt; /font/langpack_cjk.dat 721019b0<br />
---<br />
&gt; /font/langpack_cjk.dat 390c4e98<br />
&gt; /lib 00000000<br />
&gt; /lib/iconv.flb 7813fea9<br />
479c499<br />
&lt; /rootfs.cramfs c9b5dd2c<br />
---<br />
&gt; /rootfs.cramfs 1b2ef996<br />
488,489c508,509<br />
&lt; /system/setting/chi/setting.xml 90cd38ed<br />
&lt; /system/setting/chi/setting_org.xml 90cd38ed<br />
---<br />
&gt; /system/setting/chi/setting.xml 6eae4e12<br />
&gt; /system/setting/chi/setting_org.xml 6eae4e12<br />
493,499c513,514<br />
&lt; /system/setting/eng/setting.xml 37975967<br />
&lt; /system/setting/eng/setting_org.xml 37975967<br />
&lt; /system/setting/hkg 00000000<br />
&lt; /system/setting/hkg/keylang.xml a21af0d2<br />
&lt; /system/setting/hkg/keylang_org.xml a21af0d2<br />
&lt; /system/setting/hkg/setting.xml 78044006<br />
&lt; /system/setting/hkg/setting_org.xml 78044006<br />
---<br />
&gt; /system/setting/eng/setting.xml 9c584ec3<br />
&gt; /system/setting/eng/setting_org.xml 9c584ec3<br />
503,504c518,519<br />
&lt; /system/setting/kor/setting.xml d5bdd61b<br />
&lt; /system/setting/kor/setting_org.xml d5bdd61b<br />
---<br />
&gt; /system/setting/kor/setting.xml 38cbefde<br />
&gt; /system/setting/kor/setting_org.xml 38cbefde<br />
508,511c523,526<br />
&lt; /system/setting/rus/setting.xml df5e218c<br />
&lt; /system/setting/rus/setting_org.xml df5e218c<br />
&lt; /u-boot.bin 3a6b0079<br />
&lt; /zImage 908756fe<br />
---<br />
&gt; /system/setting/rus/setting.xml 29a221fa<br />
&gt; /system/setting/rus/setting_org.xml 29a221fa<br />
&gt; /u-boot.bin adee774f<br />
&gt; /zImage 16e8b673</div></div>
<p><b>Update</b> &#8211; Original link to firmware found @ <a href="http://zone.iriver.co.kr/service/cs_down.aspx?pGroup=8&#038;pName=Story&#038;Cate=1&#038;VIdx=1&#038;idx=1217">http://zone.iriver.co.kr/service/cs_down.aspx?pGroup=8&#038;pName=Story&#038;Cate=1&#038;VIdx=1&#038;idx=1217</a></b</p>
<p><b>Update -2</b></p>
<p>A very quick translation, gives us the following&#8230;</p>
<li>Djvu files support the function lower part from Story products.</li>
<li>Bookmark</li>
<li> Magnification (4 phases) &#8211; Functions in advance Popup (the case where the advance contents is loaded)</li>
<li>Ability to set the time with timezone</li>
<p>Fixes include:</p>
<li>ZIP file use at the time of pages amended the case malfunction part which will press long from comic view [e]. </li>
<li>The part DOCX file use at the time of document sees, amended an error part. (From firmware 1.70 amendment)</li>
<li>When page pressing long, amended the part which goes wrong. (From firmware 1.70 amendment)</li>
<li>Relation of hot key configuration feature amended the part which goes wrong. (From firmware 1.70 amendment)</li>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/04/iriver-story-firmware-1-71/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Visual COBOL @ Microsoft Teched</title>
		<link>http://www.gennard.net/blog/2010/03/visual-cobol-teched/</link>
		<comments>http://www.gennard.net/blog/2010/03/visual-cobol-teched/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 21:23:17 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[COBOL]]></category>
		<category><![CDATA[TechEd]]></category>
		<category><![CDATA[cobol.net]]></category>
		<category><![CDATA[micro focus cobol]]></category>
		<category><![CDATA[Microsoft india 2010]]></category>
		<category><![CDATA[microsoft teched india]]></category>
		<category><![CDATA[microsoft teched india 2010]]></category>
		<category><![CDATA[microsoft teched las vegas]]></category>
		<category><![CDATA[Visual COBOL]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=557</guid>
		<description><![CDATA[The last couple of weeks have been very busy and it has unfortunately affected the amount of blog entries I have done but the good news I have plenty of new material.. So, what&#8217;s my excuse.. Well we have been counting down the internal builds of Visual COBOL and we are pretty much ready to [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of weeks have been very busy and it has unfortunately affected the amount of blog entries I have done but the good news I have plenty of new material..</p>
<p>So, what&#8217;s my excuse.. Well we have been counting down the internal builds of <a href="http://vs2010.microfocus.com/visual-cobol.html">Visual COBOL</a> and we are pretty much ready to ship which is a relief since we are going to launching it at the <i>Microsoft’s Visual Studio launch parties in Las Vegas and TechEd in Bangalore April 12-14</i>.</p>
<p>Personally for me I am quite excited because I will be going to Teched in Bangalore to help show off Visual COBOL.</p>
<p>If would like a look at some of the Visual Studio 2010 integration Micro Focus has is about to release, pop along to <a href="http://www.microsoftteched.in/">http://vs2010.microfocus.com/</a> and see for yourself.   Better still, have a visit to teched <img src='http://www.gennard.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I will finish the silly little blog with a link to a demo of Visual COBOL.  Just because I&#8217;m proud of it&#8230;</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/-1Pi0rxjk3Y&#038;hl=en_US&#038;fs=1&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-1Pi0rxjk3Y&#038;hl=en_US&#038;fs=1&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>ref: <a href="http://www.microsoftteched.in/">http://www.microsoftteched.in/</a><br />
 and <a href="http://www.microsoft.com/visualstudio/en-gb/products/2010/default.mspx">http://www.microsoft.com/visualstudio/en-gb/products/2010/default.mspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/03/visual-cobol-teched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building rsync for the pogoplug</title>
		<link>http://www.gennard.net/blog/2010/03/building-rsync-for-the-pogoplug/</link>
		<comments>http://www.gennard.net/blog/2010/03/building-rsync-for-the-pogoplug/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 23:15:09 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[pogoplug]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[arm-linux]]></category>
		<category><![CDATA[arm-none-linux-gnueabi-gcc]]></category>
		<category><![CDATA[cross compile]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=542</guid>
		<description><![CDATA[I finally managed to get a cross compiler that works with the pogoplug, I first tried various custom build of the GNU C++ cross compiler on the Mac but none of them succeeded in creating binaries that were compatible with my little pink pogoplug. Anyway, instead of boring you with various evening&#8217;s development woos&#8230; I [...]]]></description>
			<content:encoded><![CDATA[<p>I finally managed to get a cross compiler that works with the pogoplug, I first tried various custom build of the GNU C++ cross compiler on the Mac but none of them succeeded in creating binaries that  were compatible with my little pink pogoplug.</p>
<p>Anyway, instead of boring you with various evening&#8217;s development woos&#8230; I will just tell you what I ended up doing which was to use VirtuaBox with ubuntu x86 and use <a href="http://pogoplug.com/opensource/pogoplug-gcc.tar.bz2">this tar file</a> (eg: bunzip2 it, tar xvf into $HOME)</p>
<p>Then to compile it I first had to setup the makefile for rsync:</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># export PATH=$HOME/pogoplug-gcc/bin:$PATH<br />
# CC=arm-none-linux-gnueabi-gcc ./configure --build=arm-linux\<br />
&nbsp;--host=arm-none-linux-gnueabi --target=arm-linux</div></div>
<p>Then to build is was easy&#8230; I just did&#8230;</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># CC=arm-none-linux-gnueabi-gcc &nbsp;make</div></div>
<p>Next, I found a small USB thumb drive, formatted in ext3 using ubuntu, placed it into the pogoplug, logged into it, remount&#8217;ed the drives using:</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mount -o remount exec /tmp/.cemnt/mnt_sdb1</div></div>
<p>You may need to change the mnt point, use mount to find it..</p>
<p>Now you will be able to use rsync via ssh and use &#8211;rsync-path to point to rsync on your ext3 drive.</p>
<p>I required, I make the rsync exe + md5 sum available&#8230; just shout!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/03/building-rsync-for-the-pogoplug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aperture 3 has been updated for Olympus E-P1/Olympus E-P2</title>
		<link>http://www.gennard.net/blog/2010/03/aperture-3-has-been-updated-for-olympus-e-p1olympus-e-p2/</link>
		<comments>http://www.gennard.net/blog/2010/03/aperture-3-has-been-updated-for-olympus-e-p1olympus-e-p2/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 00:40:52 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[Aperture]]></category>
		<category><![CDATA[Olympus]]></category>
		<category><![CDATA[Aperture 3]]></category>
		<category><![CDATA[ep-1]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=538</guid>
		<description><![CDATA[I am now officially tickle pink with excitement&#8230; Here is what my Apple Software update said: Digital Raw Compatibility Update: This update extends RAW image compatibility for Aperture 3 and iPhoto ’09 for the following cameras: Hasselblad H3DII-50 Leica M9 Leica X1 Olympus E-P1 Olympus E-P2 Panasonic Lumix DMC-GF1 Pentax K-7 Pentax K-x Sony Alpha [...]]]></description>
			<content:encoded><![CDATA[<p>I am now officially tickle pink with excitement&#8230;</p>
<p>Here is what my Apple Software update said:</p>
<blockquote><p>
Digital Raw Compatibility Update:</p>
<p>This update extends RAW image compatibility for Aperture 3 and iPhoto ’09 for the following cameras:</p>
<p>Hasselblad H3DII-50<br />
Leica M9<br />
Leica X1<br />
Olympus E-P1<br />
Olympus E-P2<br />
Panasonic Lumix DMC-GF1<br />
Pentax K-7<br />
Pentax K-x<br />
Sony Alpha DSLR-A500<br />
Sony Alpha DSLR-A550<br />
Sony Alpha DSLR-A850
</p></blockquote>
<p>Thank you Apple!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/03/aperture-3-has-been-updated-for-olympus-e-p1olympus-e-p2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>passwd: cannot update password file /etc/shadow</title>
		<link>http://www.gennard.net/blog/2010/02/pogoplug-passwd-cannot-update/</link>
		<comments>http://www.gennard.net/blog/2010/02/pogoplug-passwd-cannot-update/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 17:35:51 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[pogoplug]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=533</guid>
		<description><![CDATA[Okay.. I got my pogoplug last week and I have been playing around with it and it is now time to change the root password&#8230; so guess what happened&#8230;]]></description>
			<content:encoded><![CDATA[<p>Okay.. I got my <a href="http://www.pogoplug.com">pogoplug</a> last week and I have been playing around with it and it is now time to change the root password&#8230; so guess what happened&#8230;</p?</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bash-<span style="color: #000000;">3.2</span><span style="color: #666666; font-style: italic;"># passwd</span><br />
Changing password <span style="color: #000000; font-weight: bold;">for</span> root<br />
New password:<br />
Retype password:<br />
<span style="color: #c20cb9; font-weight: bold;">passwd</span>: cannot update password <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>shadow<br />
bash-<span style="color: #000000;">3.2</span><span style="color: #666666; font-style: italic;">#</span></div></div>
<p>The good news, the file system is read-only, so it was pretty simple to work around, just use mount&#8230;</p>
<div class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bash-<span style="color: #000000;">3.2</span><span style="color: #666666; font-style: italic;"># mount -o rw,remount /</span><br />
-bash-<span style="color: #000000;">3.2</span><span style="color: #666666; font-style: italic;"># passwd</span><br />
Changing password <span style="color: #000000; font-weight: bold;">for</span> root<br />
New password:<br />
Retype password:<br />
Password <span style="color: #000000; font-weight: bold;">for</span> root changed by root<br />
-bash-<span style="color: #000000;">3.2</span><span style="color: #666666; font-style: italic;"># mount -o ro,remount /</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/02/pogoplug-passwd-cannot-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Olympic gold medallist Amy Williams</title>
		<link>http://www.gennard.net/blog/2010/02/olympic-gold-medallist-amy-williams/</link>
		<comments>http://www.gennard.net/blog/2010/02/olympic-gold-medallist-amy-williams/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 23:30:25 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=528</guid>
		<description><![CDATA[Well Done Amy! &#8211; The picture is from Boston.com see link below: Amy Williams of Great Britain and Northern Ireland eyes the track ahead in the women&#8217;s skeleton run 2 on day 7 of the 2010 Vancouver Winter Olympics on February 18, 2010. (Clive Mason/Getty Images) re: http://www.boston.com/bigpicture/2010/02/vancouver_2010_part_1_of_2.html]]></description>
			<content:encoded><![CDATA[<p>Well Done Amy! &#8211; The picture is from Boston.com see link below:</p>
<p><img src="http://inapcache.boston.com/universal/site_graphics/blogs/bigpicture/v2010_02_19/v34_22245065.jpg" alt="Amy Williams" width="75%" height="75%"/></p>
<p>Amy Williams of Great Britain and Northern Ireland eyes the track ahead in the women&#8217;s skeleton run 2 on day 7 of the 2010 Vancouver Winter Olympics on February 18, 2010. (Clive Mason/Getty Images) </p>
<p>re: http://www.boston.com/bigpicture/2010/02/vancouver_2010_part_1_of_2.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/02/olympic-gold-medallist-amy-williams/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reflection and COBOL</title>
		<link>http://www.gennard.net/blog/2010/02/cobol-dotnet-reflection/</link>
		<comments>http://www.gennard.net/blog/2010/02/cobol-dotnet-reflection/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 22:56:01 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[CLR]]></category>
		<category><![CDATA[COBOL]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[cobol.net]]></category>
		<category><![CDATA[managed cobol]]></category>
		<category><![CDATA[reflection]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=525</guid>
		<description><![CDATA[For the last couple of months I have working on Visual Studio 2010 and this include Microsoft CLR v4 and I was recently asked how to write a test that determines at runtime which CLR is being used and what assemblies it uses. I replies would use reflection. So I dropped my friend a mega [...]]]></description>
			<content:encoded><![CDATA[<p>For the last couple of months I have working on Visual Studio 2010 and this include Microsoft CLR v4 and I was recently asked how to write a test that determines at runtime which CLR is being used and what assemblies it uses.   I replies would use reflection.   So I dropped my friend a mega simple demo&#8230; and here it is.</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a0a0a0; font-style: italic;">$set ilusing&quot;System.Reflection&quot;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; 01 myAssembly <span style="color: #008000; font-weight: bold;">type</span> <span style="color: #ff0000;">&quot;Assembly&quot;</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; 01 usedAssemblyName <span style="color: #008000; font-weight: bold;">type</span> <span style="color: #ff0000;">&quot;AssemblyName&quot;</span><span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">set</span> myAssembly <span style="color: #000000; font-weight: bold;">to</span> <span style="color: #008000; font-weight: bold;">type</span> <span style="color: #ff0000;">&quot;Assembly&quot;</span>::<span style="color: #ff0000;">&quot;GetExecutingAssembly&quot;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;My exe is &quot;</span> myAssembly::<span style="color: #ff0000;">&quot;FullName&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;and is using CLR &quot;</span> myAssembly::<span style="color: #ff0000;">&quot;ImageRuntimeVersion&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;and is loaded from &quot;</span> myAssembly::<span style="color: #ff0000;">&quot;Location&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;the initial method of this program was &quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; myAssembly::<span style="color: #ff0000;">&quot;EntryPoint&quot;</span>::<span style="color: #ff0000;">&quot;Name&quot;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;This assembly references -&gt; &quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">perform</span> <span style="color: #000000; font-weight: bold;">varying</span> usedAssemblyName<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">through</span> myAssembly::<span style="color: #ff0000;">&quot;GetReferencedAssemblies&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;-&gt; &quot;</span> usedAssemblyName<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">end-perform</span></div></div>
<p>And the output of the program is: </p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">My exe is clrver, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null<br />
and is using CLR v2.0.50727<br />
and is loaded from d:\clrver.exe<br />
the initial method of this program was _MF_ENTRYThis assembly references -&gt; <br />
-&gt; mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
-&gt; MicroFocus.COBOL.Runtime, Version=3.6.0.0, Culture=neutral, <br />
PublicKeyToken=0412c5e0b2aaa8f0</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/02/cobol-dotnet-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aperture 3 and Olympus EP-1</title>
		<link>http://www.gennard.net/blog/2010/02/aperture-3-and-olympus-ep-1/</link>
		<comments>http://www.gennard.net/blog/2010/02/aperture-3-and-olympus-ep-1/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 13:34:52 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[Aperture]]></category>
		<category><![CDATA[Olympus]]></category>
		<category><![CDATA[Aperture 3]]></category>
		<category><![CDATA[Olympus EP-1]]></category>
		<category><![CDATA[orf format]]></category>
		<category><![CDATA[raw format]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=522</guid>
		<description><![CDATA[As someone who really like Apple hardware and software I was extremely disapointed to find that the newly released Aperture 3 from Apple does not support Olympus EP-1 raw files.. All you get is&#8230; Come on Apple please sort it out and make Olympus PEN users happy!]]></description>
			<content:encoded><![CDATA[<p>As someone who really like Apple hardware and software I was extremely disapointed to find that the newly released Aperture 3 from Apple does not support Olympus EP-1 raw files..</p>
<p>All you get is&#8230;</p>
<p><a href="http://www.gennard.net/blog/wp-content/uploads/2010/02/2010-02-13_1305.png"><img class="alignnone size-medium wp-image-521" title="2010-02-13_1305" src="http://www.gennard.net/blog/wp-content/uploads/2010/02/2010-02-13_1305-300x188.png" alt="" width="300" height="188" /></a></p>
<p>Come on Apple please sort it out and make Olympus PEN users happy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/02/aperture-3-and-olympus-ep-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iRiver Story &#8211; Fonts</title>
		<link>http://www.gennard.net/blog/2010/02/iriver-story-fonts/</link>
		<comments>http://www.gennard.net/blog/2010/02/iriver-story-fonts/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 22:43:17 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[iriver]]></category>
		<category><![CDATA[iriver story]]></category>
		<category><![CDATA[iriver story fonts]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=518</guid>
		<description><![CDATA[The iRiver Story allows the user to install their own fonts, these fonts can truetype fonts (ones with the .ttf extensions). To install the fonts, connect  your iRiver Story device via your USB cable, then select mount/drive etc.. Then browse via your explorer/finder to the font&#8217;s directory and just drag/drop/copy the .ttf to it, then [...]]]></description>
			<content:encoded><![CDATA[<p>The iRiver Story allows the user to install their own fonts, these fonts can truetype fonts (ones with the .ttf extensions).</p>
<p>To install the fonts, connect  your iRiver Story device via your USB cable, then select mount/drive etc..</p>
<p>Then browse via your explorer/finder to the font&#8217;s directory and just drag/drop/copy the .ttf to it, then disconnect.</p>
<p>Then goto &#8216;Settings/Change Fonts&#8217;, then when goto your Diary/Memo the font will have take affect.</p>
<p>Unfortunately I can seem to make it work for pdf files!</p>
<p>Sample fonts i played with are:</p>
<ul>
<li>Android fonts aka <a href="http://damieng.com/blog/2007/11/14/droid-font-family-courtesy-of-google-ascender">Droid font family</a></li>
<li><a href="http://www.google.co.uk/search?hl=en&amp;q=Marydale+font&amp;btnG=Search&amp;meta=&amp;aq=f&amp;oq=">Marydale</a> fonts</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/02/iriver-story-fonts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Manual for British Gas RC Plus Thermostat</title>
		<link>http://www.gennard.net/blog/2010/01/manual-for-british-gas-rc-plus-thermostat/</link>
		<comments>http://www.gennard.net/blog/2010/01/manual-for-british-gas-rc-plus-thermostat/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 17:37:33 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[GAS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[British Gas RC Plus Thermostat]]></category>
		<category><![CDATA[RC PLus]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=511</guid>
		<description><![CDATA[I recently tried to find our manual for our &#8220;British Gas RC Plus Termostat&#8221; on the internet as we have lost our original manual. Anyway, after some research, I found they British Gas just re-badged them from Drayton Digistat and here is the links to the pages that contain the .pdfs&#8217;. http://www.gasapplianceguide.co.uk/DigistatPlus2.pdf http://www.draytoncontrols.co.uk/WorkArea/DownloadAsset.aspx?id=4235]]></description>
			<content:encoded><![CDATA[<p>I recently tried to find our manual for our &#8220;British Gas RC Plus Termostat&#8221; on the internet as we have lost our original manual.</p>
<p>Anyway, after some research, I found they British Gas just re-badged them from Drayton Digistat and here is the links to the pages that contain the .pdfs&#8217;.</p>
<p><a href="http://www.gasapplianceguide.co.uk/DigistatPlus2.pdf" target="_blank">http://www.gasapplianceguide.co.uk/DigistatPlus2.pdf</a><br />
<a href="http://www.draytoncontrols.co.uk/WorkArea/DownloadAsset.aspx?id=4235" target="_blank">http://www.draytoncontrols.co.uk/WorkArea/DownloadAsset.aspx?id=4235</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/manual-for-british-gas-rc-plus-thermostat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Application Architecture Guide, 2nd Edition</title>
		<link>http://www.gennard.net/blog/2010/01/microsoft-application-architecture-guide-2nd-edition/</link>
		<comments>http://www.gennard.net/blog/2010/01/microsoft-application-architecture-guide-2nd-edition/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 22:55:57 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[CLR]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[2nd Edition]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Microsoft Application Architecture Guide]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=506</guid>
		<description><![CDATA[Microsoft have just updated the &#8220;Application Architecture&#8221;.  I can&#8217;t say I have read it from cover to cover but it is being downloaded to my ebook reader&#8230; Microsoft Application Architecture Guide, 2nd Edition The guide helps you to: Understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft have just updated the &#8220;Application Architecture&#8221;.  I can&#8217;t say I have read it from cover to cover but it is being downloaded to my ebook reader&#8230;</p>
<blockquote>
<div><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ce40e4e1-9838-4c89-a197-a373b2a60df2&amp;DisplayLang=en">Microsoft Application Architecture Guide, 2nd Edition</a></div>
<p>The guide helps you to:</p>
<ul>
<li>Understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform and the .NET Framework.</li>
<li>Identify appropriate strategies and design patterns that will help you design your solution&#8217;s layers, components, and services.</li>
<li>Identify and address the key engineering decision points for your solution.</li>
<li>Identify and address the key quality attributes and crosscutting concerns for your solution.</li>
<li>Create a candidate baseline architecture for your solution.</li>
<li>Choose the right technologies for your solution.</li>
<li>Identify patterns &amp; practices solution assets and further guidance that will help you to implement your solution</li>
</ul>
</blockquote>
<p>The guide can be downloaded from: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ce40e4e1-9838-4c89-a197-a373b2a60df2&amp;DisplayLang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=ce40e4e1-9838-4c89-a197-a373b2a60df2&amp;DisplayLang=en</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/microsoft-application-architecture-guide-2nd-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Olympus E-P1 Firmware Update to version 1.2</title>
		<link>http://www.gennard.net/blog/2010/01/e-p1-firmware-update-1-2/</link>
		<comments>http://www.gennard.net/blog/2010/01/e-p1-firmware-update-1-2/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 00:06:15 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[Olympus]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[Olympus E-P1]]></category>
		<category><![CDATA[olympus firmware 1.2]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=503</guid>
		<description><![CDATA[My life seems to full of firmware updates, yesterday it was my iRiver Story ebook reader.. today I see my Olympus E-P1 camera which has been updated. To update you use the &#8220;Olympus Master 2&#8243; program, connect the cable from computer to camera.. click storage on the camera.. select camera&#8230; update and away you go&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>My life seems to full of firmware updates, yesterday it was my iRiver Story ebook reader.. today I see my Olympus E-P1 camera which has been updated.</p>
<p>To update you use the &#8220;Olympus Master 2&#8243; program, connect the cable from computer to camera.. click storage on the camera.. select camera&#8230; update and away you go&#8230;</p>
<p>If all goes well your camera should have the largest &#8220;OK&#8221; message on the LCD screen I seen in years&#8230;</p>
<p>Here is what they say has changed:</p>
<blockquote>
<h2>E-P1 Firmware Ver1.2 has incorporated the following upgrade.</h2>
<p><strong>[Modification]</strong></p>
<ul>
<li>Reduced time of the MF ASSIST enlarged display to improve operability.</li>
<li>REC VIEW enabled when the monitor&#8217;s backlight is set to off.</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/e-p1-firmware-update-1-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripting Languages and COBOL</title>
		<link>http://www.gennard.net/blog/2010/01/scripting-languages-and-cobol/</link>
		<comments>http://www.gennard.net/blog/2010/01/scripting-languages-and-cobol/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 10:39:04 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[COBOL]]></category>
		<category><![CDATA[JVM]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javax.script]]></category>
		<category><![CDATA[JSR 223]]></category>
		<category><![CDATA[Micro Focus]]></category>
		<category><![CDATA[Net Express]]></category>
		<category><![CDATA[ScriptEngine]]></category>
		<category><![CDATA[ScriptEngineManager]]></category>
		<category><![CDATA[ScriptObject]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=462</guid>
		<description><![CDATA[The use of scripting languages with other languages has increased over the last couple of years, from a simple case of interoperability, reuse of scripting code to allowing your code to customised via the user of external scripts. All of which are real world examples I have seen customers use. Interoperability between languages is very [...]]]></description>
			<content:encoded><![CDATA[<p>The use of scripting languages with other languages has increased over the last couple of years, from a simple case of interoperability, reuse of scripting code to allowing your code to customised via the user of external scripts.   All of which are real world examples I have seen customers use.</p>
<p>Interoperability between languages is very important to COBOL environments just as much as other languages.   Some platforms such as Microsoft&#8217;s .Net with their CLR makes life much easier by allowing all languages to share a common infrastructure ie: the instruction set and the VM (MSIL and CLR) along with a base class library to get you started.</p>
<p>Environments such as Sun&#8217;s VM (JVM) provide two different approaches to interoperability with Java, the first is via JNI/JNA and the second is producing bytecode that runs as is on the VM.</p>
<p>Although the Micro Focus COBOL compiler does not support JVM bytecode or Java source generation it does have support for invoking classes/methods via the OO invoke verb.</p>
<p>This mechanism is very simple to use, you just need to let our object COBOL runtime know the class is a Java class, which can be done by placing $JAVA$ before the name of the class and ensuring the class itself can be found by the JVM itself usually by adding an extra directories or .jar files to the CLASSPATH environment variable.</p>
<p>With Java 6.0 and JSR 223 support for Java based scripting languages were provided via the package javax.script.</p>
<p>Java has a wealth of scripting languages from awk to xlst.  My favourites being <a href="http://jython.sourceforge.net/">jpython</a>, <a href="http://jruby.sourceforge.net/">jruby</a> and <a href="http://www.mozilla.org/rhino">javascript</a>.</p>
<p>The java.net website has a comprehensive list of scripting languages -<br />
<a href="https://scripting.dev.java.net/">https://scripting.dev.java.net/</a>.</p>
<p>To use the scripting packages, you first need to create a ScriptEngineManager, then use this to create a specific ScriptEngine object for your chosen scripting language and use it.</p>
<p>For example:</p>
<li>Create a ScriptEngineManager object.</li>
<li>Retrieve a ScriptEngine object from the manager.</li>
<li>Evaluate a script using the ScriptEngine object.</li>
<p>In COBOL this is quite simply: </p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="">*&gt; ooctrl(+p) required for COM and Java classes</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; ooctrl(-f) used to preserve case of method names for Java</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #a0a0a0; font-style: italic;">$set ooctrl(+p) ooctrl(-f)</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class-control</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Script-EngineManager <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$javax.script.ScriptEngineManager&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Script-Engine <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$javax.script.ScriptEngine&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.lang.Object&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-System <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.lang.System&quot;</span> &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-PrintStream <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.io.PrintStream&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">working-storage</span> <span style="color: #000080; font-weight: bold;">section</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-obj-sem &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-Script-EngineManager<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-javascript &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-Script-Engine<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-obj &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-<span style="color: #008000; font-weight: bold;">object</span><span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-pout &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-PrintStream<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-Script-EngineManager <span style="color: #ff0000;">&quot;new&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-obj-sem <span style="color: #ff0000;">&quot;getEngineByName&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;JavaScript&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-javascript <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;eval&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #ff0000;">&quot;print('Hello, world!')&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-obj <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> cls-System <span style="color: #ff0000;">&quot;getout&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-pout<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-pout <span style="color: #ff0000;">&quot;println&quot;</span> &nbsp; <span style="color: #008000; font-weight: bold;">using</span> ws-obj<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-pout <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-pout<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-obj <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-obj<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
<br />
&nbsp; &nbsp; &nbsp; $if NO-FINALIZE <span style="color: #008000; font-weight: bold;">not</span> defined<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-obj-sem <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;finalize&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-javascript<br />
&nbsp; &nbsp; &nbsp; $end<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">stop</span> <span style="color: #008000; font-weight: bold;">run</span><span style="color: #000066;">.</span></div></div>
<p>The actual Javascript being execute is contained in the invoke statement, which is simply:</p>
<div class="codecolorer-container javascript blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Hello, world!'</span><span style="color: #009900;">&#41;</span></div></div>
<p>To use the above example, we first need to compile the code and run it.. which is done as follows:</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\jscripting\HelloWorld&gt;cobol cbljscript.cbl int(); <br />
Micro Focus Net Express V5<br />
Version 6.0.00059 &nbsp;Copyright (C) 1984-2009 Micro Focus (IP) Limited.<br />
URN AXCGG/AA0/00000 <br />
* Checking complete with no errors - starting code generation<br />
* Generating cbljscript<br />
* Data: &nbsp; &nbsp; &nbsp; &nbsp; 848 &nbsp; &nbsp; Code: &nbsp; &nbsp; &nbsp; &nbsp;1992 &nbsp; &nbsp; Literals: &nbsp; &nbsp; &nbsp; &nbsp; 904<br />
<br />
C:\jscripting\HelloWorld&gt;runm cbljscript <br />
Micro Focus Net Express V6.0.00059 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
RUN TIME ENVIRONMENT Copyright (C) 1984-2009 Micro Focus (IP) Limited. &nbsp; &nbsp; &nbsp; &nbsp; <br />
URN AXCGG/AA0/00000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Hello, world!</div></div>
</p>
<p>This is just the start, the next thing piece that is required with interoperability to another language is the ability to pass parameters to in and out of the script.  Luckily for us the clever chaps on the jsr group have provided &#8216;put&#8217; and &#8216;get&#8217; methods that allows us to simply put a name parameter and get the resulting updated or new parameter.</p>
<p>So consider the example, where we need to setup a parameter called &#8216;message&#8217; for the script and then read a parameter called &#8216;replyMessage&#8217; after the script has been executed.   The javascript to do this is: </p>
<div class="codecolorer-container javascript blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">/* Do some insanity checking! */</span><br />
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; message <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;ERROR - 'message' has not been setup&quot;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
println<span style="color: #009900;">&#40;</span>message<span style="color: #009900;">&#41;</span><br />
<br />
replyMessage <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Hello from javascript&quot;</span></div></div>
<p>To setup the message parameter, we just need todo.</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp;<span style="">*&gt; Put a variable in engine, so the javascript</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="">*&gt; can use it.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;put&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #ff0000;">&quot;message&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #ff0000;">&quot;Hello World from COBOL!&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">end-invoke</span></div></div>
<p>The after the script has executed, we just need to use the &#8216;get&#8217; method..</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp;<span style="">*&gt; get a variable in engine</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;get&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #ff0000;">&quot;replyMessage&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">end-invoke</span><br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="">*&gt; now display the replyMessage if it is available</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">if</span> ws-<span style="color: #008000; font-weight: bold;">message</span> <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-pout <span style="color: #ff0000;">&quot;println&quot;</span> &nbsp; <span style="color: #008000; font-weight: bold;">using</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;Javascript did not set a replyMessage var&quot;</span></div></div>
<p>The completed COBOL example below, uses a side file for the javascript too, the code is as follows:</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="">*&gt; ooctrl(+p) required for COM and Java classes</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; ooctrl(-f) used to preserve case of method names for Java</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #a0a0a0; font-style: italic;">$set ooctrl(+p) ooctrl(-f)</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class-control</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Script-EngineManager <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$javax.script.ScriptEngineManager&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Script-Engine <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$javax.script.ScriptEngine&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.lang.Object&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-System <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.lang.System&quot;</span> &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-PrintStream <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.io.PrintStream&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-FileReader <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.io.FileReader&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">working-storage</span> <span style="color: #000080; font-weight: bold;">section</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-<span style="color: #008000; font-weight: bold;">file</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-FileReader<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-obj-sem &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-Script-EngineManager<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-javascript &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-Script-Engine<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-obj &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-<span style="color: #008000; font-weight: bold;">object</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-<span style="color: #008000; font-weight: bold;">message</span> &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-<span style="color: #008000; font-weight: bold;">object</span><span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-pout &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-PrintStream<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; setup ws-pout to be System.out object</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-System <span style="color: #ff0000;">&quot;getout&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-pout<br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Setup a FileReader object for the external helloworld.js file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-FileReader <span style="color: #ff0000;">&quot;new&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;helloworld.js&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Create a new script manager</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-Script-EngineManager <span style="color: #ff0000;">&quot;new&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Find the javascript engine</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-obj-sem <span style="color: #ff0000;">&quot;getEngineByName&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;JavaScript&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-javascript <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Put a variable in engine, so the javascript</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; can use it.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;put&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;message&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;Hello World from COBOL!&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; do some javascript stuff!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;eval&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ws-<span style="color: #008000; font-weight: bold;">file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; get a variable in engine</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;get&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;replyMessage&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; now display the replyMessage if it is available</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-<span style="color: #008000; font-weight: bold;">message</span> <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-pout <span style="color: #ff0000;">&quot;println&quot;</span> &nbsp; <span style="color: #008000; font-weight: bold;">using</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">display</span> <span style="color: #ff0000;">&quot;Javascript did not set a replyMessage var&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; cleanup code, not strickly needed for the example but</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; its good practice, to do it.</span><br />
&nbsp; &nbsp; &nbsp; $if NO-FINALIZE <span style="color: #008000; font-weight: bold;">not</span> defined<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-<span style="color: #008000; font-weight: bold;">message</span> <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-<span style="color: #008000; font-weight: bold;">message</span> <span style="color: #ff0000;">&quot;finalize&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-pout <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-pout <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-pout<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-obj-sem <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;finalize&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-javascript<br />
&nbsp; &nbsp; &nbsp; $end<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">stop</span> <span style="color: #008000; font-weight: bold;">run</span><span style="color: #000066;">.</span></div></div>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\jscripting\HelloWorld3&gt;cobol cbljscript.cbl int(); <br />
Micro Focus Net Express V5<br />
Version 6.0.00059 &nbsp;Copyright (C) 1984-2009 Micro Focus (IP) Limited.<br />
URN AXCGG/AA0/00000 <br />
* Checking complete with no errors - starting code generation<br />
* Generating cbljscript<br />
* Data: &nbsp; &nbsp; &nbsp; &nbsp; 888 &nbsp; &nbsp; Code: &nbsp; &nbsp; &nbsp; &nbsp;2528 &nbsp; &nbsp; Literals: &nbsp; &nbsp; &nbsp; &nbsp;1296<br />
<br />
C:\jscripting\HelloWorld3&gt;runm cbljscript <br />
Micro Focus Net Express V6.0.00059 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
RUN TIME ENVIRONMENT Copyright (C) 1984-2009 Micro Focus (IP) Limited. &nbsp; &nbsp; &nbsp; &nbsp; <br />
URN AXCGG/AA0/00000 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Hello World from COBOL!<br />
Hello from javascript</div></div>
<p>As you can see from the code above, setting up parameter is pretty easy todo but sometimes we just want to execute a function in the scripting language such as:</p>
<div class="codecolorer-container javascript blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> testMessage<span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066;">print</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;testMessage : &quot;</span> <span style="color: #339933;">+</span> msg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>The ScriptEngine object that we have created to use the scripting engine may implement an optional interface called javax.script.Invocable, if the scripting engine we are using does provide this interface then a method called invokeFunction(..) can be used.</p>
<p>In order to reduce the size of the COBOL code, I have coded a simple utils class in java as a simple proxy layer, the code is pretty simple but does make it easier for the COBOL to use the invokeFunction() method.</p>
<div class="codecolorer-container javascript blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Then from the COBOL side<span style="color: #339933;">,</span> we can just <span style="color: #003366; font-weight: bold;">use</span> the invokeFunction above.<span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span><br />
<br />
<span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>For example<span style="color: #339933;">:&lt;/</span>p<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>code lang<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;cobol&quot;</span> width<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;800&quot;</span> lines<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;-1&quot;</span> nowrap<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;0&quot;</span><span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">*&gt;</span> invoke a <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #000066; font-weight: bold;">with</span> one parameter<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; invoke cls<span style="color: #339933;">-</span>utils <span style="color: #3366CC;">&quot;invokeFunction&quot;</span> using<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ws<span style="color: #339933;">-</span>javascript<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #3366CC;">&quot;testMessage&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #3366CC;">&quot;Hello to function testMessage from COBOL&quot;</span></div></div>
<p>Which gives us the following output when executed.</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\jscripting\InvokeFunction&gt;runm cbljscript<br />
Micro Focus Net Express V6.0.00059<br />
RUN TIME ENVIRONMENT Copyright (C) 1984-2009 Micro Focus (IP) Limited.<br />
URN AXCGG/AA0/00000<br />
<br />
testMessage : Hello to function testMessage from COBOL</div></div>
<p>The completed example is as follows:</p>
<div class="codecolorer-container cobol blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="cobol codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; <span style="">*&gt; ooctrl(+p) required for COM and Java classes</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; ooctrl(-f) used to preserve case of method names for Java</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #a0a0a0; font-style: italic;">$set ooctrl(+p) ooctrl(-f)</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class-control</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Script-EngineManager <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$javax.script.ScriptEngineManager&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Script-Engine <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$javax.script.ScriptEngine&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.lang.Object&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-System <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.lang.System&quot;</span> &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-PrintStream <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.io.PrintStream&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-FileReader <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$java.io.FileReader&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cls-Utils <span style="color: #008000; font-weight: bold;">is</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">class</span> <span style="color: #ff0000;">&quot;$JAVA$utils&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">working-storage</span> <span style="color: #000080; font-weight: bold;">section</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-<span style="color: #008000; font-weight: bold;">file</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-FileReader<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-obj-sem &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-Script-EngineManager<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-javascript &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-Script-Engine<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-<span style="color: #008000; font-weight: bold;">message</span> &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-<span style="color: #008000; font-weight: bold;">object</span><span style="color: #000066;">.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;01 ws-pout &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">object</span> <span style="color: #008000; font-weight: bold;">reference</span> cls-PrintStream<span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">procedure</span> <span style="color: #008000; font-weight: bold;">division</span><span style="color: #000066;">.</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; setup ws-pout to be System.out object</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-System <span style="color: #ff0000;">&quot;getout&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-pout<br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Setup a FileReader object for the external helloworld.js file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-FileReader <span style="color: #ff0000;">&quot;new&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;helloworld.js&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Create a new script manager</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-Script-EngineManager <span style="color: #ff0000;">&quot;new&quot;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; Find the javascript engine</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-obj-sem <span style="color: #ff0000;">&quot;getEngineByName&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #ff0000;">&quot;JavaScript&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-javascript <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; do some javascript function</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;eval&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ws-<span style="color: #008000; font-weight: bold;">file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; invoke a function with one parameter</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">invoke</span> cls-utils <span style="color: #ff0000;">&quot;invokeFunction&quot;</span> <span style="color: #008000; font-weight: bold;">using</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ws-javascript<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;testMessage&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; z<span style="color: #ff0000;">&quot;Hello to function testMessage from COBOL&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-invoke</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; cleanup code, not strickly needed for the example but</span><br />
&nbsp; &nbsp; &nbsp; <span style="">*&gt; its good practice, to do it.</span><br />
&nbsp; &nbsp; &nbsp; $if NO-FINALIZE <span style="color: #008000; font-weight: bold;">not</span> defined<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-<span style="color: #008000; font-weight: bold;">file</span> <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-<span style="color: #008000; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;finalize&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-<span style="color: #008000; font-weight: bold;">message</span> <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-<span style="color: #008000; font-weight: bold;">message</span> <span style="color: #ff0000;">&quot;finalize&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-<span style="color: #008000; font-weight: bold;">message</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-pout <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-pout <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-pout<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-obj-sem <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-obj-sem <span style="color: #ff0000;">&quot;finalize&quot;</span> &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">returning</span> ws-obj-sem<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">if</span> ws-javascript <span style="color: #008000; font-weight: bold;">not</span> <span style="color: #008000; font-weight: bold;">equal</span> <span style="color: #008000; font-weight: bold;">null</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000; font-weight: bold;">invoke</span> ws-javascript <span style="color: #ff0000;">&quot;finalize&quot;</span> <span style="color: #000000; font-weight: bold;">returning</span> ws-javascript<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">end-if</span><br />
&nbsp; &nbsp; &nbsp; $end<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000; font-weight: bold;">stop</span> <span style="color: #008000; font-weight: bold;">run</span><span style="color: #000066;">.</span></div></div>
<p>Conclusions: Using a Java based scripting language from COBOL is quite easy, so feel free to use it.   Now which scripting language should I use&#8230;?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/scripting-languages-and-cobol/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iRiver Story Firmware upgrade v1.6.1 (update)</title>
		<link>http://www.gennard.net/blog/2010/01/iriver-story-firmware-v1-6/</link>
		<comments>http://www.gennard.net/blog/2010/01/iriver-story-firmware-v1-6/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 21:29:48 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[ePub]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[iriver]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[ebook reader]]></category>
		<category><![CDATA[iriver story]]></category>
		<category><![CDATA[iriver story firmware]]></category>
		<category><![CDATA[iriver story firmware 1.6]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=486</guid>
		<description><![CDATA[iRiver have again upgraded the firmware for the &#8220;iRiver Story&#8221; to revision 1.6.1 (previous v1.6.0 has been removed). So what is different? 1. Added Functions a. Dithering function on PDF File and EPUB File b. FB2Viewer function 2. Improvements a. Loading Speed improved on PDF File The firmware can be downloaded from [click on me]. [...]]]></description>
			<content:encoded><![CDATA[<p>iRiver have again upgraded the firmware for the &#8220;iRiver Story&#8221; to revision 1.6.1 (previous v1.6.0 has been removed).</p>
<p>So what is different?</p>
<blockquote><p>1. Added Functions<br />
a. Dithering function on PDF File and EPUB File<br />
b. FB2Viewer function</p>
<p>2. Improvements</p>
<p>a. Loading Speed improved on PDF File</p></blockquote>
<p>The firmware can be downloaded from [<a href="http://local.iriver.com/usa/lounge/loungeView.asp?selectPart=cateCode&amp;findWord=02&amp;sno=1003&amp;page=1&amp;cateCode=02  ">click on me]</a>.   Time to upgrade&#8230; fingers crossed it helps&#8230;</p>
<p>I have updated the firmware and it seems to basically work, for those that download it, here are the checksums:</p>
<p>Note: if you have downloaded v.1.6.1, the checksum&#8217;s should be:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">stephen-gennards-macbook:v1.6.1 spg$ sum ebook.hex <br />
32519 64116 ebook.hex<br />
stephen-gennards-macbook:v1.6.1 spg$ md5 ebook.hex <br />
MD5 (ebook.hex) = 456014efac1b638f8d3e4088f1a628be</div></div>
</p>
<p>If however your checksum&#8217;s are&#8230; then you have the earlier v1.6.0 which appears to have been removed from the website, so you need togo back to the website and re-download it.</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sum ebook.hex <br />
33843 64116 ebook.hex<br />
$ md5 ebook.hex <br />
MD5 (ebook.hex) = 591e9274a476b8337f40b2ec30e21a50</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/iriver-story-firmware-v1-6/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Review of iRiver Story firmware update</title>
		<link>http://www.gennard.net/blog/2010/01/review-iriver-story-firmware-update/</link>
		<comments>http://www.gennard.net/blog/2010/01/review-iriver-story-firmware-update/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 11:50:46 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[ePub]]></category>
		<category><![CDATA[ebook]]></category>
		<category><![CDATA[iriver]]></category>
		<category><![CDATA[iriver story]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[1]]></category>
		<category><![CDATA[5]]></category>
		<category><![CDATA[firmware update]]></category>
		<category><![CDATA[hang using iriver story]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=484</guid>
		<description><![CDATA[Since installing the latest firmware update aka version 1.5.   I have experience the odd issue but as I have tried to be analytical about what issues I see. I have been lucky enough to be reading a couple of books from O&#8217;Reilly which deliver their eBooks in multiple formats, as the iRiver supports both [...]]]></description>
			<content:encoded><![CDATA[<p>Since installing the latest firmware update aka version 1.5.   I have experience the odd issue but as I have tried to be analytical about what issues I see.</p>
<p>I have been lucky enough to be reading a couple of books from O&#8217;Reilly which deliver their eBooks in multiple formats, as the iRiver supports both ePub and PDF.  I have chosen to install both versions of the same book, so if I experience a issue with one I can flip to the other.</p>
<p>Here is what I have found so far:</p>
<ul>
<li>Reading of PDF seems to be the most reliable</li>
<li>Reading of ePub documents seems to very slow in comparison</li>
<li>PDF reading can be pain with small text, reflow helps but destroys technical book formats that has embedded code in it</li>
<li>Battery life is much better</li>
</ul>
<p>I have had a couple of crashes/hangs of the iRiver but so far it has only been with ePub files.  So guess what&#8230; I will be avoiding them like the plague.</p>
<p>Has other people had the similar issues?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/review-iriver-story-firmware-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MacBook keyboard pains and VirtualBox/VMWare</title>
		<link>http://www.gennard.net/blog/2010/01/macbook-custom-keyboard-virtualbox/</link>
		<comments>http://www.gennard.net/blog/2010/01/macbook-custom-keyboard-virtualbox/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 21:54:33 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[MacBook]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[custom keyboard]]></category>
		<category><![CDATA[custom keyboard layout]]></category>
		<category><![CDATA[euro key]]></category>
		<category><![CDATA[hash key]]></category>
		<category><![CDATA[uk keyboard]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=456</guid>
		<description><![CDATA[As a MacBook user who has used Virtualisation on the mac for sometime now but only usually with Linux based OS, I was forced to use it with Windows recently and I quickly found out how badly it handles UK Macbook keyboards. The default UK keyboard mapping on a MacBook are pretty much useless when [...]]]></description>
			<content:encoded><![CDATA[<p>As a MacBook user who has used Virtualisation on the mac for sometime now but only usually with Linux based OS, I was forced to use it with Windows recently and I quickly found out how badly it handles UK Macbook keyboards.</p>
<p>The default UK keyboard mapping on a MacBook are pretty much useless when using Virtual PC emulators such VirtualBox or VMWARE.</p>
<p>With this in mind, have produced a custom keyboard layout which maps all the keys to right place.</p>
<p>The only two exceptions are the two OPT keys, which I could only managed to map them to ALT-n keys, so the alternative mapping for these are:</p>
<p>€ aka left OPT 2 is mapped to right ALT 2</p>
<p># aka left OPT 3 is mapped to right ALT 3</p>
<p>To use the customer keyboard mapping, download the .zip, unzip it.. and click on mbkbd\setup.exe and it will install the custom keyboard called &#8220;<a href="http://www.gennard.net/downloads/macBook_CustomKeyboard.zip">United Kindom &#8211; MacBook &#8211; Custom</a>&#8220;.</p>
<p>And this me using it&#8230; boy did this make more productive!</p>
<p>This a screen shot me trying it out&#8230; <img src='http://www.gennard.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.gennard.net/blog/wp-content/uploads/2010/01/VirtualBox_Screen.png"><img class="alignnone size-medium wp-image-455" title="VirtualBox_Screen" src="http://www.gennard.net/blog/wp-content/uploads/2010/01/VirtualBox_Screen-300x245.png" alt="" width="300" height="245" /></a></p>
<p>(link fixed)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2010/01/macbook-custom-keyboard-virtualbox/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
