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… and here it is.
$set ilusing"System.Reflection"
01 myAssembly type "Assembly".
01 usedAssemblyName type "AssemblyName".
set myAssembly to type "Assembly"::"GetExecutingAssembly"
display "My exe is " myAssembly::"FullName"
display "and is using CLR " myAssembly::"ImageRuntimeVersion"
display "and is loaded from " myAssembly::"Location"
display "the initial method of this program was "
myAssembly::"EntryPoint"::"Name"
display "This assembly references -> "
perform varying usedAssemblyName
through myAssembly::"GetReferencedAssemblies"
display "-> " usedAssemblyName
end-perform
And the output of the program is:
My exe is clrver, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
and is using CLR v2.0.50727
and is loaded from d:\clrver.exe
the initial method of this program was _MF_ENTRYThis assembly references ->
-> mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-> MicroFocus.COBOL.Runtime, Version=3.6.0.0, Culture=neutral,
PublicKeyToken=0412c5e0b2aaa8f0
I recently tried to find our manual for our “British Gas RC Plus Termostat” 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’.
http://www.gasapplianceguide.co.uk/DigistatPlus2.pdf
http://www.draytoncontrols.co.uk/WorkArea/DownloadAsset.aspx?id=4235
Microsoft have just updated the “Application Architecture”. I can’t say I have read it from cover to cover but it is being downloaded to my ebook reader…
The guide helps you to:
- Understand the underlying architecture and design principles and patterns for developing successful solutions on the Microsoft platform and the .NET Framework.
- Identify appropriate strategies and design patterns that will help you design your solution’s layers, components, and services.
- Identify and address the key engineering decision points for your solution.
- Identify and address the key quality attributes and crosscutting concerns for your solution.
- Create a candidate baseline architecture for your solution.
- Choose the right technologies for your solution.
- Identify patterns & practices solution assets and further guidance that will help you to implement your solution
The guide can be downloaded from: http://www.microsoft.com/downloads/details.aspx?FamilyID=ce40e4e1-9838-4c89-a197-a373b2a60df2&DisplayLang=en
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 important to COBOL environments just as much as other languages. Some platforms such as Microsoft’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.
Environments such as Sun’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.
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.
COBOL, JVM, Java, Scripting, Tips
|
COBOL, javascript, javax.script, JSR 223, Micro Focus, Net Express, ScriptEngine, ScriptEngineManager, Scripting, ScriptObject
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 using Virtual PC emulators such VirtualBox or VMWARE.
With this in mind, have produced a custom keyboard layout which maps all the keys to right place.
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:
€ aka left OPT 2 is mapped to right ALT 2
# aka left OPT 3 is mapped to right ALT 3
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 “United Kindom – MacBook – Custom“.
And this me using it… boy did this make more productive!
This a screen shot me trying it out…

(link fixed)