<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-944980637185442061</id><updated>2011-12-28T07:55:10.656-08:00</updated><title type='text'>LegStar</title><subtitle type='html'>This blog is about &lt;a href="http://www.legsem.com/legstar"&gt;LegStar&lt;/a&gt;, an open source project for mainframe integration</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-5560271856198597764</id><published>2011-11-27T04:51:00.001-08:00</published><updated>2011-11-27T05:15:25.350-08:00</updated><title type='text'>LegStar for PDI, a primer</title><content type='html'>&lt;h1&gt;Introduction&lt;/h1&gt;&lt;p&gt;Mainframes, such as &lt;span class="caps"&gt;IBM&lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Z/OS"&gt;z/OS&lt;/a&gt;, are &lt;a href="http://fosspatents.blogspot.com/2010/08/western-civilization-runs-on-mainframe.html"&gt;still operating in many large corporations&lt;/a&gt; and will probably continue to do so for the foreseeable future.&lt;/p&gt;&lt;p&gt;Mainframe file systems contain huge amounts of data that are still waiting to be unlocked and made available to modern applications.&lt;/p&gt;&lt;p&gt;Traditionally, mainframe data is processed by batch programs often written in &lt;a href="http://en.wikipedia.org/wiki/COBOL"&gt;&lt;span class="caps"&gt;COBOL&lt;/span&gt;&lt;/a&gt;. Usually several batch programs are organized as sequential steps in a flow. On z/OS, the flow description language is &lt;a href="http://en.wikipedia.org/wiki/Job_Control_Language" title="Job Control Language"&gt;&lt;span class="caps"&gt;JCL&lt;/span&gt;&lt;/a&gt;, a rather complex and proprietary language.&lt;/p&gt;&lt;p&gt;Assuming you would like to exploit mainframe data but would rather not write &lt;span class="caps"&gt;COBOL&lt;/span&gt; or &lt;span class="caps"&gt;JCL&lt;/span&gt;, this article shows an approach harnessing the power of &lt;a href="http://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;&lt;span class="caps"&gt;ETL&lt;/span&gt;&lt;/a&gt; tools such as &lt;a href="http://kettle.pentaho.com/" title="a.k.a. Kettle"&gt;Pentaho Data Integration&lt;/a&gt;. With this type of solution, mainframe data can be made available to a very large and growing set of technologies.&lt;/p&gt;&lt;p&gt;The primary destination of mainframe data is &lt;a href="http://en.wikipedia.org/wiki/Business_intelligence" title="business intelligence"&gt;BI&lt;/a&gt; systems, data warehouses and so forth. Such systems impose constraints on data models in order to achieve the usability and performance levels that users expect when they run complex queries. Mainframe data on the other hand, being optimized for &lt;a href="http://en.wikipedia.org/wiki/OLTP" title="on line transaction processing"&gt;&lt;span class="caps"&gt;OLTP&lt;/span&gt;&lt;/a&gt; activity and storage optimization, is rarely organized in a BI friendly way. Hence the need to transform it.&lt;/p&gt;&lt;p&gt;In this article we will walk you through a rather common use case where mainframe data is optimized to reduce storage and needs to be normalized with the help of &lt;span class="caps"&gt;ETL&lt;/span&gt; technology.&lt;/p&gt;&lt;p&gt;While this type of transformation has been possible in the past, the novelty here is that we can now achieve identical results for a fraction of the cost, using Open Source technologies.&lt;/p&gt;&lt;h1&gt;Use case&lt;/h1&gt;&lt;p&gt;In our use case the source data is stored in a mainframe sequential file (&lt;a href="http://en.wikipedia.org/wiki/QSAM"&gt;&lt;span class="caps"&gt;QSAM&lt;/span&gt;&lt;/a&gt; in mainframe parlance).&lt;/p&gt;&lt;p&gt;Records in such files are not delimited by a special character, such as carriage return or line feed, as is common on distributed systems. Furthermore, a record content is a mix of characters and non-characters. Characters are usually encoded in &lt;span class="caps"&gt;EBCDIC&lt;/span&gt;, while non-characters represent various forms of numeric data. Numeric data is often encoded in mainframe specific formats such as compressed numerics (&lt;span class="caps"&gt;COMP&lt;/span&gt;-3).&lt;/p&gt;&lt;p&gt;Mainframe file records are often variable in size. This was important to save storage resources at a time when these were very expensive.&lt;/p&gt;&lt;p&gt;Although there are yet more difficulties involved in interpreting mainframe data, it should be clear by now that you can&amp;#8217;t do so without some meta data that describes records. On mainframes, such metadata is often a &lt;span class="caps"&gt;COBOL&lt;/span&gt; copybook. A copybook is a fragment of &lt;span class="caps"&gt;COBOL&lt;/span&gt; code that describes a data structure (very similar to a C structure). This is a sample of such a copybook we will be using as a use case:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;       01  CUSTOMER-DATA.
           05 CUSTOMER-ID                    PIC 9(6).
           05 PERSONAL-DATA.
              10 CUSTOMER-NAME               PIC X(20).
              10 CUSTOMER-ADDRESS            PIC X(20).
              10 CUSTOMER-PHONE              PIC X(8).
           05 TRANSACTIONS.
              10 TRANSACTION-NBR             PIC 9(9) COMP.
              10 TRANSACTION OCCURS 0 TO 5
                 DEPENDING ON TRANSACTION-NBR.
                 15 TRANSACTION-DATE         PIC X(8).
                 15 TRANSACTION-AMOUNT       PIC S9(13)V99 COMP-3.
                 15 TRANSACTION-COMMENT      PIC X(9).&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Things to notice about this record description are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;This is 5 levels deep hierarchy&lt;/li&gt;
&lt;li&gt;&lt;span class="caps"&gt;PIC&lt;/span&gt; X(n) denotes text fields containing &lt;span class="caps"&gt;EBCDIC&lt;/span&gt; encoded characters&lt;/li&gt;
&lt;li&gt;&lt;span class="caps"&gt;CUSTOMER&lt;/span&gt;-ID, &lt;span class="caps"&gt;TRANSACTION&lt;/span&gt;-&lt;span class="caps"&gt;NBR&lt;/span&gt; and &lt;span class="caps"&gt;TRANSACTION&lt;/span&gt;-&lt;span class="caps"&gt;AMOUNT&lt;/span&gt; are 3 different forms of numerics&lt;/li&gt;
&lt;li&gt;The array described with &lt;span class="caps"&gt;OCCURS&lt;/span&gt; and &lt;span class="caps"&gt;DEPENDING&lt;/span&gt; ON is a variable size array whose actual size is given by the &lt;span class="caps"&gt;TRANSACTION&lt;/span&gt;-&lt;span class="caps"&gt;NBR&lt;/span&gt; variable.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Now assuming we take a peek, with an hexadecimal editor, at a file record containing data described by this &lt;span class="caps"&gt;COBOL&lt;/span&gt; copybook, we would see something like this:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;    00000000h: F0 F0 F0 F0 F0 F1 C2 C9 D3 D3 40 E2 D4 C9 E3 C8 ;
    00000010h: 40 40 40 40 40 40 40 40 40 40 C3 C1 D4 C2 D9 C9 ;
    00000020h: C4 C7 C5 40 40 40 40 40 40 40 40 40 40 40 F3 F8 ; 
    00000030h: F7 F9 F1 F2 F0 F6 00 00 00 00                   ;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This first record size is only 58 bytes long. This is because the &lt;span class="caps"&gt;TRANSACTION&lt;/span&gt;-&lt;span class="caps"&gt;NBR&lt;/span&gt; field contains a value of zero, hence there are no array items stored.&lt;/p&gt;&lt;p&gt;The second record though, which starts at offset 59, looks like this:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;    0000003ah: F0 F0 F0 F0 F0 F2 C6 D9 C5 C4 40 C2 D9 D6 E6 D5 ; 
    0000004ah: 40 40 40 40 40 40 40 40 40 40 C3 C1 D4 C2 D9 C9 ;
    0000005ah: C4 C7 C5 40 40 40 40 40 40 40 40 40 40 40 F3 F8 ; 
    0000006ah: F7 F9 F1 F2 F0 F6 00 00 00 04 F3 F0 61 F1 F0 61 ; 
    0000007ah: F1 F0 00 00 00 00 00 03 68 2C 5C 5C 5C 5C 5C 5C ; 
    0000008ah: 5C 5C 5C F3 F0 61 F1 F0 61 F1 F0 00 00 00 00 00 ; 
    0000009ah: 17 59 3C 5C 5C 5C 5C 5C 5C 5C 5C 5C F3 F0 61 F1 ; 
    000000aah: F0 61 F1 F0 00 00 00 00 00 11 49 2C 5C 5C 5C 5C ; 
    000000bah: 5C 5C 5C 5C 5C F1 F0 61 F0 F4 61 F1 F1 00 00 00 ; 
    000000cah: 00 00 22 96 5C 5C 5C 5C 5C 5C 5C 5C 5C 5C       ; &lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This one is 158 bytes long because the &lt;span class="caps"&gt;TRANSACTION&lt;/span&gt;-&lt;span class="caps"&gt;NBR&lt;/span&gt; field contains a value of 4. There are 4 items in the variable size array.&lt;/p&gt;&lt;p&gt;As you can see, there is not a single byte of excess storage in that file!&lt;/p&gt;&lt;p&gt;Now let us assume this file was transferred in binary mode to our workstation and that we want to create an excel worksheet out of its content.&lt;/p&gt;&lt;h1&gt;Building a simple &lt;span class="caps"&gt;PDI&lt;/span&gt; Transform&lt;/h1&gt;&lt;p&gt;To transform the mainframe file into an Excel worksheet, we will be using Pentaho Data Integration (&lt;span class="caps"&gt;PDI&lt;/span&gt;) and the &lt;a href="http://code.google.com/p/legstar-pdi/"&gt;LegStar plugin for &lt;span class="caps"&gt;PDI&lt;/span&gt;&lt;/a&gt;. LegStar for &lt;span class="caps"&gt;PDI&lt;/span&gt; provides the &lt;span class="caps"&gt;COBOL&lt;/span&gt; processing capabilities that are needed to transform the mainframe data into &lt;span class="caps"&gt;PDI&lt;/span&gt; rows.&lt;/p&gt;&lt;p&gt;The &lt;span class="caps"&gt;PDI&lt;/span&gt; community edition product is open source and freely available from &lt;a href="http://sourceforge.net/projects/pentaho/files/Data%20Integration/"&gt;this download link&lt;/a&gt;. This article was written using version 4.1.0.&lt;/p&gt;&lt;p&gt;LegStar for &lt;span class="caps"&gt;PDI&lt;/span&gt; is also an open source product, freely available at &lt;a href="http://code.google.com/p/legstar-pdi/downloads/list"&gt;this download link&lt;/a&gt;. For this article, we used release 0.4.&lt;/p&gt;&lt;p&gt;Once you download legstar-pdi, you need to unzip the archive to the &lt;span class="caps"&gt;PDI&lt;/span&gt; plugins/steps folder. This will add the z/OS File Input plugin to &lt;span class="caps"&gt;PDI&lt;/span&gt; standards plugins.&lt;/p&gt;&lt;p&gt;The &lt;span class="caps"&gt;PDI&lt;/span&gt; &lt;span class="caps"&gt;GUI&lt;/span&gt; designer is called Spoon, it can be started using the spoon.bat or spoon.sh scripts.&lt;/p&gt;&lt;p&gt;On the first Spoon screen we create a new Transformation (using menu option File&amp;#8594;New&amp;#8594;Transformation).&lt;/p&gt;&lt;p&gt;From the designer palette&amp;#8217;s Input folder, we drag and drop the z/OS file input step:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-P68_mnb6LEA/TtI0fbZFqAI/AAAAAAAAA5E/oWCCkO4DWDM/s1600/new-transformation.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://3.bp.blogspot.com/-P68_mnb6LEA/TtI0fbZFqAI/AAAAAAAAA5E/oWCCkO4DWDM/s400/new-transformation.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;This will be the first step of our transformation process. Let us double click on it to bring up the settings dialog:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-a4nq33_OyT0/TtI1I-_wkfI/AAAAAAAAA5Q/OkGlKqiTn50/s1600/settings-file.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="374" width="400" src="http://4.bp.blogspot.com/-a4nq33_OyT0/TtI1I-_wkfI/AAAAAAAAA5Q/OkGlKqiTn50/s400/settings-file.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;On the File tab, we pick up the z/OS binary File which was transferred to our workstation. Since this is a variable length record file, we check the corresponding box on the dialog.&lt;/p&gt;&lt;p&gt;This file does not contain record descriptor words. RDWs are 4 bytes that z/OS adds to each variable record. When these are present, LegStar can more efficiently process the file.&lt;/p&gt;&lt;p&gt;The z/OS character set is the &lt;span class="caps"&gt;EBCDIC&lt;/span&gt; encoding used for text fields. For french &lt;span class="caps"&gt;EBCDIC&lt;/span&gt; for instance, with accented characters and Euro sign, you would pick up IBM01147.&lt;/p&gt;&lt;p&gt;We now select the &lt;span class="caps"&gt;COBOL&lt;/span&gt; tab and copy/paste the &lt;span class="caps"&gt;COBOL&lt;/span&gt; structure that describes our file records:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-b-LJ9Jpee74/TtI1UbT_m1I/AAAAAAAAA5c/GjQc2hIDjoo/s1600/settings-cobol.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="374" width="400" src="http://1.bp.blogspot.com/-b-LJ9Jpee74/TtI1UbT_m1I/AAAAAAAAA5c/GjQc2hIDjoo/s400/settings-cobol.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;At this stage, we need to click the Get Fields button which will start the process of translating the &lt;span class="caps"&gt;COBOL&lt;/span&gt; structure into a &lt;span class="caps"&gt;PDI&lt;/span&gt; row.&lt;/p&gt;&lt;p&gt;A &lt;span class="caps"&gt;PDI&lt;/span&gt; row is a list of fields, similar to a database row. The row model is fundamental in &lt;span class="caps"&gt;ETL&lt;/span&gt; tools as it nicely maps to the &lt;span class="caps"&gt;RDBMS&lt;/span&gt; model.&lt;/p&gt;&lt;p&gt;The Fields tab shows the result:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-QINMY-3tTMg/TtI1hvR4REI/AAAAAAAAA5o/n4AHfzFyJ1Y/s1600/settings-fields.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="374" width="400" src="http://3.bp.blogspot.com/-QINMY-3tTMg/TtI1hvR4REI/AAAAAAAAA5o/n4AHfzFyJ1Y/s400/settings-fields.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;As you can see, several things happened:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The &lt;span class="caps"&gt;COBOL&lt;/span&gt; hierarchy has been flattened (LegStar has a name conflict resolution mechanism)&lt;/li&gt;
&lt;li&gt;Data items, according to their &lt;span class="caps"&gt;COBOL&lt;/span&gt; type, have been mapped to Strings, Integers or BigNumbers with the appropriate precision&lt;/li&gt;
&lt;li&gt;The array items have been flattened using the familiar _n suffix where n is the item index in the array&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;We are now done with setting up the z/OS file input step but before we continue building our &lt;span class="caps"&gt;PDI&lt;/span&gt; Transformation, it is a good idea to use one of the great features in &lt;span class="caps"&gt;PDI&lt;/span&gt;, which is the Preview capability. The Preview button should now be enabled, if you click on it and select a number of rows you would like to preview, you should see this result:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-yQUan_Xbq7c/TtI1tIjF5kI/AAAAAAAAA50/ey7LIfT6bno/s1600/preview.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="242" width="400" src="http://2.bp.blogspot.com/-yQUan_Xbq7c/TtI1tIjF5kI/AAAAAAAAA50/ey7LIfT6bno/s400/preview.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Time to go back to the &lt;span class="caps"&gt;PDI&lt;/span&gt; Transformation, add an Excel output step and create a hop between the z/OS file input step and the Excel output step:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-ZjCfa1iu88c/TtI2CGQpinI/AAAAAAAAA6M/k9qwQzYJqQc/s1600/direct-hop.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://2.bp.blogspot.com/-ZjCfa1iu88c/TtI2CGQpinI/AAAAAAAAA6M/k9qwQzYJqQc/s400/direct-hop.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;You can now run the Transformation, this will require that you save your work. In our case we named our Transformation rcus-simple.ktr. Ktr files are &lt;span class="caps"&gt;XML&lt;/span&gt; documents that completely describe the &lt;span class="caps"&gt;PDI&lt;/span&gt; Transformation.&lt;/p&gt;&lt;p&gt;There is a launch dialog on which we simply chose to click launch and then the result showed up as this:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-SSOCUJ8qZ-o/TtI2JDSH8YI/AAAAAAAAA6Y/7adXLg4_XqM/s1600/direct-hop-results.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://4.bp.blogspot.com/-SSOCUJ8qZ-o/TtI2JDSH8YI/AAAAAAAAA6Y/7adXLg4_XqM/s400/direct-hop-results.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;As you can see, 10000 records were read off the z/OS file and an identical number of rows were written in the Excel worksheet (plus a header row).&lt;/p&gt;&lt;p&gt;It is time to take a look at the Excel worksheet we created:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-a4TS4Mey5TI/TtI2SonON4I/AAAAAAAAA6k/1IPvWa6Mkkk/s1600/ugly-xls.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="299" width="400" src="http://1.bp.blogspot.com/-a4TS4Mey5TI/TtI2SonON4I/AAAAAAAAA6k/1IPvWa6Mkkk/s400/ugly-xls.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Everything is in there but you might notice the variable size array results in a lot of oolumns and a lot of empty cells since we need to fill all columns. Indexed column names and sparsely filled cells result in a worksheet that is hard to play with.&lt;/p&gt;&lt;p&gt;This reveals the fundamental issue with mainframe data models, they were not intended for end users to see. So putting such raw data in an excel worksheet is unlikely to be satisfactory.&lt;/p&gt;&lt;p&gt;This is where &lt;span class="caps"&gt;ETL&lt;/span&gt; tools take all their meaning. To illustrate the point we will next enhance our transformation to get rid of the variable size array effect.&lt;/p&gt;&lt;h1&gt;Enhancing the &lt;span class="caps"&gt;PDI&lt;/span&gt; Transformation&lt;/h1&gt;&lt;p&gt;Our first enhancement it to reduce the number of columns. We will apply a normalization transformation that is best described with an example.&lt;/p&gt;&lt;p&gt;This is a partial view of our current result row:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;   &lt;th&gt;CustomerId  &lt;/th&gt;   &lt;th&gt;CustomerName  &lt;/th&gt;   &lt;th&gt;&amp;#8230;  &lt;/th&gt;   &lt;th&gt;TransactionAmount_0 &lt;/th&gt;   &lt;th&gt;TransactionAmount_1 &lt;/th&gt;   &lt;th&gt;TransactionAmount_2 &lt;/th&gt;   &lt;th&gt;TransactionAmount_3 &lt;/th&gt;   &lt;th&gt;&amp;#8230;&lt;/th&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="text-align:right;"&gt;2  &lt;/td&gt;   &lt;td&gt; &lt;span class="caps"&gt;FRED&lt;/span&gt; &lt;span class="caps"&gt;BROWN&lt;/span&gt;      &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230;  &lt;/td&gt;   &lt;td style="text-align:right;"&gt;36,82 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;175,93 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;114,92 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;229,65 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230;&lt;/td&gt; &lt;/table&gt;&lt;p&gt;The &lt;span class="caps"&gt;COBOL&lt;/span&gt; array flattening has had the effect of multiplying the number of columns. Here would be a more desirable, normalized, view of that same data:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;   &lt;th&gt;CustomerId &lt;/th&gt;   &lt;th&gt;CustomerName &lt;/th&gt;   &lt;th&gt;&amp;#8230; &lt;/th&gt;   &lt;th&gt;TransactionIdx &lt;/th&gt;   &lt;th&gt;TransactionAmount &lt;/th&gt;   &lt;th&gt;&amp;#8230; &lt;/th&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="text-align:right;"&gt;2 &lt;/td&gt;   &lt;td&gt; &lt;span class="caps"&gt;FRED&lt;/span&gt; &lt;span class="caps"&gt;BROWN&lt;/span&gt;      &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;   &lt;td style="text-align:right;"&gt;0 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;36,82 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="text-align:right;"&gt;2 &lt;/td&gt;   &lt;td&gt; &lt;span class="caps"&gt;FRED&lt;/span&gt; &lt;span class="caps"&gt;BROWN&lt;/span&gt;      &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;   &lt;td style="text-align:right;"&gt;1 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;175,93 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="text-align:right;"&gt;2 &lt;/td&gt;   &lt;td&gt; &lt;span class="caps"&gt;FRED&lt;/span&gt; &lt;span class="caps"&gt;BROWN&lt;/span&gt;      &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;   &lt;td style="text-align:right;"&gt;2 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;114,92 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;  &lt;/tr&gt;
&lt;tr&gt;   &lt;td style="text-align:right;"&gt;2 &lt;/td&gt;   &lt;td&gt; &lt;span class="caps"&gt;FRED&lt;/span&gt; &lt;span class="caps"&gt;BROWN&lt;/span&gt;      &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;   &lt;td style="text-align:right;"&gt;3 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;229,65 &lt;/td&gt;   &lt;td style="text-align:right;"&gt;&amp;#8230; &lt;/td&gt;  &lt;/tr&gt;
&lt;/table&gt;&lt;p&gt;What happened here is that Columns were traded for Rows. Instead of 5 TransactionAmount_n columns there is a single one and the new TransactionIdx column identifies each transaction. The result is a normalized table in the sense of the &lt;a href="http://en.wikipedia.org/wiki/First_normal_form"&gt;first normal form&lt;/a&gt; in &lt;span class="caps"&gt;RDBMS&lt;/span&gt; theory.&lt;/p&gt;&lt;p&gt;Normalizing has an effect on volumes of course but the result is much easier to manipulate with traditional &lt;span class="caps"&gt;RDBMS&lt;/span&gt; semantics.&lt;/p&gt;&lt;p&gt;Let us now modify our &lt;span class="caps"&gt;PDI&lt;/span&gt; Transformation and introduce a Normalizer step (Palette&amp;#8217;s Transform category):&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-f8uHrKJR4D8/TtI2-lIpmWI/AAAAAAAAA6w/AM2OWenbBVM/s1600/row-normalizer-hop.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://4.bp.blogspot.com/-f8uHrKJR4D8/TtI2-lIpmWI/AAAAAAAAA6w/AM2OWenbBVM/s400/row-normalizer-hop.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Setting up the Normalizer involves specifying the new TransactionIdx column and then mapping the indexed columns to a TransactionIdx value and the single column that will replace each repeatable group:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3m8uYxKemLs/TtI3FZXLVWI/AAAAAAAAA68/lKKP3gO_Ls4/s1600/row-normalizer-settings.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="391" width="400" src="http://1.bp.blogspot.com/-3m8uYxKemLs/TtI3FZXLVWI/AAAAAAAAA68/lKKP3gO_Ls4/s400/row-normalizer-settings.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;If we now run our transformation, this is how the result looks like:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-InKph8-IEyY/TtI3N8YF-qI/AAAAAAAAA7I/oLVkLXN_t7I/s1600/nicer-xls.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="286" width="400" src="http://1.bp.blogspot.com/-InKph8-IEyY/TtI3N8YF-qI/AAAAAAAAA7I/oLVkLXN_t7I/s400/nicer-xls.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;This is already much nicer and easier to manipulate. From the original 20 columns, we are now down to 9.&lt;/p&gt;&lt;p&gt;The &lt;span class="caps"&gt;PDI&lt;/span&gt; execution statistics should show that 50000 rows were created in the Excel worksheet out from the 10000 that we read from the z/OS file. This is an negative effect of normalizing that we should now try to alleviate.&lt;/p&gt;&lt;p&gt;You might notice that the Excel worksheet still contains a large number of empty cells corresponding to empty transactions.&lt;/p&gt;&lt;p&gt;Our next step will be to get rid of these empty transactions. For that purpose, we will use the &lt;span class="caps"&gt;PDI&lt;/span&gt; Filter Rows step (under the palette&amp;#8217;s Flow category).&lt;/p&gt;&lt;p&gt;The Filter step will be setup to send empty transaction rows to the trash can and forward rows with transactions to the Excel worksheet. The &lt;span class="caps"&gt;PDI&lt;/span&gt; equivalent of a trash can is the Dummy step, also found under the Flow category so we go ahead an add it to the canvas too:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-miN58V1XxxI/TtI3bgfRm8I/AAAAAAAAA7U/3t81Qw4M6Jc/s1600/filter-and-dummy-steps.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://4.bp.blogspot.com/-miN58V1XxxI/TtI3bgfRm8I/AAAAAAAAA7U/3t81Qw4M6Jc/s400/filter-and-dummy-steps.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Let us now double click on the Filter step to bring up the setting dialog:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-M7fwWL0BAC0/TtI3iGK7tEI/AAAAAAAAA7g/n3aidL7CDC0/s1600/filter-settings.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="208" width="400" src="http://4.bp.blogspot.com/-M7fwWL0BAC0/TtI3iGK7tEI/AAAAAAAAA7g/n3aidL7CDC0/s400/filter-settings.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Here we specify that the filter condition is true if the TransactionDate column is not empty. Back to the canvas, we can now create 2 hops, one for the true condition that will lead to the Excel worksheet and one for the false condition which brings to the Dummy step:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-IGX6Oygcs1Y/TtI3q0WLMmI/AAAAAAAAA7s/3uawg-yzFqk/s1600/filter-and-dummy-hops.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://3.bp.blogspot.com/-IGX6Oygcs1Y/TtI3q0WLMmI/AAAAAAAAA7s/3uawg-yzFqk/s400/filter-and-dummy-hops.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;We are now ready to execute the &lt;span class="caps"&gt;PDI&lt;/span&gt; Transformation. The metrics should display something like this:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-IQ1r3pwOD_M/TtI3xDlk6xI/AAAAAAAAA74/QzUz0PKXAiY/s1600/complete-hops-result.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="363" width="400" src="http://1.bp.blogspot.com/-IQ1r3pwOD_M/TtI3xDlk6xI/AAAAAAAAA74/QzUz0PKXAiY/s400/complete-hops-result.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;Now, only 25163 rows made it to the Excel worksheet while 24837 were trashed. The resulting Excel worksheet is finally much closer to what an end user might expect:&lt;/p&gt;&lt;p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-c2QuipncIhw/TtI35UBapkI/AAAAAAAAA8E/KP0Mqu7R2yc/s1600/finished-xls.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="283" width="400" src="http://4.bp.blogspot.com/-c2QuipncIhw/TtI35UBapkI/AAAAAAAAA8E/KP0Mqu7R2yc/s400/finished-xls.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/p&gt;&lt;h1&gt;Conclusion&lt;/h1&gt;&lt;p&gt;In this article we have seen how mainframe data, which is by construct obscure and hardly usable by non-programmers, can be transformed into something as easy to manipulate as an Excel worksheet.&lt;/p&gt;&lt;p&gt;Of course, the example given remains simplistic compared to true life &lt;span class="caps"&gt;COBOL&lt;/span&gt; structures and mainframe data organizations but we have seen a small part of the &lt;a href="http://wiki.pentaho.com/display/EAI/Pentaho+Data+Integration+Steps"&gt;&lt;span class="caps"&gt;PDI&lt;/span&gt; capabilities&lt;/a&gt;, some of which are pretty powerful.&lt;/p&gt;&lt;p&gt;Historically the type of features that you have seen in this article were only available from very expensive and proprietary products. The fact that you can now do a lot of the same things, entirely with open source software, will hopefully trigger many more opportunities to exploit the massive untapped mainframe data.&lt;/p&gt;&lt;p&gt;We hope that readers with mainframe background, as well as readers with open systems background, will find this useful and come out with new ideas for  Open Source mainframe integration solutions.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-5560271856198597764?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/5560271856198597764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/11/legstar-for-pdi-primer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5560271856198597764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5560271856198597764'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/11/legstar-for-pdi-primer.html' title='LegStar for PDI, a primer'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-P68_mnb6LEA/TtI0fbZFqAI/AAAAAAAAA5E/oWCCkO4DWDM/s72-c/new-transformation.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-387821645729963176</id><published>2011-11-18T04:55:00.001-08:00</published><updated>2011-11-18T05:02:52.844-08:00</updated><title type='text'>A LegStar Commercial License</title><content type='html'>&lt;p&gt;Entreprises still intensively using mainframes these days tend to be very large. Although most of these companies are more and more comfortable using open source software, they are not comfortable at all with running unsupported code in production.&lt;/p&gt;&lt;p&gt;That creates a specific problem to LegStar since it is both Open Source an primarily of use for such large companies.&lt;/p&gt;&lt;p&gt;After receiving several requests from customers at &lt;a href="http://www.legsem.com"&gt;LegSem&lt;/a&gt; we started looking into building some kind of commercial offering around LegStar.&lt;/p&gt;&lt;p&gt;Of course, we are not the first open source company to bang our head against this thorny issue,  &lt;a href="http://www.infoworld.com/d/open-source/profiting-open-source-without-selling-out-484"&gt;infoworld&lt;/a&gt; has a honest and funny write-up about this.&lt;/p&gt;&lt;p&gt;So this is what we came up with:&lt;/p&gt;&lt;h2&gt;Committed to Open Source:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;First, LegStar is and will remain Open Source&lt;/li&gt;
&lt;li&gt;The core features will stay under the permissive &lt;a href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License"&gt;LGPL&lt;/a&gt; as they are today and the advanced features will be &lt;a href="http://en.wikipedia.org/wiki/GNU_General_Public_License"&gt;GPL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;There won't be an entreprise product separate from the Open Source one. This means every single line of code will be available under an Open Source license&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;For Customers who need it:&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Besides the Open Source licenses, there will be a Commmercial License available. Yes, this a &lt;a href="http://en.wikipedia.org/wiki/Multi-licensing"&gt;dual-licensing scheme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The Commercial License describes the level of support that LegSem, or a business partner, provides&lt;/li&gt;
&lt;li&gt;LegSem will also shield Commercial Licensees from backward compatibility issues&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;This last point requires a little bit of explanation:&lt;/p&gt;&lt;p&gt;As we add new features or fix bugs in LegStar we generally pay attention to backward compatibility but we don't necessarily test it. As a result, new releases are not guaranteed to be backward compatible with your own developments. With the commercial offering, we will do additional, less frequent, releases that we will explicitly check for backward compatibility. These extra releases will only be available to commercial licensees.&lt;/p&gt;&lt;p&gt;LegSem is a small company and will not cover the entire world with that commercial license. What we intend to do is to work with business partners in territories where we are not present. So if your company would be interested in entering this type of deal with us please send a mail at &lt;a href="mailto:contact@legsem.com?Subject=company"&gt;contact@legsem.com&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-387821645729963176?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/387821645729963176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/11/legstar-commercial-license-entreprises.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/387821645729963176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/387821645729963176'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/11/legstar-commercial-license-entreprises.html' title='A LegStar Commercial License'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-6377585331378835193</id><published>2011-10-13T08:54:00.000-07:00</published><updated>2011-10-13T08:54:06.751-07:00</updated><title type='text'>Finally a LegStar JCA Connector</title><content type='html'>&lt;p&gt;This article refers to JCA, the &lt;a href="http://jcp.org/en/jsr/detail?id=322"&gt;Java Connector Architecture&lt;/a&gt;, not the &lt;a href="http://download.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html"&gt;Java Cryptography Architecture&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When we considered J2EE several years ago as a potential target for mainframe integration, I was horrified and decided not to pursue that route. This has proven the right choice and the J2EE reputation was so bad that the name was later changed to Java EE.&lt;/p&gt;

&lt;p&gt;The idea that overly complex technologies provide great opportunities to sell services and consulting is not new. Some very large companies made a fortune this way. Some of these same companies were very active during the J2EE specifications...&lt;/p&gt;

&lt;p&gt;Of course J2EE completely failed to become the universal web engine it was meant to be, but it made it to most large Entreprise Systems. Or at least part of the technology was adopted by large IT departements and some of the complexity alleviated thanks to frameworks like &lt;a href="http://www.springsource.org/"&gt;Spring&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So the reality today is that most companies still using mainframes also use Java EE.&lt;/p&gt;

&lt;p&gt;Another interesting development concerns the latest Java EE specifications (5 and 6). I don't know if the J2EE designers were humbled by their past failures but I have to say they did a much better job this time. Today, the technology is almost usable without Spring. For instance, you can inject a JNDI resource with a single annotation which would have taken about 10 lines of Java code previously. If you want to learn more about the latest Java EE, I recommend reading &lt;a href="http://agoncal.wordpress.com/"&gt;Antonio Goncalves's blog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So with Java EE specs getting better and almost all mainframe shops using it, I thought it was time for LegStar to start supporting Java EE containers. The result is part of a series of &lt;a href="http://code.google.com/p/legstar-e/"&gt;extensions to LegStar&lt;/a&gt; that I am working on.&lt;/p&gt;

&lt;p&gt;The first deliverable is a JCA Resource Adapter that uses CICS Sockets as its underlying connectivity.&lt;/p&gt;

&lt;p&gt;It is conformant to the JCA 1.0 specifications but does not implement some of the CCI chapter (which is optional anyway). In practice we do not support CCI Records which are awkward indexed or mapped objects. In my view, Records are not suitable to represent COBOL structures. With the LegStar JCA connector, Instead of Records, you simply use regular &lt;a href="http://www.legsem.com/legstar/legstar-core/legstar-coxbgen/index.html"&gt; LegStar Transformers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am convinced that separating Resource Adapter fonctionalities (Connection pooling, Transactions and Security) from Transformation is a much better approach than what most JCA connectors available on the market do. For one thing, you can reuse the Transformers outside Java EE which is good because, even if Java EE is largely used by mainframe shops, they also use many other java based technologies (ESBs, ETLs, ...).&lt;/p&gt;

&lt;p&gt;I intend to support the other LegStar transports (HTTP, WebSphere MQ) in the future as well as some other transports I have in mind. There will be a different JCA Resource Adapter for each transport.&lt;/p&gt;

&lt;p&gt;One thing you might notice is that the licence has changed for these extensions. While the core LegStar project remains &lt;a href="http://www.gnu.org/licenses/lgpl.html"&gt;LGPL&lt;/a&gt; for the time being, the extensions use the more restrictive &lt;a href="http://www.gnu.org/licenses/gpl-3.0.html"&gt;GPL&lt;/a&gt;. LGPL is often used when OSS projects start and need to get the wider acceptance possible, while GPL is for more mature OSS projects. LegStar is 7 years old now and if you look at what Google has to say about open source mainframe integration:&lt;/p&gt;

&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/--cdzEkJEk0A/TpcJDKZacWI/AAAAAAAAA34/Iz3eT4bEHS0/s1600/google-oss-mainframe-integration.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="274" width="320" src="http://4.bp.blogspot.com/--cdzEkJEk0A/TpcJDKZacWI/AAAAAAAAA34/Iz3eT4bEHS0/s320/google-oss-mainframe-integration.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;You will agree with me that it has gained sufficient traction to become part of the higher class GPL projects out there.&lt;/p&gt;

&lt;p&gt;This is all thanks to you of course since I haven't devised a scheme to get Google to better rank my sites and never paid Google a dime either :-).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-6377585331378835193?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/6377585331378835193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/10/finally-legstar-jca-connector.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6377585331378835193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6377585331378835193'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/10/finally-legstar-jca-connector.html' title='Finally a LegStar JCA Connector'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--cdzEkJEk0A/TpcJDKZacWI/AAAAAAAAA34/Iz3eT4bEHS0/s72-c/google-oss-mainframe-integration.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-4527439022136379152</id><published>2011-07-23T06:08:00.000-07:00</published><updated>2011-07-23T06:08:01.869-07:00</updated><title type='text'>Mapping Dates from COBOL to Java</title><content type='html'>&lt;p&gt;Date (and Time) types are difficult to map between COBOL and java. Here a few comments on why this is hard.&lt;/p&gt;
&lt;h2&gt;Dates in COBOL&lt;/h2&gt;
&lt;p&gt;For a very long time, the COBOL compiler on IBM mainframes didn't know anything about dates. Developers typically used structures and managed dates semantics by hand. The Y2K issue was largely a consequence of this situation since the compiler couldn't solve the problem all by itself.&lt;/p&gt;
&lt;p&gt;Recently ("recently" on the mainframe time scale means in the last 15 years or so), IBM introduced the DATE FORMAT keyword. This is used to further qualify a regular numeric or alphabetic data item. It introduces some restrictions on what you can store in the data item but fundamentally, the data item remains a numeric (binary, compressed or zoned decimal) or an alphanumeric.&lt;/p&gt;
&lt;p&gt;The DATE FORMAT keyword must be followed by a pattern using Y and X characters (no relationship to chromosomes) such as YYXXXX or YYYYXXXX.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;YY designates a "windowed" date. This is relative to a century window given by the YEARWINDOW compiler option.&lt;/li&gt;
&lt;li&gt;YYYY is an "expanded" date. This is a regular century + year date.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;MOVE of a windowed date to an expanded date will expand it as expected. There are also intrinsic functions such as DATEVAL and UNDATE to convert dates to non date data items.&lt;/p&gt; 
&lt;p&gt;For more details, see the programming reference in &lt;a href="http://www-01.ibm.com/software/awdtools/cobol/zos/library/"&gt;IBM COBOL documentation&lt;/a&gt;.
&lt;h2&gt;Dates in Java&lt;/h2&gt;
&lt;p&gt;If dates are messy in COBOL, well, they are even messier in Java.&lt;/p&gt;
&lt;p&gt;At the beginning there was an overly simple &lt;a href="http://download.oracle.com/javase/6/docs/api/java/util/Date.html"&gt;java.util.Date&lt;/a&gt; (with a weird &lt;a href="http://download.oracle.com/javase/6/docs/api/java/sql/Date.html"&gt;java.sql.Date&lt;/a&gt; variation with 9 methods, 6 of which are deprecated!).&lt;/p&gt;
&lt;p&gt;Then came &lt;a href="http://download.oracle.com/javase/6/docs/api/java/sql/Timestamp.html"&gt;java.sql.Timestamp&lt;/a&gt; which inherits from java.util.Date but about which the documentation states: "it is recommended that code not view Timestamp values generically as an instance of java.util.Date". It is as if to say: Timestamp inherits from Date, but please don't use that fact in your programs...&lt;/p&gt;
&lt;p&gt;But worst, came the dreaded &lt;a href="http://download.oracle.com/javase/6/docs/api/java/util/Calendar.html"&gt;java.util.Calendar&lt;/a&gt;. In &lt;a href="http://java.sun.com/developer/technicalArticles/Interviews/bloch_effective_08_qa.html"&gt;this article&lt;/a&gt;, Joshua Bloch, an ex Sun engineer, says:&lt;/p&gt;
&lt;quote&gt;As an extreme example of what not to do, consider the case of java.util.Calendar. Very few people understand its state-space -- I certainly don't -- and it's been a constant source of bugs for years.&lt;/quote&gt;
&lt;p&gt;java.util.Calendar was designed at a time (long gone now) when Java was to overtake the programming world, so this monster was born and several, often used, java.util.Date methods were deprecated as a consequence.&lt;/p&gt;
&lt;p&gt;To further complexify things, JAXB has introduced the &lt;a href="http://download.oracle.com/javase/6/docs/api/javax/xml/datatype/XMLGregorianCalendar.html"&gt;javax.xml.datatype.XMLGregorianCalendar&lt;/a&gt; in order to map the XML Schema date and time.&lt;/p&gt;
&lt;p&gt;All in all, at least 5 different ways of representing a Date&lt;/p&gt;
&lt;h2&gt;Mapping COBOL dates to Java Dates&lt;/h2&gt;
&lt;p&gt;So far, Legstar has taken the, rather lame, approach of not attempting to map COBOL dates to Java dates automatically.&lt;/p&gt;
&lt;p&gt;When starting from COBOL, this means you will never get a java Date/Timestamp/Calendar property, even if the corresponding COBOL data item is marked with a DATE FORMAT. Date semantics are lost in translation...&lt;/p&gt;
&lt;p&gt;When starting from Java though, chances are that some property is a Date/Timestamp/Calendar. Actually Date/Calendar, because with Timestamp you would get "error: java.sql.Timestamp does not have a no-arg default constructor" from JAXB.&lt;/p&gt;
&lt;p&gt;LegStar maps Java Date/Calendar properties to a COBOL PIC X(32).&lt;/p&gt;
&lt;p&gt;At runtime, the PIC X(32) content is assumed to follow the form: "yyyy-mm-dd hh:mm:ss.fffffffff" known as the JDBC timestamp escape format.&lt;/p&gt;
&lt;p&gt;This is rudimentary but following &lt;a href="http://groups.google.com/group/legstar-user/browse_thread/thread/7d31ffda23585d91"&gt;this conversation&lt;/a&gt;, the latest LegStar has introduced a new annotation, inspired from Patrick's comment:  @CobolJavaTypeAdapter(value = SomeClass.class) where SomeClass is code that a developer implements. (Here is &lt;a href="http://code.google.com/p/legstar/source/browse/tags/legstar-core-1.5.4/legstar-coxbrt/src/test/java/com/legstar/coxb/impl/CustomBinding.java"&gt;a sample&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;An extension mechanism is probably the best way to handle COBOL to Java date binding.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-4527439022136379152?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/4527439022136379152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/07/mapping-dates-from-cobol-to-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4527439022136379152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4527439022136379152'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/07/mapping-dates-from-cobol-to-java.html' title='Mapping Dates from COBOL to Java'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-3212171465016577943</id><published>2011-04-10T10:41:00.000-07:00</published><updated>2011-04-10T10:41:02.192-07:00</updated><title type='text'>Migrating off the CTG?</title><content type='html'>&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt;, the &lt;a href="http://www-01.ibm.com/software/htp/cics/ctg/"&gt;&lt;span class="caps"&gt;CICS&lt;/span&gt; Transaction Gateway&lt;/a&gt;, is an &lt;span class="caps"&gt;IBM&lt;/span&gt; product that has been around for a long time and is largely deployed in mainframe shops.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; is usually used from a Java client to make outbound, synchronous, calls to a &lt;span class="caps"&gt;CICS&lt;/span&gt; program. In this case, the &lt;span class="caps"&gt;API&lt;/span&gt; offered to Java clients is known as &lt;span class="caps"&gt;ECI&lt;/span&gt; (External Call Interface ). Because &lt;span class="caps"&gt;ECI&lt;/span&gt; is how most users access the &lt;span class="caps"&gt;CTG&lt;/span&gt; some of them refer to the &lt;span class="caps"&gt;CTG&lt;/span&gt; itself as &lt;span class="caps"&gt;ECI&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; is a separate product from &lt;span class="caps"&gt;CICS&lt;/span&gt; itself. Some people confuse both (probably because the names are so close: &lt;span class="caps"&gt;CICS&lt;/span&gt; Transaction Server and &lt;span class="caps"&gt;CICS&lt;/span&gt; Transaction Gateway).&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; runs in a Java VM that could sit on z/OS (in the Unix System Services environment) but most frequently runs off a distributed server. It is also frequently used in conjunction with WebSphere and as such, can be thought of as middleware between WebSphere and &lt;span class="caps"&gt;CICS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;CTG&amp;#8217;s major strength is transaction support and J2EE integration. It supports the &lt;span class="caps"&gt;JCA&lt;/span&gt; connector architecture and provides 2-phase commit and XA support.&lt;/p&gt;
&lt;p&gt;Although &lt;span class="caps"&gt;CTG&lt;/span&gt; might sound like the definitive solution for &lt;span class="caps"&gt;CICS&lt;/span&gt;/java integration, a number of users are considering moving away from it.&lt;/p&gt;
&lt;p&gt;I can see 3 reasons why this is happening:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;The emergence of integration standards such as Web Services (and the slow erosion of older standards such as J2EE/&lt;span class="caps"&gt;JCA&lt;/span&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
 &lt;li&gt;Loose coupling as a preferred architecture pattern over tight coupling&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
 &lt;li&gt;The Open Source revolution which drives more and more enterprises to consider Open Source software as a valid alternative to closed products&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;An uncomfortable position within &lt;span class="caps"&gt;IBM&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Today, &lt;span class="caps"&gt;CTG&lt;/span&gt; is competing internally with other &lt;span class="caps"&gt;IBM&lt;/span&gt; integration features particularly when it comes to &lt;span class="caps"&gt;SOA&lt;/span&gt;. You can of course create Web Services on top of &lt;span class="caps"&gt;JCA&lt;/span&gt; but there are more efficient alternatives within &lt;span class="caps"&gt;IBM&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;CICS&lt;/span&gt; itself has built-in support for &lt;a href="http://www.ibmsystemsmag.com/mainframe/trends/soa/Integrating-and-Extending-CICS-TS-V3-2-and-SOA/"&gt;&lt;span class="caps"&gt;SOAP&lt;/span&gt; Web Services&lt;/a&gt;. This feature, known as &lt;span class="caps"&gt;CICS&lt;/span&gt; Web Services, offers programmers a standard way to call &lt;span class="caps"&gt;CICS&lt;/span&gt; programs without the need for &lt;span class="caps"&gt;CTG&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;WebSphere, when it is installed on z/OS, also now offers &lt;span class="caps"&gt;CICS&lt;/span&gt; integration directly (an option known as &lt;span class="caps"&gt;OLA&lt;/span&gt; for &lt;a href="http://www.redbooks.ibm.com/redpapers/pdfs/redp4550.pdf"&gt;Optimized Local Adapters&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;WebSphere MQ can also be used to support &lt;a href="http://www-01.ibm.com/support/docview.wss?uid=pub1sc34665100"&gt;Web Services&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; seems to have less and less room within the &lt;span class="caps"&gt;IBM&lt;/span&gt; offering.&lt;/p&gt;
&lt;h2&gt;Not a serious contender for loose coupling&lt;/h2&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; has support for asynchronous calls but it is hard to justify the heavyweight 2-phase commit support in such a setting.&lt;/p&gt;
&lt;p&gt;Asynchronous calls can&amp;#8217;t support 2-phase commit and therefore could run with a much more lightweight infrastructure.&lt;/p&gt;
&lt;p&gt;Furthermore, &lt;span class="caps"&gt;IBM&lt;/span&gt; has WebSphere MQ as its preferred asynchronous programming interface so it is hard to see how &lt;span class="caps"&gt;CTG&lt;/span&gt; could be justified to support a loosely coupled architecture.&lt;/p&gt;
&lt;h2&gt;Not Open Source&lt;/h2&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; is not Open Source and is a complex black box that users struggle to operate.&lt;/p&gt;
&lt;p&gt;It is hard to tell how much this costs companies but I have met with very frustrated customers.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;CTG&lt;/span&gt; is not free of charge but it is often bundled with WebSphere, &lt;span class="caps"&gt;CICS&lt;/span&gt; and other products and it is difficult to isolate its cost from the rest.&lt;/p&gt;
&lt;p&gt;The true cost becomes apparent though for customers migrating off WebSphere because the bundle offer does not apply anymore.&lt;/p&gt;
&lt;h2&gt;Poor and confusing tooling&lt;/h2&gt;
&lt;p&gt;So far we have discussed the runtime aspects of &lt;span class="caps"&gt;CTG&lt;/span&gt; but how about the development time tooling? How do you map the target &lt;span class="caps"&gt;COBOL&lt;/span&gt; data structures to java beans?&lt;/p&gt;
&lt;p&gt;Here there is some confusion. This mainly stems from &lt;span class="caps"&gt;IBM&lt;/span&gt; changing names and branding several times over the last few years.&lt;/p&gt;
&lt;p&gt;The &lt;span class="caps"&gt;COBOL&lt;/span&gt; mapping tools are usually an option buried deep into a much larger developer product:&lt;/p&gt;
&lt;ul&gt;
 &lt;li&gt;Enterprise Application Builder (&lt;span class="caps"&gt;EAB&lt;/span&gt;) within VisualAge for Java (No longer supported)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
 &lt;li&gt;J2C within &lt;span class="caps"&gt;RAD&lt;/span&gt; (Rational Application Developer for WebSphere Software which used to be named &lt;span class="caps"&gt;WSAD&lt;/span&gt; for WebSphere Application Developer)&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
 &lt;li&gt;J2C(?) within RDz (Rational Developer for z/OS which seems to have been recently renamed Rational Developer for zEnterprise)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am not sure about J2C being part of RDz. RDz seems to cover &lt;span class="caps"&gt;CICS&lt;/span&gt; Web Services with tooling that looks quite different from J2C. I know &lt;span class="caps"&gt;CICS&lt;/span&gt; had a &amp;#8220;Web Service Assistant&amp;#8221; a sort of command line utility to map &lt;span class="caps"&gt;COBOL&lt;/span&gt; to &lt;span class="caps"&gt;XML&lt;/span&gt;. RDz might have some &lt;span class="caps"&gt;GUI&lt;/span&gt; on top of that.&lt;/p&gt;
&lt;p&gt;Although these tools are Eclipse based, they are not open source. There is usually a per seat license to be purchased.&lt;/p&gt;
&lt;p&gt;There are several issues with J2C:&lt;/p&gt;
&lt;p&gt;Users complain that the java beans mapping &lt;span class="caps"&gt;COBOL&lt;/span&gt; structures that J2C produces are awkward, the morphology does not always match the original &lt;span class="caps"&gt;COBOL&lt;/span&gt; structure (flattening), property names derived from &lt;span class="caps"&gt;COBOL&lt;/span&gt; data items are unfriendly (use of double underscores), arrays are turned to java arrays instead of more flexible java.util.List, no support for &lt;span class="caps"&gt;REDEFINES&lt;/span&gt;, &amp;#8230;&lt;/p&gt;
&lt;p&gt;J2C also produces java classes that intermingle java to &lt;span class="caps"&gt;COBOL&lt;/span&gt; transformation with remote execution of &lt;span class="caps"&gt;CICS&lt;/span&gt; programs. This tight coupling of language translation features with &lt;span class="caps"&gt;RPC&lt;/span&gt; mechanism was customary 10 years ago but has proven quite limited since then. This is because integration today is a lot more than calling &lt;span class="caps"&gt;CICS&lt;/span&gt; programs. Mainframe data can originate from files, messages, non &lt;span class="caps"&gt;IBM&lt;/span&gt; transaction monitors, etc&amp;#8230; Also data might have to be processed asynchronously, as part of a flow (&lt;span class="caps"&gt;BPEL&lt;/span&gt;) or even in batch which was completely missed by the &lt;span class="caps"&gt;JCA&lt;/span&gt; specs.&lt;/p&gt;
&lt;p&gt;If LegStar was architected on the same principles, it would be impossible to support ESB&amp;#8217;s or ETL&amp;#8217;s for instance.&lt;/p&gt;
&lt;h2&gt;LegStar might help&lt;/h2&gt;
&lt;p&gt;To summarize the &lt;span class="caps"&gt;CTG&lt;/span&gt; situation today, it has relatively limited tooling, is tightly related to &lt;span class="caps"&gt;JCA&lt;/span&gt; and has a weak position within the &lt;span class="caps"&gt;IBM&lt;/span&gt; offering.&lt;/p&gt;
&lt;p&gt;For users considering Open Source and loosely coupled alternatives to &lt;span class="caps"&gt;CTG&lt;/span&gt;, &lt;a href="http://www.legsem.com/legstar/"&gt;LegStar&lt;/a&gt; could come handy.&lt;/p&gt;
&lt;p&gt;At &lt;a href="http://www.legsem.com"&gt;LegSem&lt;/a&gt;, with help from some of our pioneer users, we are building a service offering to help customers move away from &lt;span class="caps"&gt;RAD&lt;/span&gt;/&lt;span class="caps"&gt;CTG&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Our first step is to develop migration tools that can exploit meta data produced by tools such as &lt;span class="caps"&gt;RAD&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;We are also working on an &lt;span class="caps"&gt;ECI&lt;/span&gt; transport for users who want to adopt LegStar &lt;span class="caps"&gt;COBOL&lt;/span&gt; Transformers (to replace the J2C beans) but would rather stick to &lt;span class="caps"&gt;CTG&lt;/span&gt; to get to their mainframe.&lt;/p&gt;
&lt;p&gt;If you are interested, drop us a message at admin (at) legsem (dot) com or use &lt;a href="http://www.legsem.com/contact.php?language=en"&gt;this form&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-3212171465016577943?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/3212171465016577943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/04/migrating-off-ctg.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3212171465016577943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3212171465016577943'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/04/migrating-off-ctg.html' title='Migrating off the CTG?'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-475680754435565933</id><published>2011-03-26T11:02:00.000-07:00</published><updated>2011-03-28T22:55:54.833-07:00</updated><title type='text'>When it comes to Mainframes, nothing is simple</title><content type='html'>&lt;p&gt;The IEEE Software review has published &lt;a href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=5440167"&gt;an article by Belgian researchers&lt;/a&gt; who made an attempt at re-engineering a mainframe application using automated tooling they knew worked in other environments.&lt;/p&gt;

&lt;p&gt;Although the article mentions important lessons learned, it proved once more that it is extremely difficult to reconstruct mainframe applications knowledge automatically from static code analysis.&lt;/p&gt;

&lt;p&gt;They typically ran into an issue, I for one, encountered several times, where an apparently autonomous set of COBOL programs actually calls some Assembler magic that turns control to other hidden programs only identified at runtime. There is little you can't do on a mainframe using Assembler. One thing you can do, is load executables dynamically.&lt;/p&gt;

&lt;p&gt;During the 80's, the heydays of Mainframe programming, every IT shop had one or more Assembler guru's. With much looser budget controls than today, it was possible to spend considerable time developing in-house frameworks, optimizing performances and so forth. Not to say that this only had negative effects, these optimized assembler routines probably saved large amounts of money by reducing CPU consumption, a major parameter on IBM bills.&lt;/p&gt;

&lt;p&gt;Most code analysis tools are COBOL centric. One reason for that is that COBOL is not that hard to parse. To my knowledge, there are no automatic code analysis tools for MVS Assembler (&lt;a href="http://www.assemblerconversion.com/"&gt;DataTek&lt;/a&gt; has an impressive tool for Assembler to COBOL but it usually requires some level of human assistance). That's probably because the level of complexity such a tool would require would be several levels of magnitude higher than COBOL.&lt;/p&gt;

&lt;p&gt;For a typical Mainframe shop, the volume of MVS Assembler programs is much smaller than COBOL. That might explain why vendors would have a hard time cost justifying writing a very complex Assembler code analysis tool.&lt;/p&gt;

&lt;p&gt;So the result of such a situation is that COBOL code analysis tools fail on multilanguage boundaries. Of course there are other multilanguage boundaries on Mainframes for instance: COBOL to BMS or MFS macros, COBOL to JCL, COBOL to SQL, COBOL to CICS, COBOL to IMS not to mention all third party tools one can find on Mainframes. One thing for sure, I have never seen a pure COBOL application.&lt;/p&gt;

&lt;p&gt;The problem is that without reliable code analysis tools, you can't reconstruct knowledge in a bottom up approach. What you end up doing is taking the top down approach, by chasing the last application expert on site, hoping that &lt;a href="http://blogs.computerworld.com/15177/baby_boomer_retirements_another_death_knell_for_cobol"&gt;he hasn't retired yet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The complexity revealed by this IEEE article explains a good part of the Mainframe applications longevity. I know IBM prefers the reliability, availability, security explanation. But I know many IT shops who would have happily migrated off their mainframes if it was easy.&lt;/p&gt;

&lt;p&gt;LegStar is also affected by this complexity of course. I often have a hard time explaining to Java developers why the Java side of LegStar works so easily while the Mainframe side, which has much less code in it, is often much harder to get to work properly...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-475680754435565933?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/475680754435565933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/03/when-it-comes-to-mainframes-nothing-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/475680754435565933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/475680754435565933'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/03/when-it-comes-to-mainframes-nothing-is.html' title='When it comes to Mainframes, nothing is simple'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-2047821523631884060</id><published>2011-02-21T12:44:00.000-08:00</published><updated>2011-02-21T12:44:17.136-08:00</updated><title type='text'>COBOL in a flat world</title><content type='html'>&lt;p&gt;We just released a version of &lt;a href=" http://code.google.com/p/legstar-tos/"&gt;LegStar for Talend Open Studio&lt;/a&gt;. &lt;a href="http://www.talend.org"&gt;Talend&lt;/a&gt; is a well known &lt;a href="http://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;ETL&lt;/a&gt; tool that also expands to the MDM and ESB spaces.&lt;/p&gt;

&lt;p&gt;This is the second ETL tool we interface with. The first one was &lt;a href=""http://kettle.pentaho.com/"&gt;Pentaho Data Integration a.k.a Kettle&lt;/a&gt; for which we released &lt;a href="http://code.google.com/p/legstar-pdi/"&gt;legstar-pdi&lt;/a&gt; back in November 2010.&lt;/p&gt;

&lt;p&gt;With this experiences behind us it becomes clear that ETL tools are row centric. This means that data flowing from one step to another needs to be modeled as a flat, fixed, list of fields. This exactly maps to a classical database row. Not surprising as ultimately, an ETL, must feed database tables somewhere.&lt;/p&gt;

&lt;p&gt;When the starting point is COBOL though, where data structures tend to be very hierarchical, fitting in a flat model is challenging. Here are some considerations to keep in mind.&lt;/p&gt;

&lt;h2&gt;Name conflicts:&lt;/h2&gt;

&lt;p&gt;Flattening a simple hierarchy such as:&lt;/p&gt;
&lt;TEXTAREA NAME="DFH0CFIL" COLS=64 ROWS=5&gt;
        01  ITEM-A.
            05  ITEM-B         PIC X.
            05  ITEM-C.
                10  ITEM-D     PIC 9(4) COMP.
&lt;/TEXTAREA&gt;
&lt;p&gt;is relatively easy, it intuitively maps to: [ItemB:String, ItemD:Short].&lt;/p&gt;

&lt;p&gt;Now what happens for this one (perfectly valid in COBOL):&lt;/p&gt;
&lt;TEXTAREA NAME="DFH0CFIL" COLS=64 ROWS=5&gt;
        01  ITEM-A.
            05  ITEM-B         PIC X.
            05  ITEM-C.
                10  ITEM-B     PIC 9(4) COMP.
&lt;/TEXTAREA&gt;

&lt;p&gt;In a flat model, field names must be unique so [ItemB:String, ItemB:Short] does not work. You need to disambiguate names and produce something like [ItemB:String, ItemC_ItemB:Short].&lt;/p&gt;

&lt;h2&gt;Arrays:&lt;/h2&gt;

&lt;p&gt;Assuming a COBOL data item such as:&lt;/p&gt;
&lt;TEXTAREA NAME="DFH0CFIL" COLS=64 ROWS=2&gt;
            05  ITEM-A OCCURS 5 TIMES  PIC X.
&lt;/TEXTAREA&gt;

&lt;p&gt;we have an new issue since arrays are usually not handled by database schemas.&lt;/p&gt;

&lt;p&gt;Now the solution is to expand each item into a different field. Something like [ItemA_0:String, ItemA_1:String, ItemA_2:String, ItemA_3:String,  ItemA_4:String].&lt;/p&gt;

&lt;p&gt;This is quite wasteful but no real alternatives here.&lt;/p&gt;

&lt;p&gt;In COBOL, the DEPENDING ON clause is often used to limit array sizes and processing time. Here we hit another limitation of the flat models, they are usually fixed in the sense that all fields declared must be present in each row.

&lt;p&gt;
Filling unused fields with null values is a common technique used to tell downstream steps that fields have no value.&lt;/p&gt;

&lt;h2&gt;Redefines:&lt;/h2&gt;

&lt;p&gt;The COBOL REDEFINES clause, a cousin of the C union, is another interesting challenge. Since the flat model is fixed it can't be dynamically changed depending on the REDEFINES alternatives.&lt;/p&gt;

&lt;p&gt;The best solution here is to manage a different set of flat fields for each combination of alternatives. This can be demonstrated with a simple example:&lt;/p&gt;
&lt;TEXTAREA NAME="DFH0CFIL" COLS=64 ROWS=9&gt;
       01 RDEF01-RECORD.
          05 COM-SELECT                  PIC 9(4) COMP.
             88 DETAIL1  VALUE 0.
             88 DETAIL2  VALUE 1.
          05 COM-DETAIL1.
             10 COM-NAME                 PIC X(10).
          05 COM-DETAIL2 REDEFINES COM-DETAIL1.
             10 COM-AMOUNT               PIC 9(5)V99 COMP-3.
&lt;/TEXTAREA&gt;        

&lt;p&gt;Here the COM-SELECT field value determines if COM-DETAIL1 or COM-DETAIL2 is present in the COBOL data.&lt;/p&gt;

&lt;p&gt;This would result in 2 field sets (schemas in ETL parlance):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set1: [ComSelect:Short, ComName:String]&lt;/li&gt;
&lt;li&gt;set2: [ComSelect:Short, ComAmount:Decimal]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The number of field sets you need to contemplate depends on the number of alternatives in each REDEFINE group (an ITEM followed by a set of items redefining its location). Furthermore, if a COBOL structure contains multiple such REDEFINE groups, than all combinations are possible. So lets say a COBOL structure has a first group of 3 alternatives and another of 2 alternatives, there are 6 (3 x 2) possible field sets.&lt;/p&gt;

&lt;p&gt;Fortunately, the number of REDEFINE groups and the number of alternatives in each groups are usually small.&lt;/p&gt;

&lt;p&gt;What this all means is that COBOL structures need somehow to be shoehorned to fit the ETL data model. This is an important difference with ESBs where the data model is usually a much more versatile Java object.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-2047821523631884060?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/2047821523631884060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/02/cobol-in-flat-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/2047821523631884060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/2047821523631884060'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/02/cobol-in-flat-world.html' title='COBOL in a flat world'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-6107573298386137651</id><published>2011-02-08T09:51:00.000-08:00</published><updated>2011-02-08T09:51:52.326-08:00</updated><title type='text'>See you at Maven central</title><content type='html'>&lt;p&gt;&lt;a href="http://repo1.maven.org/maven2/"&gt;Maven central&lt;/a&gt; has long been restricted to a few very large players such as the Apache foundation.&lt;/p&gt;

&lt;p&gt;This has changed recently thanks to a new free offering by &lt;a href="http://nexus.sonatype.org/oss-repository-hosting.html"&gt;Sonatype&lt;/a&gt; for OSS projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.legsem.com/legstar"&gt;LegStar&lt;/a&gt; has been using &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; from the very beginning and more and more users rely on the availability of artifacts in the &lt;a href="http://www.legsem.com/legstar/maven/repo/"&gt;LegStar Maven repository&lt;/a&gt;.&lt;/p&gt;
  
&lt;p&gt;This proprietary repository is not very secure and not always available. Now that it is possible to push artifacts to Maven central I have been busy figuring out how to take advantage of this.&lt;/p&gt;

&lt;p&gt;The major issue is that Maven central's policy is to host artifacts only if their dependencies are also in central. And of course LegStar has dependencies on oss libraries which are not in central&lt;/p&gt;

&lt;p&gt;One of the bad players is the Eclipse foundation. So far, no complete sets of Eclipse bundles are available as Maven artifacts. There are &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=288644"&gt;lengthy discussions&lt;/a&gt; going on but no results yet.&lt;/p&gt;

&lt;p&gt; Besides Eclipse the only other annoying dependency we have in LegStar is Websphere MQ. Of course this one being proprietary, it will never make it to central.&lt;/p&gt;

&lt;p&gt;In order to bootstrap the process of moving to Maven central, I have started to split the modules into separate release units. the first, very limited, release is now in Maven central. You can see the result at &lt;a href="http://mavencentral.sonatype.com/"&gt;this location&lt;/a&gt; by entering the legstar keyword.&lt;/p&gt;

&lt;p&gt;It feels good to be part of the big league&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-6107573298386137651?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/6107573298386137651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/02/see-you-at-maven-central.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6107573298386137651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6107573298386137651'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/02/see-you-at-maven-central.html' title='See you at Maven central'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-5832399747095863398</id><published>2011-01-06T00:29:00.000-08:00</published><updated>2011-01-06T00:29:33.287-08:00</updated><title type='text'>Batch integration with CICS, ETL integration with ESB</title><content type='html'>&lt;p&gt;
  On mainframes, integration between batch and online processes is not simple. In an IBM CICS environment for instance, if  files and databases need to be shared between batch and CICS (and they most always do), you have to deal with a number of issues such as:
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
  Batch processes might update numerous records. It is usually inefficient to commit those changes after each record change. Large number of uncommitted changes means large numbers of locks which in turn affect online activity by slowing down response times or even leading to time out errors.
&lt;/li&gt;

&lt;li&gt;
  Batch processes often deal with files in addition to databases. The most widely used technique to restart a batch after a failure is to backup these files before the batch is started and restore them in case of failure so that the batch can be restarted. Any online activity that dealt with the same files between the batch start and failure worked on uncommitted data.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
To avoid such issues, many mainframe shops initially segregated batch and online activities in different time frames. Typically CICS systems were brought down in the evening while batch processes were running and restarted in the morning.
&lt;/p&gt;

&lt;p&gt;
Because of this strong separation between online and batch activity, very little integration between batch and CICS systems was developed. There was some degree of code reuse with COBOL copybooks but you would never see binary reuse (a batch program calling a CICS program for instance). Actually this was not even possible before IBM introduced the &lt;a href="http://thecicsguy.wordpress.com/2008/09/06/exci-communicating-with-a-cics-program-from-outside-of-cics/"&gt;EXCI technology&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
The mainframe nightly batch window rapidly came under pressure though. As mainframes grew larger and merged with one another, they started serving populations across many time zones. It is not uncommon that users are all over the world. This forced mainframe shops to rearchitect their batch processes and lead IBM to develop new technologies such as EXCI and &lt;a href="http://www.redbooks.ibm.com/abstracts/sg246105.html"&gt;VSAM&lt;/a&gt; Record Level Sharing.
&lt;/p&gt;

&lt;p&gt;
At the same time, the need for business logic reuse between batch and CICS became more important because systems became more complex. Mainframe developers resorted to database triggers, stored procedures or &lt;a href="http://www.redbooks.ibm.com/abstracts/sg247128.html"&gt;WebSphere MQ&lt;/a&gt; triggers, probably beyond the original intent of such technologies, because there was no other way of sharing logic at the binary level.
&lt;/p&gt;

&lt;p&gt;
I am seeing some similarity with the &lt;a href="http://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;ETL&lt;/a&gt; versus &lt;a href="http://en.wikipedia.org/wiki/Enterprise_service_bus"&gt;ESB&lt;/a&gt; situation in the Java world. These systems do very little to integrate with one another today.
&lt;/p&gt;

&lt;p&gt;
By nature, ETL is similar to batch in the sense that it deals with large amounts of records and multiple file systems and databases. ESB is closer to online as it deals with smaller transactional events.
&lt;/p&gt;

&lt;p&gt;
Both ETL and ESB products claim to be transformation engines though and indeed the term "Transformation" is widely used in both type of products documentation. So you might wonder why it is almost impossible to reuse a transformation written for an ETL in an ESB.
&lt;/p&gt;

&lt;p&gt;
If IBM was forced to introduce EXCI for Batch to CICS communication, I wouldn't be surprised if users forced ETL and ESB vendors to integrate with one another more closely.
&lt;/p&gt;

&lt;p&gt;
 I don't mean that ETL and ESB technologies need to be tightly integrated, after all they do different jobs, but yet it would be nice if some level of transformation reusability can be achieved.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-5832399747095863398?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/5832399747095863398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2011/01/batch-integration-with-cics-etl.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5832399747095863398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5832399747095863398'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2011/01/batch-integration-with-cics-etl.html' title='Batch integration with CICS, ETL integration with ESB'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-2243168221275580140</id><published>2010-12-13T11:38:00.000-08:00</published><updated>2010-12-13T11:38:51.756-08:00</updated><title type='text'>Mapping COBOL level 88 to Java</title><content type='html'>&lt;p&gt;Once in a while comes the issue of mapping COBOL data items with associated level 88 condition values to Java. Since this is a complex question, I thought it deserves an entry of its own.
&lt;/p&gt;
&lt;p&gt;This is an example of simple COBOL level 88 data item descriptions.
&lt;/p&gt;
&lt;pre&gt;
     01  MY-ITEM PIC S9(4) COMP.
         88 WRONG-DATA VALUE -1.
         88 NULL-DATA VALUE 0.
&lt;/pre&gt;
&lt;p&gt;First notice that the 88 levels are associated with an actual data item (MY-ITEM). Level 88 items do not occupy any space in memory themselves.
&lt;/p&gt;
&lt;p&gt;The way they are used is that somewhere in the code, you can state:
&lt;/p&gt;
&lt;pre&gt;
         IF WRONG-DATA THEN ...
&lt;/pre&gt;
&lt;p&gt;The condition will be true if, and only if, MY-ITEM contains -1.
&lt;/p&gt;
&lt;p&gt;Such code is more readable than the equivalent:
&lt;/p&gt;
&lt;pre&gt;
         IF MY-ITEM = -1 THEN ...
&lt;/pre&gt;
&lt;p&gt;So this is what it's all about, an improvement to the readability of your COBOL code.
&lt;/p&gt;

&lt;p&gt;So how can such a thing map to Java?
&lt;/p&gt;

&lt;p&gt;First of all, it is easy to confuse COBOL Level 88 with &lt;a href="http://download.oracle.com/javase/1.5.0/docs/guide/language/enums.html"&gt;java enums&lt;/a&gt; . After all, enums are also a readibility improvement feature and they can be used to replace a value with a meaningful label.
&lt;/p&gt;

&lt;p&gt;It is tempting to map MY-ITEM with:

&lt;pre&gt;
    enum MyItem {
        WRONG_DATA(-1), NULL_DATA(0);
        private MyItem(int value) {
            _value = value;
        }

        private int _value;

        final int getValue() {
            return _value;
        }
    };
&lt;/pre&gt;
&lt;p&gt;But there is a fundamental issue in doing so: Enums are actually restrictions. This means only the values that are enumerated (-1 and 0 in our case) are possible.

&lt;p&gt;In the case of COBOL level 88, there are no restrictions on actual values. This means MY-ITEM can contain value 2, which is not described by any level 88.

&lt;p&gt;Furthermore, level 88 are not necessarily atomic values. They can be ranges:

&lt;pre&gt;
       01  ANOTHER-ITEM PIC S9(4) COMP.
           88 CUST-DATA VALUE 9 THRU 975.
&lt;/pre&gt;
&lt;p&gt;Or even list of values:

&lt;pre&gt;
       01  YET-ANOTHER-ITEM PIC S9(4) COMP.
           88 VALID-DATA VALUE 2, 7, 15, 245.
&lt;/pre&gt;           
&lt;p&gt;By now it should be clear why COBOL level 88 does not automatically map to a java variable of some sort with &lt;a href="http://code.google.com/p/legstar/"&gt;LegStar&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://code.google.com/p/legstar-cob2xsd/"&gt;legstar-cob2xsd&lt;/a&gt;  module actually offers an option to map level 88 to XML Schema restrictions in the unlikely case where you are sure the COBOL variable never contains any value outside the enumerated values and enumerated values are atomic. But past that, there is no real support for level 88.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-2243168221275580140?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/2243168221275580140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/12/mapping-cobol-level-88-to-java.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/2243168221275580140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/2243168221275580140'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/12/mapping-cobol-level-88-to-java.html' title='Mapping COBOL level 88 to Java'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-5617967644778315507</id><published>2010-10-25T08:06:00.000-07:00</published><updated>2010-10-25T08:06:42.773-07:00</updated><title type='text'>LegStar for Pentaho Data Integration (Kettle)</title><content type='html'>&lt;p&gt;I have spent the last few weeks digging into open source &lt;a href="http://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;ETL&lt;/a&gt; tools.&lt;/p&gt;
&lt;p&gt;The 3 most quoted products are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://kettle.pentaho.com/"&gt;Pentaho Data Integration&lt;/a&gt; (Kettle)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.talendforge.org/"&gt;Talend&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://http://www.cloveretl.com/"&gt;Clover ETL&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It turns out Clover is only partially open source. The GUI is proprietary. So I spent more time on PDI and Talend.&lt;/p&gt;
&lt;p&gt;PDI is the oldest product and, perhaps as a consequence, has the largest community. You can get a sense of that by comparing the &lt;a href="http://www.ohloh.net/p/3624"&gt;Ohloh page for PDI&lt;/a&gt; to the &lt;a href="http://www.ohloh.net/p/10374"&gt;Ohloh page for Talend&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But if you compare new threads per day on the &lt;a href="http://forums.pentaho.com/forumdisplay.php?135-Pentaho-Data-Integration-Kettle"&gt;PDI forum&lt;/a&gt; to that of the &lt;a href=""&gt;Talend forum&lt;/a&gt;, you can see that Talend is doing good too.&lt;/p&gt;
&lt;p&gt;I decided to try out PDI first and developed a proof of concept implementation of &lt;a href="http://code.google.com/p/legstar-pdi/"&gt;LegStar for PDI&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can see the result on &lt;a href="http://code.google.com/p/legstar-pdi/"&gt;Google code&lt;/a&gt; as usual.
&lt;p&gt;I have to say that I am very impressed with PDI, a product originally called Kettle and developed by &lt;a href="http://www.ibridge.be/?page_id=2"&gt;Matt Casters&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;PDI comes with a framework for people to develop additional plugins. For those who are interested, there is an excellent &lt;a href="http://type-exit.org/adventures-with-open-source-bi/2010/06/developing-a-custom-kettle-plugin-a-simple-transformation-step/"&gt;blog entry by Slawomir Chodnicki&lt;/a&gt; to get started.&lt;/p&gt;
&lt;p&gt;I was able to reuse part of the PDI internal test framework to automate testing of my plugin. I have automated unit tests and integration tests&lt;/p&gt;
&lt;p&gt;It is also quite easy to deploy new plugins in PDI. It is a matter of packaging the plugin as a jar, and dropping it to a particular location.&lt;/p&gt;
&lt;p&gt;As usual, it is extremely helpful that the product is open source. In particular, I could easily debug my plugin in Eclipse, stepping through PDI code as well as my code.&lt;/p&gt;
&lt;p&gt;My only regrets with PDI is that there is little &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt; support and that the code is often not commented. This being said, that did not prevent me from using Maven for all lifecycle phases of my plugin and was able to find my way into the PDI code which is usually readable enough.&lt;/p&gt;
&lt;p&gt;PDI also has support for parallel processing and clustering that I did not explore yet. I am looking forward to playing with these features next.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-5617967644778315507?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/5617967644778315507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/10/legstar-for-pentaho-data-integration.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5617967644778315507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5617967644778315507'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/10/legstar-for-pentaho-data-integration.html' title='LegStar for Pentaho Data Integration (Kettle)'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-688845394729472341</id><published>2010-10-12T08:34:00.000-07:00</published><updated>2010-10-12T08:34:55.886-07:00</updated><title type='text'>VSAM to CSV using LegStar</title><content type='html'>&lt;p&gt;
I was wondering how hard it would be to translate a z/OS VSAM file content to a CSV file using LegStar.&lt;/p&gt;
&lt;p&gt;
So I started with a very trivial case:&lt;/p&gt;
&lt;p&gt;
CICS comes with a sample VSAM KSDS file called FILEA (see hlq.CICS.SDFHINST(DFHDEFDS)). FILEA is an 80 characters, fixed sized record file.&lt;/p&gt;
&lt;p&gt;
The records in FILEA are described by a COBOL copybook called DFH0CFIL (in hlq.CICS.SDFHSAMP). The content of DFH0CFIL looks like this:&lt;/p&gt;
&lt;TEXTAREA NAME="DFH0CFIL" COLS=64 ROWS=9&gt;
        02  FILEREC.
          03  STAT           PIC X.
          03  NUMB           PIC X(6).
          03  NAME           PIC X(20).
          03  ADDRX          PIC X(20).
          03  PHONE          PIC X(8).
          03  DATEX          PIC X(8).
          03  AMOUNT         PIC X(8).
          03  COMMENT        PIC X(9).
&lt;/TEXTAREA&gt;
&lt;p&gt;
My first step was to extract the VSAM file content to a sequential file using a JCL like this one on z/OS:&lt;/p&gt;
&lt;TEXTAREA NAME="REPRO" COLS=64 ROWS=9&gt;
//REPRO    EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//IN       DD  DISP=SHR,DSN=hlq.CICS.FILEA
//OUT      DD DISP=(MOD,CATLG,DELETE),DSN=hlq.CICS.FILEA.BKP,
//           SPACE=(TRK,(45,15)),UNIT=3390,
//           DCB=(BLKSIZE=0,LRECL=80,RECFM=FB)
//SYSIN    DD  *
  REPRO IFILE(IN) OFILE(OUT)
//*
&lt;/TEXTAREA&gt;
&lt;p&gt;
I then downloaded the sequential file to my workstation using regular FTP in binary mode:&lt;/p&gt;
&lt;TEXTAREA NAME="ftp" COLS=64 ROWS=6&gt;
ftp&gt; bin
200 Representation type is Image
ftp&gt; get 'hlq.CICS.FILEA.BKP'
200 Port request OK.
125 Sending data set hlq.CICS.FILEA.BKP FIXrecfm 80
250 Transfer completed successfully.
&lt;/TEXTAREA&gt;
&lt;p&gt;
On the java side now, I created a &lt;a href="http://www.legsem.com/legstar/legstar-coxbgen/"&gt;LegStar Transformer&lt;/a&gt; from the DFH0CFIL COBOL copybook. This results in a FilerecTransformers class.&lt;/p&gt;
&lt;p&gt;
The following code snippet, is what I needed to write to get my CSV file:&lt;/p&gt;
&lt;TEXTAREA NAME="ftp" COLS=64 ROWS=20 WRAP=OFF&gt;

      FileInputStream fs = null;
      try {
        String LS = System.getProperty("line.separator");

        fs = new FileInputStream(new File("hlq.CICS.FILEA.BKP"));
        byte[] hostRecord = new byte[FilerecBinding.BYTE_LENGTH];
        FilerecTransformers tf = new FilerecTransformers();

        FileWriter fw = new FileWriter(new File("filea.csv"));
        fw.write("STAT;NUMB;NAME;ADDRX;PHONE;DATEX;AMOUNT;COMMENT");
        fw.write(LS);

        int count = fs.read(hostRecord);
        while(count &gt; 0) {
          Filerec javaRecord = tf.toJava(hostRecord);
          fw.write(javaRecord.getStat());
          fw.write(";");
          fw.write(javaRecord.getNumb());
          fw.write(";");
          fw.write(javaRecord.getName());
          fw.write(";");
          fw.write(javaRecord.getAddrx());
          fw.write(";");
          fw.write(javaRecord.getPhone());
          fw.write(";");
          fw.write(javaRecord.getDatex());
          fw.write(";");
          fw.write(javaRecord.getAmount());
          fw.write(";");
          fw.write(javaRecord.getComment());
          fw.write(LS);
          count = fs.read(hostRecord);
        }
        fw.close();

      } catch (IOException e) {
        e.printStackTrace();
      } catch (HostTransformException e) {
        e.printStackTrace();
      } finally {
        if (fs != null) {
          try {
            fs.close();
          } catch (IOException e) {
            e.printStackTrace();
          }
        }
      }
&lt;/TEXTAREA&gt;
&lt;p&gt;
Of course this is a very contrived example, both because the VSAM file is fixed size and the record data is only made of characters.&lt;/p&gt;
&lt;p&gt;
In a more realistic case, the records will contain all sorts of numerics: compressed, zoned or edited and chances are that some redefines and arrays will complexify the setting. This is where &lt;a href="http://www.legsem.com/legstar"&gt;LegStar&lt;/a&gt; should really become useful.&lt;/p&gt;
&lt;p&gt;
There are other interesting questions when you get to that point:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assuming you need to regularly extract the content of a file, how do you automate a distributed process like this one?&lt;/li&gt;
&lt;li&gt;How would you do that reliably; meaning you don't process the same data twice or miss part of it?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/Extract,_transform,_load"&gt;ETL&lt;/a&gt; (Extract Transfer Load) tools are typically focused on these issues. I became quite curious about them recently.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-688845394729472341?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/688845394729472341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/10/vsam-to-csv-using-legstar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/688845394729472341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/688845394729472341'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/10/vsam-to-csv-using-legstar.html' title='VSAM to CSV using LegStar'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-5969203047243404237</id><published>2010-08-22T00:43:00.000-07:00</published><updated>2010-10-12T08:07:43.888-07:00</updated><title type='text'>Mule 3.0 is here</title><content type='html'>&lt;p&gt;&lt;a href="http://www.mulesoft.org/"&gt;Mule ESB&lt;/a&gt; is undergoing its next mutation with the upcoming version 3.0.  Mule ESB has always been one of the easiest ESB's to setup and work with. The intelligent combination of &lt;a href="http://www.springsource.com/developer/spring"&gt;Spring&lt;/a&gt; and other open source technologies gives outstanding results.&lt;/p&gt;&lt;p&gt;An example of a unique feature, is the JUnit-based framework that comes with Mule. It is enormously convenient to be able to create a complete test case and run the entire Mule server from a single JUnit class! When I work with other ESB's I really miss this one.&lt;/p&gt;&lt;p&gt;Another example is the Spring-based configuration system. It is difficult to grasp all the power that you get from this. By contrast, ESB's that use proprietary DSL's for their configurations are limited to the features they build. With Spring, you can pretty much inject anything into you Mule configuration and reference that from anywhere else in the configuration.&lt;/p&gt;&lt;p&gt;A third example is the leveraging of &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;  in various areas. Build management of course but also providing partners with Maven archetypes to help them bootstrap their transports and modules developments. That's so much better than documentation and samples.&lt;/p&gt;&lt;p&gt;These features alone could explain why Mule has become so popular.&lt;/p&gt;&lt;p&gt;Inevitably though, as larger companies and organizations started using it, demand for entreprise-class features has increased. Message flows that users needed to describe to Mule have become more complex. The limitations of the "endpoint/transformer/service" buiding blocs became apparent (Behaviors such as "Remote Sync" are still pretty obscure to me).&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.mulesoft.org/mule-story-3-power-to-the-user/"&gt;Mule 3.0 is introducing a new "flow" concept&lt;/a&gt; that should allow description of complete pipelines. I haven't played much with that yet but really looking forward to.&lt;/p&gt;&lt;p&gt;When you deploy large number of services in a single server instance, the class loading mechanism comes under stress. Typical problems are the need to share libraries and multiple versions of libraries having to coexist.&lt;/p&gt;&lt;p&gt;You don't solve problems like these without some major overhaul. &lt;a href="http://www.mulesoft.org/documentation/display/MULECDEV/3.0+Features"&gt;Mule 3.0 is introducing a completely new deployment mechanism&lt;/a&gt; with features such as hot deployment.&lt;/p&gt;&lt;p&gt;Because there are major architectural changes, Mule 3.0 is not backward compatible. This might sound like an heresy to Mainframe people but remember how IBM CICS went from macro-level API to command-level APIs.&lt;/p&gt;&lt;p&gt;The reality is that you can't deal with core architectural issues without fundamental refactoring.&lt;/p&gt;&lt;p&gt;The good news is that the migration process is not that painful and is &lt;a href="http://www.mulesoft.org/documentation/display/MULEMIG/Migrating+Mule+2.2+to+3.0"&gt;well documented&lt;/a&gt;. It took me only a few days of work to migrate the &lt;a href="http://www.mulesoft.org/documentation/display/LEGSTAR/Home"&gt;LegStar for Mule transport&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;In the mainframe world, version 3 was usually the most complete and stable version. Looking at &lt;a href="http://www.mulesoft.org/documentation/display/MULECDEV/Mule+3"&gt;Mule 3.0 feature set&lt;/a&gt;, it could very well be the case for Mule too.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-5969203047243404237?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/5969203047243404237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/08/mule-esb-is-undergoing-its-next.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5969203047243404237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5969203047243404237'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/08/mule-esb-is-undergoing-its-next.html' title='Mule 3.0 is here'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-8645980582024473239</id><published>2010-07-23T09:42:00.000-07:00</published><updated>2010-07-23T10:32:41.729-07:00</updated><title type='text'>JSON to COBOL</title><content type='html'>It turns out it is fairly simple to transform JSON strings to COBOL using &lt;a href="http://www.legsem.com/legstar"&gt;LegStar&lt;/a&gt; and &lt;a href="http://jackson.codehaus.org/"&gt;Jackson&lt;/a&gt;.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;To do this you would start from a COBOL fragment and use the usual &lt;a href="http://code.google.com/p/legstar-cob2xsd/"&gt;LegStar COBOL to XSD translator&lt;/a&gt; and then generate transformers using &lt;a href="http://www.legsem.com/legstar/legstar-coxbgen"&gt;LegStar COBOL Binding Generator&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Here is a sample JUnit code performing transformation from JSON to COBOL and vice versa:&lt;/div&gt;&lt;div&gt;&lt;pre&gt;
package json.lsfileae.test;

import java.io.StringWriter;

import org.codehaus.jackson.map.AnnotationIntrospector;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;

import com.legstar.coxb.host.HostData;
import com.legstar.test.coxb.lsfileae.Dfhcommarea;
import com.legstar.test.coxb.lsfileae.bind.DfhcommareaTransformers;

import junit.framework.TestCase;

/**
* Unit test JSON/COBOL transformation.
*/
public class JacksonTest
extends TestCase {

 /** Hex EBCDIC data orignating from mainframe. */
 public static final String HOST_DATA =
     /*0 0 0 1 0 0 */
     "f0f0f0f1f0f0"
     /*  S .  D .   B O R M A N                  */
     + "e24b40c44b40c2d6d9d4c1d54040404040404040"
     /*  L A B A S   S T R E E T                 */
     + "e2e4d9d9c5e86b40c5d5c7d3c1d5c44040404040"
     /*  3 2 1 5 6 7 7 8 */
     + "f3f2f1f5f6f7f7f8"
     /*  2 6   1 1   8 1  */
     + "f2f640f1f140f8f1"
     /*  $ 0 1 0 0 . 1 1  */
     + "5bf0f1f0f04bf1f1"
     /*  * * * * * * * * *  */
     + "5c5c5c5c5c5c5c5c5c"
 ;

 /** JSON serialization of the host data. */
 public static final String JSON_DATA =
   "{\"comNumber\":100," +
   "\"comPersonal\":{\"comName\":\"S. D. BORMAN\"," +
   "\"comAddress\":\"SURREY, ENGLAND\"," +
   "\"comPhone\":\"32156778\"}," +
   "\"comDate\":\"26 11 81\"," +
   "\"comAmount\":\"$0100.11\"," +
   "\"comComment\":\"*********\"}";

 /** Jackson mapper. */
 private ObjectMapper _mapper;

 /** LegStar transformer. */
 private DfhcommareaTransformers _transformer;

 public void setUp() {
   _mapper = new ObjectMapper();
   AnnotationIntrospector introspector = new JaxbAnnotationIntrospector();
   _mapper.getDeserializationConfig().setAnnotationIntrospector(introspector);
   _mapper.getSerializationConfig().setAnnotationIntrospector(introspector);
   _transformer = new DfhcommareaTransformers();
 }

 /**
  * Transform host data to JSON and check
  * @throws Exception if transformation fails
  */
 public void testHostToJson() throws Exception {
   StringWriter sw = new StringWriter();
   _mapper.writeValue( sw, _transformer.toJava(HostData.toByteArray(HOST_DATA)));
   assertEquals(JSON_DATA,  sw.toString());
 }

 /**
  * Transform JSON to host data and check
  * @throws Exception if transformation fails
  */
 public void testJsonToHost() throws Exception {
   Dfhcommarea dfhcommarea = _mapper.readValue(JSON_DATA, Dfhcommarea.class);
   byte[] hostData = _transformer.toHost(dfhcommarea);
   assertEquals(HOST_DATA, HostData.toHexString(hostData));
 }
}

&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-8645980582024473239?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/8645980582024473239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/07/json-to-cobol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/8645980582024473239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/8645980582024473239'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/07/json-to-cobol.html' title='JSON to COBOL'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-6201080162594838043</id><published>2010-07-13T11:10:00.000-07:00</published><updated>2010-07-13T11:24:10.675-07:00</updated><title type='text'>MuleSoftwebinar with MDI and LegStar</title><content type='html'>MuleSoft is putting together a Webinar on wednesday July 14th which features &lt;a href="http://www.mulesoft.org/"&gt;Mule ESB + MDI&lt;/a&gt; + &lt;a href="http://www.mulesoft.org/documentation/display/LEGSTAR/Home"&gt;LegStar&lt;/a&gt;.

You can join the webinar &lt;a href="https://mulesoftevents.webex.com/mw0306l/mywebex/default.do;jsessionid=dNTnM8dYj2ZJsL3nwPpPQzrTby6CZGzkRk1BfsxsnpX3JvYQp8nx!491214213?nomenu=true&amp;amp;siteurl=mulesoftevents&amp;amp;service=6&amp;amp;main_url=https%3A%2F%2Fmulesoftevents.webex.com%2Fec0605l%2Feventcenter%2Fevent%2FeventAction.do%3FtheAction%3Ddetail%26confViewID%3D278979644%26siteurl%3Dmulesoftevents%26%26%26"&gt;here&lt;/a&gt;.

&lt;div&gt;It tells a very compelling story where you want to web enable a CICS/COBOL program but would like a very different message structure than the original COBOL program input and output.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;In this scenario LegStar does the COBOL parsing and mainframe transport while MDI takes over the transformation. The result is a Web Service with a nice interface deployed in Mule ESB. MDI really adds value here in that it hides the ugly COBOL structure and expose a set of friendly java classes instead.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;COBOL structures, which typically describe CICS commareas, are often complex and convoluted due to the limitation of COBOL but also the need to reduce external calls and therefore cramming as much data as possible in a single commarea.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Exposing such complex structures as web services results in WSDL that is quite difficult to manipulate. MDI can be used to visually map these complex structures with simpler java classes and hence expose a nicer web service.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-6201080162594838043?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/6201080162594838043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/07/mulesoftwebinar-with-mdi-and-legstar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6201080162594838043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6201080162594838043'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/07/mulesoftwebinar-with-mdi-and-legstar.html' title='MuleSoftwebinar with MDI and LegStar'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-3174640591244633647</id><published>2010-07-09T02:29:00.000-07:00</published><updated>2010-07-09T02:50:47.864-07:00</updated><title type='text'></title><content type='html'>&lt;div&gt;Just finished a series of videos showcasing how to create a mainframe adapter with &lt;a href="http://code.google.com/p/legstar-jbossesb/"&gt;LegStar for JBoss ESB&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I have become a fan of video demoes. I find them a lot easier to follow than reading paper documentation.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;So I embarked in doing my own video demoes. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;There are 2 things that I found amazing while doing this:&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;How difficult it is to get something as obvious as a product demo video done&lt;/li&gt;&lt;li&gt;How much data you can store on &lt;a href="http://www.youtube.com/"&gt;YouTube&lt;/a&gt; for free!&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I had 3 choices when I started:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;filming myself doing the demo&lt;/li&gt;&lt;li&gt;doing screen captures of the demo and recording my voice&lt;/li&gt;&lt;li&gt;doing screen captures of the demo and adding subtitles&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I ended up doing option 2. I ruled out option 1 for aesthetic reasons &lt;img border='0' height='18' src='http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/1.gif' width='18'/&gt; and 3 because I couldn't figure out how to do it &lt;img border='0' height='18' src='http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/2.gif' width='18'/&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I have been told that it would have been much easier on a Mac. Unfortunately, I am still a Windows user (Although I have one machine running &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;, another running &lt;a href="http://mirrors.fedoraproject.org/"&gt;Fedora core&lt;/a&gt; and several other unixes running in &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt;).&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I started by using Microsoft MovieMaker which is quite easy to learn, but the result was disappointing. I couldn't get the quality to be acceptable once the video was uploaded.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;One of the issues with such product demoes is that you want the GUI to be readable. This is impossible with small frame sizes. Typically MovieMaker would not allow me to pick up 1024x768, which is what I ended up needing for the Eclipse GUI.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;So I turned to these free products:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://camstudio.org/"&gt;CamStudio&lt;/a&gt; for video recording&lt;/li&gt;&lt;li&gt;&lt;a href="http://audacity.sourceforge.net/"&gt;Audacity&lt;/a&gt; for audio recording&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.virtualdub.org/"&gt;Virtualdub&lt;/a&gt; for video editing&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I also had to bring in the &lt;a href="http://www.xvidmovies.com/codec/"&gt;Xvid MPEG-4 Codec&lt;/a&gt; for compression. It turns out this is a codec that YouTube supports very well so there is very little quality loss when you upload to YouTube.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The &lt;a href="http://code.google.com/p/legstar-jbossesb/wiki/AdapterVideoContent"&gt;result&lt;/a&gt; is not too bad although it still feels quite amateurish.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I have spent several days doing this, but feel I would need a lot lot more to make it look professional.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Hopefully this will be enough to help people learn the product faster.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-3174640591244633647?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/3174640591244633647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/07/just-finished-series-of-videos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3174640591244633647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3174640591244633647'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/07/just-finished-series-of-videos.html' title=''/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-1994961368495606225</id><published>2010-04-24T01:15:00.000-07:00</published><updated>2010-04-24T02:27:33.307-07:00</updated><title type='text'>From TUI to WUI, not that simple</title><content type='html'>Mainframes 3270 interfaces are usually text based. Even though, graphics are possible on mainframes, they are rarely used. Users of such systems are familiar with the black background and green/blue text but more importantly, they are also familiar with the function key paradigm.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;With 3270, nothing is transmitted to the host until a function key is pressed. Very little validation occur when the user fills in the input forms. This is not unlike HTML forms which are only posted when a command button is clicked.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;For that reason, most solutions available today for scraping 3270 interfaces are based on HTML/JSP technologies.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;One of the drawbacks though is the "flickering effect" that HTML/JSP suffers from when forms are posted. The entire web page is refreshed every time you interact with the host.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The 3270 protocol was smarter and able to refresh only those parts of the display that had actually changed. Many users living the transition from TUI to WUI complain about this. 3270 could optimize screen refresh because terminals were dumb. Terminals new very little about the semantics of the data they received (hence the limited local validation they could perform). Data was fundamentally just a stream of characters and associated positions/attributes on screen.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;WUI have evolved past the "function key" and flickering effect by adopting the Ajax technologies so you might think that Ajax-based screen scraping solutions would be a perfect solution.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;In reality though, Ajax is useless if you don't transfer logic from the host to the browser. The real Ajax added value is in allowing web applications to behave more like "rich clients".&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;What this all means is that if you have a mainframe 3270-based application that you are not willing to modify, there is little chance you will be able to build a rich, web-based, user interface to it.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-1994961368495606225?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/1994961368495606225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/04/from-tui-to-wui-not-that-simple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/1994961368495606225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/1994961368495606225'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/04/from-tui-to-wui-not-that-simple.html' title='From TUI to WUI, not that simple'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-7169743642438468814</id><published>2010-03-07T07:41:00.000-08:00</published><updated>2010-03-07T08:02:37.994-08:00</updated><title type='text'>Itemscript a serious JSON library for java</title><content type='html'>&lt;div&gt;&lt;a href="http://www.json.org/"&gt;JSON&lt;/a&gt;  is an interesting alternative to XML. It has originally grown from javaScript but is now widely available for a large number of languages and many libraries are built with JSON support.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Of particular interest is the constant focus of the JSON community on simplicity. The moto seems to be: anything you can do with XML you can do with JSON, faster and cheaper.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href="http://itemscript.org/"&gt;itemscript&lt;/a&gt;  is an example of such a library.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Itemscript is a rich JSON API for java. This is a sample taken from the product test cases that illustrates some of the nice aspects of the API:&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        JsonArray array = system().createArray()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                .a("foo")&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                .a(1)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                .a(1.5)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                .a(true)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;                .a(123L);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals("foo", array.getString(0));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals((Integer) 1, array.getInt(1));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals((Double) 1.5, array.getDouble(2));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals((Float) 1.5f, array.getFloat(2));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals((Boolean) true, array.getBoolean(3));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals((Long) 123L, array.getLong(4));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;Notice the elegant chaining of add operations and the automatic type inferencing mechanism.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Itemscipt also has a binding mechanism called the Foundry that ties POJOs to JSON. The best way to illustrate this is to look at &lt;a href="http://code.google.com/p/itemscript/source/browse/trunk/itemscript/src/org/itemscript/test/JsonFoundryTest.java"&gt;some code&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;On top of the JSON API, itemscript provides a way to store and query JSON objects in a RESTful manner creating an in-memory database of linked objects. This is an example inspired by the &lt;a href="http://code.google.com/p/itemscript/source/browse/trunk/itemscript/src/org/itemscript/examples/Examples.java"&gt;itemscript samples&lt;/a&gt;:&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        /* create a hierarchy */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        system.put("mem:/abc/def", "123");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        system.put("mem:/abc/ghi", "456");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        /* query the in-memory data */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals(2, (int) system.getInt("mem:/abc?countItems"));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        JsonArray keys = system.getArray("mem:/abc?keys");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals("[\"ghi\",\"def\"]", keys.toCompactJsonString());&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        JsonArray pagedItems = system.getArray("mem:/abc?pagedItems&amp;amp;numRows=2&amp;amp;startRow=0");&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;        assertEquals("[[\"def\",\"123\"],[\"ghi\",\"456\"]]", pagedItems.toCompactJsonString());&lt;/span&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;        &lt;/div&gt;&lt;div&gt;Last but not least, Itemscript is &lt;a href="http://code.google.com/p/itemscript/"&gt;open source and is hosted on Google code&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I am thinking of ways to leverage libraries such as itemscript to provide COBOL to JSON binding. As JSON becomes more and more popular there are good chances its trajectory will cross the legacy applications one. Would be nice to have LegStar at the junction. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-7169743642438468814?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/7169743642438468814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2010/03/itemscript-serious-json-library-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/7169743642438468814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/7169743642438468814'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2010/03/itemscript-serious-json-library-for.html' title='Itemscript a serious JSON library for java'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-6034115907197339592</id><published>2009-12-18T02:05:00.000-08:00</published><updated>2009-12-18T02:23:18.474-08:00</updated><title type='text'>A Maven plugin to upload sources on z/OS</title><content type='html'>LegStar is a mix of Java code and z/OS native code written in C370 and COBOL.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The LegStar build system makes extensive use of &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;, a widely used build automation tool. Maven drives the LegStar release process by pulling source code from SCM, compiling, testing and generating documentation.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;All the legStar z/OS native source code is managed locally using &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt;.  What was missing so far was the capability to upload and compile these sources on z/OS as part of the Maven build lifecycle.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;After several attempts at using the &lt;a href="http://ant.apache.org/manual/OptionalTasks/ftp.html"&gt;ant FTP&lt;/a&gt; task, I decided to write my own Maven plugin. Following the tradition of open sourcing everything in LegStar, you can find the&lt;a href="http://code.google.com/p/legstar-zosupload-maven-plugin/"&gt; zosupload project&lt;/a&gt; on google hosting.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;It is quite rudimentary at this stage but it has the minimal capability to upload sources in various PDS libraries, submitting JCL for execution and checking condition codes returned as part of a Maven build.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I expect others will have the same mix of local Java and native z/OS code they would like to keep in sync so I am hoping they will contribute to that project.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-6034115907197339592?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/6034115907197339592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/12/maven-plugin-to-upload-sources-on-zos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6034115907197339592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6034115907197339592'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/12/maven-plugin-to-upload-sources-on-zos.html' title='A Maven plugin to upload sources on z/OS'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-1302987195015626985</id><published>2009-12-07T10:14:00.000-08:00</published><updated>2009-12-07T10:18:38.885-08:00</updated><title type='text'>COBOL-aware middleware</title><content type='html'>&lt;div&gt;Two phenomenons with opposing effects have affected COBOL structures over time.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The first one is a tendency to construct complex data structures with many fields. This would allow to store a maximum amount of information in a VSAM record or database segment for instance. This was an important factor in reducing physical I/O and getting the best performances possible. When data structures were passed from program to program, they also tended to be large structures because developers would typically try to reduce the number of programs and hence, would rather write big programs that handle many cases than many smaller programs.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;When the mainframe opened up to program to program communication over networks though, these large structures became a problem because networks were slow. So the next tendency was to try to find ways to reduce the size of the data sent over the network even if the structures stayed complex and large.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The most widely used mechanism to reduce the size of the data is the variable size array (an array with the DEPENDING ON clause). This is a awkward type of array for people used to java and C. It is an array which actual size is given by a variable, appearing somewhere in the structure (before the array itself).&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The second mechanism is not related to COBOL per-se but more with the middleware used. Because structures contain many fields, it often happens that these fields contain default values. For instance, alphanumeric fields might contain binary zeros, which is usually interpreted as "no content". If the middleware is smart enough, it can avoid sending these non initialized fields over the network thus saving a lot of bandwidth.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Variable size arrays also need to be handled correctly by middleware. For instance sending the maximum number of items would be wasteful. A more tricky situation arises when the middelware invokes a mainframe program that returns a variable size array. Often, the memory needed by the target program to operate must be allocated beforehand by the middleware. But how can the middleware anticipate the number of rows that the program will return?&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;As you can see there are good reasons why middleware used to communicate with mainframe programs need to be COBOL-aware. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-1302987195015626985?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/1302987195015626985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/12/cobol-aware-middleware.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/1302987195015626985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/1302987195015626985'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/12/cobol-aware-middleware.html' title='COBOL-aware middleware'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-4618346609522002537</id><published>2009-11-22T07:32:00.000-08:00</published><updated>2009-11-22T08:10:19.923-08:00</updated><title type='text'>First experience with cloud computing (sort of)</title><content type='html'>Like many of you I am sure, I have been pounded with loads of articles on cloud computing.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I start to consider that there is something in a technology beyond pure marketing hype when &lt;a href="http://www.computer.org/portal/web/csdl/abs/mags/ic/2009/05/mic200905toc.htm"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;IEEE&lt;/span&gt; Internet Computing&lt;/a&gt; dedicates a complete issue to the topic, which they did in October 2009.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;So I decided to take a look and started using &lt;a href="http://code.google.com/appengine/"&gt;Google App Engine&lt;/a&gt; because it is free below certain quotas and also because I had some early experience of the Google Web Toolkit which is well supported by GAE.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;GAE allows you to run java applications, actually classical J2&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;EE&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Servlets&lt;/span&gt;, with a number of restrictions (for instance you cannot write to a file or open a port).&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Since we recently restarted the &lt;a href="http://code.google.com/p/legstar-cob2xsd/"&gt;COBOL Structure to XML Schema project&lt;/a&gt;, it seemed like a good idea to deploy it as a service available on the cloud. This way, developers who would like to get a sense of what the product does without investing time downloading and installing can do so.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The result is &lt;a href="http://legstar-cob2xsd.appspot.com/"&gt;now available&lt;/a&gt; and I almost immediately started to get hits... and problems.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The first problem of course is that the translator is not a COBOL validating parser. I mean it is not a complete syntax checker. It is meant to process COBOL fragments that are supposed to compile OK in the first place. And yet, it is tempting to type COBOL statements in the input &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;textarea&lt;/span&gt; of an HTML page, starting at column 1 instead of column 8. Today you often end up with an empty XML schema because the parser dropped everything that it did not recognize. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I guess we'll have to add more syntax checks after all. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The second problem has to do with GAE itself and Java. It has been &lt;a href="http://groups.google.com/group/google-appengine/browse_thread/thread/22692895421825cb"&gt;discussed extensively&lt;/a&gt; on the Google App Engine group. When requests are received by GAE it picks up an instance of a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;VM&lt;/span&gt; somewhere on the cloud to service it. Chances are that this &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;VM&lt;/span&gt; was last used for something totally different from running your own application. For this reason, Google actually cold starts the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;VM&lt;/span&gt;, which results in a large consumption of CPU... that counts against your quota!&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Humm&lt;/span&gt;. That first experience has changed my view on cloud computing!&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-4618346609522002537?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/4618346609522002537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/11/first-experience-with-cloud-computing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4618346609522002537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4618346609522002537'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/11/first-experience-with-cloud-computing.html' title='First experience with cloud computing (sort of)'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-7088719062489740737</id><published>2009-11-18T09:09:00.000-08:00</published><updated>2009-11-18T09:34:42.959-08:00</updated><title type='text'>COBOL is weakly typed</title><content type='html'>Yes, whatever proponents think, COBOL is far from an ideal programming language.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Try to push an integer into a Java String and you will be stopped at compilation time.  Now try something like "MOVE 15 TO A" where A has been defined as PIC X(2) and not only the compiler will let you through but even at runtime, that will actually work. You end up with the EBCDIC representation of characters '1' and '5' as the content of A.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Actually, you can move pretty much anything into a COBOL PIC X. You commonly do things like "MOVE LOW-VALUES TO A" where you end up with A filled with binary zeros. This is particularly useful in CICS/BMS applications where a field filled with low values will result in no data sent to a screen while a field filled with space characters will increase the volume of data sent (and therefore use up the, once precious, network bandwidth). &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;This is always a source of problems with integration solutions because the most natural mapping to a COBOL PIC X is a Java String. So you actually map a COBOL type that is not limited to characters to a Java type that only accepts characters.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;It is important that an alternative mapping be available. Typically it is sometimes necessary to map a PIC X to a Java byte[]  because the content cannot predictably be converted to characters. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;When mapping to a Java String is mandatory (it usually is), it is also important that low level conversion routines remove non character content coming from the COBOL program before the Java String is populated.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Conversely, it is important that non character content gets inserted in the COBOL data when needed. For instance, if a COBOL field needs to be filled with low values (as opposed to space characters)  then the integration conversion routines should provide an option to do so. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Keep in mind that the mainframe program might react differently to a field filled with low values as opposed to one filled with characters!&lt;/div&gt;&lt;div&gt;
&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-7088719062489740737?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/7088719062489740737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/11/cobol-is-weakly-typed.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/7088719062489740737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/7088719062489740737'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/11/cobol-is-weakly-typed.html' title='COBOL is weakly typed'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-7110918753568826565</id><published>2009-11-13T03:22:00.000-08:00</published><updated>2009-11-13T03:56:23.851-08:00</updated><title type='text'>A new COBOL structure to XML schema translator</title><content type='html'>I have posted an initial release of a new project called &lt;a href="http://code.google.com/p/legstar-cob2xsd/"&gt;legstar-cob2xsd&lt;/a&gt; that basically does COBOL structure to XML Schema translation.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;There were several factors that led to this project:&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;The &lt;a href="http://www.legsem.com/legstar/legstar-schemagen/index.html"&gt;legstar-schemagen&lt;/a&gt; module in LegStar that does the job today was written in C and the parsing logic was hand coded. I think this might have driven away some users.  legstar-cob2xsd is pure java and uses ANTLR grammars for COBOL structure parsing.&lt;/li&gt;&lt;li&gt;There is a clear need for an autonomous open source COBOL to XML Schema utility. So it makes sense to isolate that feature in its own project. People who need just that functionality won't have to figure out how to extract it from the other LegStar modules.&lt;/li&gt;&lt;li&gt;legstar-schemagen was systematically adding LegStar JAXB style annotations to the XML Schema produced. While this is still needed if you want to use LegStar for runtime transformations, this is not the default option anymore. This means people can use the resulting XML Schema totally outside LegStar if they want.&lt;/li&gt;&lt;li&gt;The clear separation of the COBOL parsing logic from the XML Schema generation means it is much easier now to create other targets. For instance JSON schemas.&lt;/li&gt;&lt;li&gt;Finally the fact that legstar-cob2xsd is in java allows JUnit tests to be much more comprehensive (&lt;a href="http://www.legsem.com/legstar/legstar-cob2xsd/cobertura/index.html"&gt;and they are&lt;/a&gt;!).&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-7110918753568826565?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/7110918753568826565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/11/new-cobol-structure-to-xml-schema.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/7110918753568826565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/7110918753568826565'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/11/new-cobol-structure-to-xml-schema.html' title='A new COBOL structure to XML schema translator'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-5964953074143787953</id><published>2009-11-10T07:39:00.000-08:00</published><updated>2009-11-10T09:08:22.295-08:00</updated><title type='text'>What does CICS equates to in the Java world</title><content type='html'>It is always tough to explain what CICS exactly is to someone with a Java background.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;One misconception I often hear is that it is similar to &lt;a href="http://www.jboss.org/jbosstm/"&gt;JBoss TS (Arjuna)&lt;/a&gt;, the transaction manager in JBoss.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I think the issue is with the "Transaction" moniker. In the Java world, it is generally understood as a "&lt;a href="http://en.wikipedia.org/wiki/ACID"&gt;Database transaction&lt;/a&gt;", something that has to do with coordinating resource updates.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;In CICS, the meaning is different. If you monitor an active CICS system, what you will see are a number of active transactions. CICS transactions are primarily scheduling units. A CICS transaction is associated with an initial executable program which can in turn call other programs. CICS transactions get alloted chunks of memory for their programs to use, get CPU cycles when CICS decides, are authorized or not to a given user, etc. That's why CICS is called a Transaction Monitor: what is does is monitor CICS transactions.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;A CICS transaction might very well never perform any update to any resource. It would still be a CICS transaction. A CICS transaction can send a form to a screen or receive data entered from a keyboard. CICS transactions can save conversation contexts, pretty much like servlets do.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Now, if a CICS transaction (or to be more precise some program it is associated with) does perform an update to a resource (say a VSAM file), then the CICS transaction is actually the default boundary from a "database transaction" standpoint. This means that when the transaction ends fine, all updates are committed but if the transaction fails (abends in CICS jargon), then all updates since the start of the CICS transaction are undone.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The CICS API also has COMMIT/ROLLBACK to give programs more control over the database transaction. From this standpoint, CICS is a local transaction manager. Now this is true for resources such as VSAM but more complex systems, such as DB2 or IMS-DB, have their own transaction managers. So who does the distributed transaction coordination that is needed when a CICS transaction updates both a VSAM file and a DB2 table?&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Well, that would be &lt;a href="http://www.redbooks.ibm.com/abstracts/SG246980.html"&gt;RRS (Resource Recovery Services)&lt;/a&gt;, a separated address space (process) in z/OS. That would be the closest thing I can think of to JBoss TS in a z/OS world.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-5964953074143787953?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/5964953074143787953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/11/what-does-cics-equates-to-in-java-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5964953074143787953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5964953074143787953'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/11/what-does-cics-equates-to-in-java-world.html' title='What does CICS equates to in the Java world'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-3103727865817058298</id><published>2009-11-03T08:38:00.000-08:00</published><updated>2009-11-03T09:00:25.995-08:00</updated><title type='text'></title><content type='html'>When asked what the competition to &lt;a href="http://www.legsem.com/legstar"&gt;LegStar&lt;/a&gt; is, I generally reply no one, because there are no other open source integration solutions for mainframes (to the best of my knowledge).&lt;div&gt;
&lt;/div&gt;&lt;div&gt;There are several commercial competitors though. They all seem to gather in the &lt;a href="http://www.soatube.com/index.php?eid=47"&gt;same places&lt;/a&gt;. &lt;a href="http://www.datadirect.com/products/mainframe-integration"&gt;DataDirect&lt;/a&gt; and &lt;a href="http://www.hostbridge.com/"&gt;HostBridge&lt;/a&gt; are the only ones missing from this list.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Most of these vendors (maybe Seagull to a lesser extent) are mainframe-centric. What I mean by that is that their products run natively on the mainframe, are priced/licensed accordingly and are sold to mainframe minded project leads. This is a closed circle. No place for open source there. Customers are not asking for it and vendors don't want to hear about it.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;But out there, there is a growing population of java minded project leads and developers who are taking over higher and higher responsibilities in large IT departments. Many times, they have to deal with COBOL/PL/I/CICS/IMS applications as part of their projects.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;This younger generation is a lot more responsive to open source. We are working for them.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-3103727865817058298?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/3103727865817058298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/11/when-asked-what-competition-to-legstar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3103727865817058298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3103727865817058298'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/11/when-asked-what-competition-to-legstar.html' title=''/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-3825568700339640431</id><published>2009-10-29T13:05:00.000-07:00</published><updated>2009-10-29T13:10:28.722-07:00</updated><title type='text'>ESBs: translators in an SOA world</title><content type='html'>&lt;div&gt;A &lt;a href="http://www.zjournal.com/index.cfm?section=article&amp;amp;aid=1236"&gt;strange article&lt;/a&gt; has popped up on zJournal about SOA. I am not sure I fully understand the content but it seems to be an advice to CIOs basically saying: SOA is difficult to get right and ESBs are a bad thing.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;This is the first time I read something clearly hostile to the ESB architecture. The author seems to believe that they are too complex and that they mostly try to imitate old EAI systems, rather than embracing SOA.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The article seems to imply that the only way to pure SOA is rewriting applications is such a way that they are natively service enabled. It states, in several places, that "API"s are a bad thing.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Following this idea, I guess you would have to replace SQL, SMTP, JMS, Excel macros,...  by Web Services.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;It's a little bit as if you were saying: all these languages that people speak around the world make communication difficult, let's all speak &lt;a href="http://www.esperanto.net/info/index_en.html"&gt;Esperanto&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;As long as we are not all speaking Esperanto, there will be a need for Translators. I guess that's why ESB's are so useful to an SOA.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-3825568700339640431?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/3825568700339640431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/10/esbs-translators-in-soa-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3825568700339640431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3825568700339640431'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/10/esbs-translators-in-soa-world.html' title='ESBs: translators in an SOA world'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-6802823031371429496</id><published>2009-10-18T10:11:00.000-07:00</published><updated>2009-10-18T10:37:06.013-07:00</updated><title type='text'>Mainframes are not open source friendly</title><content type='html'>IBM is a strange beast. On one hand, they gave away Eclipse and the Apache Software Foundation but on the other, they don't seem to embrace open initiatives when mainframes are involved.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;You can read more about what happened to PSI and T3 Technologies on &lt;a href="http://openmainframe.org/"&gt;openmainframe.org&lt;/a&gt;. These examples are more on the hardware side but there is no sign of IBM opening up any of its z/OS software.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Most of the open source initiatives I have heard of such as &lt;a href="http://www.opencobol.org/"&gt;http://www.opencobol.org/&lt;/a&gt; or &lt;a href="http://h3270.sourceforge.net/index.html"&gt;http://h3270.sourceforge.net/index.html&lt;/a&gt; are from third parties and do not attempt to run on z/OS itself.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I think that IBM's attitude toward open source on z/OS  is harming the mainframe community and is counterproductive in the long term.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-6802823031371429496?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/6802823031371429496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/10/mainframes-are-not-open-source-friendly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6802823031371429496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6802823031371429496'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/10/mainframes-are-not-open-source-friendly.html' title='Mainframes are not open source friendly'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-5228246706270166829</id><published>2009-10-11T12:07:00.000-07:00</published><updated>2009-10-11T12:12:44.731-07:00</updated><title type='text'>Mainframe-centric integration costs</title><content type='html'>&lt;div&gt;&lt;a href="http://blogs.datadirect.com/author/gregg-willhoit"&gt;Gregg Wilhoit&lt;/a&gt;, DataDirect's chief architect, is one of the smartest professionals I have met. He continues to drive the Shadow line of products.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Shadow is rooted in the data integration space but has evolved over time to include programmatic integration as well.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;From an architecture standpoint, Shadow is a mainframe-centric integration solution. It is probably one of the fastest and most stable products available that runs natively on the mainframe (Other such products are &lt;a href="http://www.gtsoftware.com/content/ivory-service-architect"&gt;GT Software's Ivory&lt;/a&gt;, &lt;a href="http://www.hostbridge.com/index.php/products/detail/hostbridge"&gt;HostBridge&lt;/a&gt;, &lt;a href="http://www.soa.com/products/sola/sola_mainframe_soa/"&gt;SOA Software SOLA&lt;/a&gt; and &lt;a href="http://www.redbooks.ibm.com/redbooks/pdfs/sg245466.pdf"&gt;IBM's CICS Web Services support&lt;/a&gt;).&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The major argument against mainframe centric integration solutions is usually one of cost. With the broad adoption of SOA for instance, all mainframe-centric solutions suffer from the cost of XML parsing/formatting. This is a CPU intensive activity that affects the overall mainframe cost of ownership (On mainframes, the more CPU you consume, the higher your software license fees are).&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Gregg was one of the first (maybe the first as far as I know) who made it possible to reduce such CPU costs by exploiting IBM's &lt;a href="http://www-03.ibm.com/systems/z/advantages/specialtyengines/index.html"&gt; specialty engines on system z&lt;/a&gt;. These co-processors can offload java and DB2 related payloads from the main processors therefore avoiding the license fees inflation. Since then, &lt;a href="http://www.neonesoft.com/solutions/solutions.shtm"&gt;other companies&lt;/a&gt; have jumped in.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Although the ZIIP/zAAP offloading is good news for mainframe centric solutions, I doubt this will significantly reduce their total cost. One important aspect of integration is that it needs monitoring for instance. It is a whole lot trickier to tune mainframe centric solutions than distributed ones. It also requires very specific and costly skills and software.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;When comparing distributed integration to mainframe-centric integration, it is important to compare development costs, administration costs and ultimately exit costs. I doubt that the total would be in favor of mainframe centricity.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;In my opinion, the major argument for mainframe-centric solutions is one of performance and stability. The cost though will probably remain high. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-5228246706270166829?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/5228246706270166829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/10/mainframe-centric-integration-costs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5228246706270166829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/5228246706270166829'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/10/mainframe-centric-integration-costs.html' title='Mainframe-centric integration costs'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-6147718772966489640</id><published>2009-10-04T05:29:00.000-07:00</published><updated>2009-10-04T05:36:10.554-07:00</updated><title type='text'>Openworld Forum</title><content type='html'>&lt;div&gt;Went to the &lt;a href="http://www.openworldforum.org/"&gt;open world forum&lt;/a&gt; last week. This is the first time I attend and found the event quite interesting.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;There were a lot more business suits than I expected and most of the topics revolved around the business aspects of open source.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Had a chance to listen to Nick Halsey from &lt;a href="http://www.jaspersoft.com/"&gt;Jaspersoft&lt;/a&gt;, Josep Mitja from &lt;a href="http://www.openbravo.com/"&gt;openbravo&lt;/a&gt; and Yves de Montcheuil from &lt;a href="http://www.talend.com/index.php"&gt;Talend&lt;/a&gt;. I find it much more interesting to listen to these relatively young, yet quite successful, open source companies, than to the older organizations such as Apache, Eclipse and Linux which seem out of reach.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;It seems these smaller OSS companies make their money mostly by selling subscriptions. This model has been very successful for Redhat of course but I am still wondering if it is as efficient for server technologies. I thought services would be an important secondary source of revenue for them but this does not seem to be the case. The explanation could be that these companies heavily rely on SI's to get them into accounts and therefore they can't sell too much services for fear of openly competing with these same SI's. The bright side is that this forces them to focus on software engineering rather than diverting their resources on services.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The most impressive presentation I saw was from &lt;a href="http://www.markshuttleworth.com/"&gt;Mark Shuttleworth&lt;/a&gt;, the Ubuntu project founder. He had 3 slides with a single word on each of them. This is the first time I can remember 100% of a presenter slides content without taking a single note!&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-6147718772966489640?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/6147718772966489640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/10/openworld-forum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6147718772966489640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/6147718772966489640'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/10/openworld-forum.html' title='Openworld Forum'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-4644981442135257190</id><published>2009-10-02T10:15:00.000-07:00</published><updated>2009-10-02T10:31:19.637-07:00</updated><title type='text'>ANTLR and Terence Parr</title><content type='html'>I am reading &lt;a href="http://www.antlr.org/wiki/display/~admin/Home"&gt;Terence Parr&lt;/a&gt; 's &lt;a href="http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference"&gt;The definitive ANTLR reference&lt;/a&gt;.

I have to say that it is not often that I regret not being 25 years younger to attend Terence courses at the University of San Francisco.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Theories behind compilers are still complex but Terence is doing a great job at making things clearer for people like us, with concrete problems on their hands.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-4644981442135257190?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/4644981442135257190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/10/antlr-and-terence-parr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4644981442135257190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4644981442135257190'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/10/antlr-and-terence-parr.html' title='ANTLR and Terence Parr'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-3114343438838667248</id><published>2009-09-22T22:44:00.000-07:00</published><updated>2009-09-22T23:21:42.269-07:00</updated><title type='text'>Mainframe hardware &amp; OS versus Mainframe Applications</title><content type='html'>Another interesting study by Forrester &lt;a href="http://www.ca.com/files/IndustryAnalystReports/forrestertlpmainframe240709_213783.pdf"&gt;has been published&lt;/a&gt;. Although it is a commissioned study by CA, there are some interesting figures in it, namely the 15000 mainframe sites remaining.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;One company may own several mainframe sites and a mainframe site may host more than one physical machine. A mainframe site size is usually measured in MIPS, the accumulated power of all the mainframe hardware running on that site.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The total amount of MIPS is growing 20% annually according to Forrester. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href="http://media.cms.bmc.com/documents/USA-News-attachments-BMCMainframeSurvey1-2008-August12.pdf"&gt;BMC published similar figures&lt;/a&gt; some time ago.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The problem with figures coming from IBM, CA or BMC is that they all focus on MIPS, i.e. hardware.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;But a mainframe today can run z/VM and several hundred z/Linux images. As such, it is essentially a virtualization environment for Linux. These Linux images probably run Java/J2EE applications of some form. No doubt that there is a need for such centralized architectures which explains part of the MIPS growth.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;But how about the more traditional COBOL-CICS or PL/I-IMS applications? Do they have a share in the 20% annual growth rate?&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;It is probably not a good idea to look at the compound MIPS growth rate anymore since it now sustains workloads that are totally unrelated.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I would love to see a study focusing on legacy-MIPS.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-3114343438838667248?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/3114343438838667248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/09/mainframe-hardware-os-versus-mainframe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3114343438838667248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/3114343438838667248'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/09/mainframe-hardware-os-versus-mainframe.html' title='Mainframe hardware &amp; OS versus Mainframe Applications'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-944980637185442061.post-4859318219796415013</id><published>2009-09-22T05:31:00.000-07:00</published><updated>2009-09-22T05:48:52.277-07:00</updated><title type='text'>First post on the LegStar blog</title><content type='html'>I have been working on open source software for the last 3 years or so.  One of the most frustrating aspects to me has been the lack of feedback from users.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Most people who download the software never leave a message of any kind. Only a tiny minority do.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.legsem.com/legstar"&gt;LegStar&lt;/a&gt; is an open source integration solution for mainframe applications. It deals with COBOL and CICS applications and it does so by leveraging J2EE and ESB servers such as &lt;a href="http://www.mulesoft.org"&gt;Mule&lt;/a&gt; and &lt;a href="http://jboss.org/jbossesb/"&gt;JBoss ESB&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I have decided to start this blog hoping it will help gather more feedback.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/944980637185442061-4859318219796415013?l=legstar.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://legstar.blogspot.com/feeds/4859318219796415013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://legstar.blogspot.com/2009/09/first-post-on-legstar-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4859318219796415013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/944980637185442061/posts/default/4859318219796415013'/><link rel='alternate' type='text/html' href='http://legstar.blogspot.com/2009/09/first-post-on-legstar-blog.html' title='First post on the LegStar blog'/><author><name>Fady</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
