COBOL Code Migration: A Mainframe Mashup

nid

4363

vid

6809

type

naspa_articles

status

1

created

1206397052

changed

1206397830

comment

2

promote

0

sticky

0

revision_timestamp

1206397830

title

COBOL Code Migration: A Mainframe Mashup

body

<h2>Introduction</h2> <p class="MsoNormal">As I have recently written (November 2007, Building an Early Warning System to Enable COBOL Compiler Migration), there are sites that will be compelled to migrate older COBOL programs to Enterprise COBOL simply because they must run the latest version of DB2 and CICS.<span> </span>If that’s the case at your site, what have you done to help get the applications programming staff ready to do the work?<span> </span>I was presented with this challenge at a client site and decided to follow a standard project approach:</p> <ul style="margin-top: 0in"><li class="MsoNormal">You perform the detailed analysis to make certain you clearly understand the issues.</li><li class="MsoNormal">You migrate the source code.</li><li class="MsoNormal">You thoroughly test the converted code.</li></ul> <p class="MsoNormal">Let’s start with the first aspect of this approach.</p> <h2>Edge Portfolio Analyzer</h2> <p class="MsoNormal">I’ve uniformly maintained that a key component of a successful COBOL source code migration is the Edge Portfolio Analyzer (EPA).<span> </span>It does an outstanding job of providing you with a completely thorough load library analysis.<span> </span>The Summary Report of a load library shows the extent of the COBOL code that requires your particular attention, as shown in Figures 1a and 1b.</p><p class="MsoNormal">File Edit Edit_Settings Menu Utilities Compilers Test Help <br /> -------------------------------------------------------------------------------<br /> SPF/E EDIT TSOUSER.EPABAT01.SUMMARY Columns 00001 00072 <br /> Command ===&gt; Scroll ===&gt; CSR <br /> 010753 CSECTS CREATED BY COBOL 895 <br /> 010754 CSECTS USING ANSI V2 OR V3 COMPILER 0 <br /> 010755 CSECTS USING COBOL V4 COMPILER 0 <br /> 010756 CSECTS USING OS/VS COBOL COMPILER 413 <br /> 010757 CSECTS CREATED BY VS COBOL II 482 <br /> 010758 CSECTS CREATED BY VS COBOL II RLSE 1.0 0 <br /> 010759 CSECTS CREATED BY VS COBOL II RLSE 1.1 0 <br /> 010760 CSECTS CREATED BY VS COBOL II RLSE 2.0 0 <br /> 010761 CSECTS CREATED BY VS COBOL II RLSE 3.0 53 <br /> 010762 CSECTS CREATED BY VS COBOL II RLSE 3.E 0 <br /> 010763 CSECTS CREATED BY VS COBOL II RLSE 3.1 0 <br /> 010764 CSECTS CREATED BY VS COBOL II RLSE 3.2 0 <br /> 010765 CSECTS CREATED BY VS COBOL II RLSE 4.0 429 <br /> 010766 CSECTS CREATED BY VS COBOL II RLSE UNK 0 <br /> 010767 CSECTS CREATED BY LE CONFORMING COBOL 0 <br /> 010768 CSECTS CREATED BY COBOL/370 RLSE 1.0 0 <br /> 010769 CSECTS CREATED BY COBOL/370 RLSE 1.1 0 <br /> 010770 CSECTS CREATED BY COBOL FOR MVS V1 R2.0 0 <br /> 010771 CSECTS CREATED BY COBOL FOR MVS V1 R2.1 0 <br /> 010772 CSECTS CREATED BY COBOL FOR MVS V1 R2.2 0 </p><p class="MsoNormal">Figure 1a: Sample EPA Summary Report Results (Part 1 of 1)</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">File Edit Edit_Settings Menu Utilities Compilers Test Help <br /> -------------------------------------------------------------------------------<br /> SPF/E EDIT TSOUSER.EPABAT01.SUMMARY Columns 00001 00072 <br /> Command ===&gt; Scroll ===&gt; CSR <br /> 010808 OS/VS COBOL CSECTS THAT ARE LANGLVL(1) 1 <br /> 010809 OS/VS COBOL CSECTS THAT ARE LANGLVL(2) 412 <br /> 010810 CSECTS USING SYMDUMP OPTION 0 <br /> 010811 CSECTS USING FLOW OPTION 0 <br /> 010812 CSECTS USING STATE OPTION 0 <br /> 010813 CSECTS USING TEST OPTION 0 <br /> 010814 CSECTS USING RES OPTION 403 <br /> 010815 CSECTS USING ENDJOB OPTION 0 <br /> 010816 CSECTS USING OBJ-370 OPTION 413 <br /> 010817 CSECTS OPTIMIZED USING COBOL OPTION 10 <br /> 010818 CSECTS OPTIMIZED USING CAPEX 65 <br /> 010819 CSECTS USING RES BUT NOT ENDJOB 403 <br /> 010820 CSECTS USING COUNT OPTION - OS/VS COBOL 0 <br /> 010821 CSECTS USING TRACE VERB - OS/VS COBOL 0 <br /> 010822 VS COBOL II, COBOL/370 STATISTICS <br /> 010823 <br /> 010824 COBOL CSECTS THAT ARE CMPR2 123 <br /> 010825 COBOL CSECTS THAT ARE NOCMPR2 359 <br /> 010826 CSECTS USING TEST OPTION 0 <br /> 010827 VS COBOL II CSECTS USING RES OPTION 482 </p><p class="MsoNormal">Figure 1b: Sample EPA Summar Report Results (Part 2 of 2) </p>In any given circumstance these numbers, and the condition of the code, will vary.<span> </span>If you discover that you are not certain about the compile options that were used or some other aspect of the load module, you can run any number of EPA External Analyzers to obtain the requisite level of detail. <h2>CCCA</h2> <p class="MsoNormal">Based on this preliminary assessment, the next step is to actually remediate the code.<span> </span>For this task, I have invariably relied on IBM’s COBOL and CICS/VS Command Level Conversion Aid (CCCA) to generate Enterprise COBOL code.</p> <p class="MsoNormal">CCCA, which has been available since the mid-1980s, lets you generate Enterprise COBOL code from any existing COBOL language variant.<span> </span>It uses the same source code and copy books that are handled by your existing compile process.<span> </span>It employs a set of options that applications programmers supply to perform its analysis and subsequent remediation.<span> </span>Some of these options include:</p> <ul style="margin-top: 0in"><li class="MsoNormal">Generate new source and copy books</li><li class="MsoNormal">Remove obsolete elements</li><li class="MsoNormal">Flag manual changes</li><li class="MsoNormal">Flag FILE-STATUS conditional statements</li></ul> <p class="MsoNormal">The product’s dialog panels allow you to establish generic guidelines for all of your programs.<span> </span>They also give you the opportunity to modify the options for specific program requirements.</p> <p class="MsoNormal">The code migration takes place in a batch job.<span> </span>The CCCA utilities parse the source code, determine which elements are obsolete and must be replaced, and then perform the appropriate actions.<span> </span>If you provide an output source and copylib dataset, you’ll get converted code, along with a listing that describes the actions that were performed on the code.<span> </span>At the end of the listing is a summary of all the actions taken.</p> <p class="MsoNormal">Now the folks in the IBM lab who built CCCA faced a development design decision.<span> </span>They used a VSAM file to keep track of the options used to convert the program, along with the list of programs that were converted (and a myriad of useful cross-reference information).<span> </span>However, because the VSAM file is used for both read and write, they’ve effectively prevented more than one person from using the file at the same time, for example in an application group mode.</p> <p class="MsoNormal">So the question arises.<span> </span>How can an application group maximize the results of the EPA Summary Report analysis and perform a mass CCCA migration?<span> </span>Simple:<span> </span>You create a mainframe mashup!<span> </span>Here’s how I built one.</p> <h2>The Mainframe Mashup</h2> <p class="MsoNormal">The client site where I built this solution uses CA’s Endevor for all source code change management.<span> </span>They store the source code in Endevor’s proprietary BDAM format.<span> </span>To work with a program, you must first extract the code from Endevor and place it in a PDS(/E).</p> <p class="MsoNormal">I reasoned that if an application group wanted to know how much work was involved in migrating their code, they would need to work with all (or a subset) of their COBOL source programs.<span> </span>They would also need to see and use an EPA Summary Report analysis of the corresponding batch or CICS load library.<span> </span>From that starting point, it was relatively easy to build the ISPF dialog that would perform these tasks.</p> <p class="MsoNormal">Figure 2 shows the dialog’s data entry panel.<span> </span>As you can see, most of the fields are self-explanatory.<span> </span>A pop-up data entry panel obtains the names of the copy book datasets commonly used during compilation.</p> <p class="MsoNormal"><span class="inline left"><img src="http://www.naspa.com/system/files/images/New+Image.img_assist_custom.JPG" alt="ISPF Dialog Data Entry Panel" title="ISPF Dialog Data Entry Panel" class="image img_assist_custom" width="390" height="300" /><span class="caption" style="width: 388px;"><strong>ISPF Dialog Data Entry Panel</strong></span></span> </p> <p class="MsoNormal">After the application programmer completes the data entry fields, the dialog creates the names of all of the files that will be used in the various batch jobs.<span> </span>Some of the files are allocated during the ISPF session, while the rest are allocated in the first batch job.</p> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">The first batch job performs the following processing:</p> <p class="MsoNormal">&nbsp;</p> <ul style="margin-top: 0in"><li class="MsoNormal">Removes any prior versions of the CCCA VSAM files</li><li class="MsoNormal">Creates a new set of CCCA VSAM files (unique to this dialog so they don’t conflict with anyone using the program product)</li><li class="MsoNormal">Loads the CCCA VSAM CONTROL file with a modified set of base records</li><li class="MsoNormal">Extracts the Endevor source code into a PDS/E</li><li class="MsoNormal">Runs EPA against the specified load library to obtain a Detail Report</li><li class="MsoNormal">Runs a REXX program to split the EPA Detail Report into separate members (one per load module)</li><li class="MsoNormal">Invokes ISPF to execute another REXX program</li></ul> <p class="MsoNormal">&nbsp;</p> <p class="MsoNormal">This second REXX program performs several tasks.<span> </span>For each source member, it checks to see if a matching EPA Detail Report member exists.<span> </span>If it does, the EPA Detail Report member is parsed to determine the following:</p> <ul style="margin-top: 0in"><li class="MsoNormal">Does the program contain any DB2 components?</li><li class="MsoNormal">Does the program contain any CICS components?</li><li class="MsoNormal">What specific level of COBOL was used to compile the program?</li><li class="MsoNormal">Does the member name match the PROGRAM-ID?</li></ul> <p class="MsoNormal">If the level of COBOL is VS COBOL II or earlier, the REXX program submits a batch job to execute CCCA against that source program using the values obtained from parsing the EPA Detail Report member.<span> </span>Otherwise, if the level of COBOL is later than VS COBOL II, a message is issued to let the application programmer know they can simply recompile the program with Enterprise COBOL.</p> <p class="MsoNormal">Unfortunately, a review of the CCCA batch job is outside the scope of this article.</p> <p class="MsoNormal">After all of the CCCA batch jobs are submitted, a final batch job is submitted that uses IBM’s <a href="/freelinking/FileManager">FileManager</a> to read the information in the CCCA VSAM CONTROL file and load it into REXX variables.<span> </span>Another REXX program summarizes the results of the status column to categorize the effort involved with the source library that was analyzed.<span> </span>Four categories are established:<span> </span>none, minimal, moderate, and extensive.<span> </span>Figure 3 shows a sample of this report.</p> <p class="MsoNormal"> File Edit Edit_Settings Menu Utilities Compilers Test Help <br /> -------------------------------------------------------------------------------<br /> SPF/E EDIT TSOUSER.APPLIC.ATION.BATCH.SYSPRINT($INDEX) - 0 Columns 00001 00072 <br /> Command ===&gt; Scroll ===&gt; CSR <br /> 000460 Pxxyyzzz WARNING 10/26/07 18:44 <br /> 000461 Pxyxyxy0 WARNING 10/26/07 18:44 <br /> 000462 Pxyxyx MAN. COMP 10/26/07 18:44 <br /> 000463 Pzyxyzzzy COMPLETE 10/26/07 18:45 <br /> 000464 Pxyzyzyz COMPLETE 10/26/07 18:45 <br /> 000465 Szyzyz COMPLETE 10/26/07 18:45 <br /> 000466 Sxyzyzyx WARNING 10/26/07 17:20 <br /> 000467 Xyzxyxx COMPLETE 10/26/07 18:17 <br /> 000468 <br /> 000469 No change: 0 0% <br /> 000470 Easy to fix: 377 81% <br /> 000471 Moderate to fix: 63 14% <br /> 000472 Difficult to fix: 23 5% <br /> 000473 <br /> ****** **************************** Bottom of Data ****************************<br /> <br /> Figure 3: Sample CCCA Analysis Summary</p> <p class="MsoNormal">Note:<span> </span>On a heavily loaded system, I was able to process 500 programs in less than 4 hours.<span> </span>The CCCA batch jobs are all given the same job name so that they are single-threaded through the system, avoiding any contention on the VSAM CONTROL file and using only one JES initiator.</p> <p class="MsoNormal">Using EPA’s Summary Report and these CCCA statistics, an application group’s project manager is better able to determine the size and scope of the actual conversion work effort.</p> <p class="MsoNormal">Depending on the circumstances, that project manager may decide to have his or her staff run this utility in “live” mode and have it perform the actual code migration.<span> </span>Then he or she can have the application programming staff spend time working on the manual conversions, and devote the necessary time to preparing the appropriate test cases.</p> <p class="MsoNormal">Despite having improved the up-front analysis time, I don’t want to discount the fact that there is still significant work involved with the source code change management product, Endevor.<span> </span>Old programs must be checked out (and archived), and the new versions checked in using the new compiler type.</p> <h2>Conclusion</h2> <p class="MsoNormal">There you have it, a mainframe mashup.<span> </span>I was able to take two very different products, and repurpose them to produce a valuable analysis tool for application group project managers and their staff.<span> </span>Now, the operating system spends the time determining how much work is involved in COBOL code migration, not the application programming staff.</p> <h2>Resources</h2> <ul style="margin-top: 0in"><li class="MsoNormal">Edge Portfolio Analyzer (<a href="http://www.edge-information.com" title="http://www.edge-information.com">http://www.edge-information.com</a>)</li><li class="MsoNormal">COBOL and CICS/VS Command Level Conversion Aid (<a href="http://www.ibm.com/software/awdtools/ccca/index.html" title="http://www.ibm.com/software/awdtools/ccca/index.html">http://www.ibm.com/software/awdtools/ccca/index.html</a>)</li><li class="MsoNormal">Enterprise COBOL for z/OS (<a href="http://www.ibm.com/software/awdtools/cobol/zos/">http://www.ibm.com/software/awdtools/cobol/zos/</a>)</li></ul> <p class="MsoNormal">&nbsp;</p> <p><em>NaSPA member Larry Kahm is president of Heliotropic Systems, Inc., an IBM Business Partner located in Fort Lee, NJ. He has 20 years of experience working with systems and application programmers, vendors, and management to ensure that business applications are developed, maintained, and enhanced with the appropriate set of tools. When not training to run in the ING NYC Marathon, he&#39;s busy helping clients with their office networks and home computers.</em></p> <p class="MsoNormal">&nbsp;</p> <br class="clear" />

teaser

<h2>Introduction</h2> <p class="MsoNormal">As I have recently written (November 2007, Building an Early Warning System to Enable COBOL Compiler Migration), there are sites that will be compelled to migrate older COBOL programs to Enterprise COBOL simply because they must run the latest version of DB2 and CICS.<span> </span>If that’s the case at your site, what have you done to help get the applications programming staff ready to do the work?<span> </span>I was presented with this challenge at a client site and decided to follow a standard project approach:</p>

log

format

7

uid

2184

name

jkasza

picture

data

a:27:{s:5:"roles";a:1:{i:0;s:1:"2";}s:13:"AMISDB_MBRPFX";s:1:" ";s:13:"AMISDB_MBRFNM";s:5:"Jenny";s:12:"AMISDB_MBRMI";s:1:" ";s:13:"AMISDB_MBRLNM";s:5:"Kasza";s:13:"AMISDB_MBRSFX";s:1:" ";s:12:"AMISDB_EMAIL";s:16:"editor@naspa.com";s:12:"AMISDB_mtype";s:5:"STAFF";s:15:"AMISDB_orgmbrdt";s:10:"08/08/2006";s:15:"AMISDB_trmstart";s:10:"08/08/2006";s:13:"AMISDB_trmend";s:10:"07/31/2010";s:15:"AMISDB_COMPBILL";s:3:"TEI";s:15:"AMISDB_ADDRBILL";s:18:"7044 S 13TH STREET";s:15:"AMISDB_CITYBILL";s:9:"OAK CREEK";s:16:"AMISDB_STATEBILL";s:2:"WI";s:15:"AMISDB_CTRYBILL";s:3:"USA";s:15:"AMISDB_COMPMAIL";s:3:"TEI";s:15:"AMISDB_ADDRMAIL";s:18:"7044 S 13TH STREET";s:15:"AMISDB_CITYMAIL";s:9:"OAK CREEK";s:16:"AMISDB_STATEMAIL";s:2:"WI";s:15:"AMISDB_CTRYMAIL";s:3:"USA";s:8:"og_email";s:1:"1";s:14:"tinymce_status";s:4:"true";s:14:"picture_delete";s:0:"";s:14:"picture_upload";s:0:"";s:7:"contact";i:1;s:5:"block";a:5:{s:4:"book";a:1:{i:0;i:1;}s:4:"menu";a:1:{i:2560;i:1;}s:15:"taxonomy_ticker";a:1:{i:0;i:1;}s:4:"user";a:1:{i:3;i:1;}s:10:"statistics";a:1:{i:0;i:0;}}}

tags

Array
(
    [5] => Array
        (
            [76] => stdClass Object
                (
                    [tid] => 76
                    [vid] => 5
                    [name] => COBOL
                    [description] => 
                    [weight] => 0
                )

        )

)

primary_term

last_comment_timestamp

1206397052

last_comment_name

comment_count

0

taxonomy

Array
(
    [76] => stdClass Object
        (
            [tid] => 76
            [vid] => 5
            [name] => COBOL
            [description] => 
            [weight] => 0
        )

    [332] => stdClass Object
        (
            [tid] => 332
            [vid] => 18
            [name] => Kahm, Larry
            [description] => 
            [weight] => 0
        )

    [558] => stdClass Object
        (
            [tid] => 558
            [vid] => 14
            [name] => Network Support - April-May, 2006
            [description] => 
            [weight] => 0
        )

)

files

Array
(
)

field_author

Array
(
    [0] => Array
        (
            [value] => Larry Kahm
            [view] => Larry Kahm
        )

)

field_description

Array
(
    [0] => Array
        (
            [value] => <p class="MsoNormal">COBOL code migration requires analysis followed by
coding changes, which vary based on the degree of program obsolescence.<span>  </span>How can you speed up this process to help
reduce costs?<span>  </span>Simple, use two tools to
get the work done in less than half the time!</p>


            [format] => 1
        )

)

field_article_pdf

Array
(
)

field_item_type

Array
(
    [0] => Array
        (
            [value] => 
        )

)

field_article_cost

Array
(
    [0] => Array
        (
            [value] => 0
        )

)

field_temppdf

Array
(
    [0] => Array
        (
            [value] => 
        )

)

iid

links_related

Array
(
)

moderate

0

readmore

1

content

Array
(
    [body] => Array
        (
            [#value] => <h2>Introduction</h2>



<p class="MsoNormal">As I have recently written (November 2007, Building an Early Warning System to Enable COBOL Compiler Migration),
there are sites that will be compelled to migrate older COBOL programs to
Enterprise COBOL simply because they must run the latest version of DB2 and
CICS.<span>  </span>If that’s the case at your site,
what have you done to help get the applications programming staff ready to do
the work?<span>  </span>I was presented with this
challenge at a client site and decided to follow a standard project approach:</p>



<ul style="margin-top: 0in"><li class="MsoNormal">You perform
     the detailed analysis to make certain you clearly understand the issues.</li><li class="MsoNormal">You migrate
     the source code.</li><li class="MsoNormal">You thoroughly
     test the converted code.</li></ul>



<p class="MsoNormal">Let’s start with the first aspect of this approach.</p>

<h2>Edge Portfolio Analyzer</h2>



<p class="MsoNormal">I’ve uniformly maintained that a key component of a
successful COBOL source code migration is the Edge Portfolio Analyzer (EPA).<span>  </span>It does an outstanding job of providing you
with a completely thorough load library analysis.<span>  </span>The Summary Report of a load library shows
the extent of the COBOL code that requires your particular attention, as shown
in Figures 1a and 1b.</p><p class="MsoNormal">File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            <br /> -------------------------------------------------------------------------------<br /> SPF/E EDIT TSOUSER.EPABAT01.SUMMARY                        Columns 00001 00072 <br /> Command ===&gt;                                                  Scroll ===&gt; CSR  <br /> 010753       CSECTS CREATED BY COBOL                             895           <br /> 010754       CSECTS USING ANSI V2 OR V3 COMPILER                   0           <br /> 010755       CSECTS USING COBOL V4 COMPILER                        0           <br /> 010756       CSECTS USING OS/VS COBOL COMPILER                   413           <br /> 010757       CSECTS CREATED BY VS COBOL II                       482           <br /> 010758       CSECTS CREATED BY VS COBOL II RLSE 1.0                0           <br /> 010759       CSECTS CREATED BY VS COBOL II RLSE 1.1                0           <br /> 010760       CSECTS CREATED BY VS COBOL II RLSE 2.0                0           <br /> 010761       CSECTS CREATED BY VS COBOL II RLSE 3.0               53           <br /> 010762       CSECTS CREATED BY VS COBOL II RLSE 3.E                0           <br /> 010763       CSECTS CREATED BY VS COBOL II RLSE 3.1                0           <br /> 010764       CSECTS CREATED BY VS COBOL II RLSE 3.2                0           <br /> 010765       CSECTS CREATED BY VS COBOL II RLSE 4.0              429           <br /> 010766       CSECTS CREATED BY VS COBOL II RLSE UNK                0           <br /> 010767       CSECTS CREATED BY LE CONFORMING COBOL                 0           <br /> 010768       CSECTS CREATED BY COBOL/370 RLSE 1.0                  0           <br /> 010769       CSECTS CREATED BY COBOL/370 RLSE 1.1                  0           <br /> 010770       CSECTS CREATED BY COBOL FOR MVS V1 R2.0               0           <br /> 010771       CSECTS CREATED BY COBOL FOR MVS V1 R2.1               0           <br /> 010772       CSECTS CREATED BY COBOL FOR MVS V1 R2.2               0            </p><p class="MsoNormal">Figure 1a: Sample EPA Summary Report Results (Part 1 of 1)</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            <br /> -------------------------------------------------------------------------------<br /> SPF/E EDIT TSOUSER.EPABAT01.SUMMARY                        Columns 00001 00072 <br /> Command ===&gt;                                                  Scroll ===&gt; CSR  <br /> 010808       OS/VS COBOL CSECTS THAT ARE LANGLVL(1)                1           <br /> 010809       OS/VS COBOL CSECTS THAT ARE LANGLVL(2)              412           <br /> 010810       CSECTS USING SYMDUMP OPTION                           0           <br /> 010811       CSECTS USING FLOW OPTION                              0           <br /> 010812       CSECTS USING STATE OPTION                             0           <br /> 010813       CSECTS USING TEST OPTION                              0           <br /> 010814       CSECTS USING RES OPTION                             403           <br /> 010815       CSECTS USING ENDJOB OPTION                            0           <br /> 010816       CSECTS USING OBJ-370 OPTION                         413           <br /> 010817       CSECTS OPTIMIZED USING COBOL OPTION                  10           <br /> 010818       CSECTS OPTIMIZED USING CAPEX                         65           <br /> 010819       CSECTS USING RES BUT NOT ENDJOB                     403           <br /> 010820       CSECTS USING COUNT OPTION - OS/VS COBOL               0           <br /> 010821       CSECTS USING TRACE VERB - OS/VS COBOL                 0           <br /> 010822            VS COBOL II, COBOL/370 STATISTICS                            <br /> 010823                                                                         <br /> 010824       COBOL CSECTS THAT ARE CMPR2                         123           <br /> 010825       COBOL CSECTS THAT ARE NOCMPR2                       359           <br /> 010826       CSECTS USING TEST OPTION                              0           <br /> 010827       VS COBOL II CSECTS USING RES OPTION                 482           </p><p class="MsoNormal">Figure 1b: Sample EPA Summar Report Results (Part 2 of 2) </p>In any given circumstance these numbers, and the condition
of the code, will vary.<span>  </span>If you discover
that you are not certain about the compile options that were used or some other
aspect of the load module, you can run any number of EPA External Analyzers to obtain
the requisite level of detail.

<h2>CCCA</h2>



<p class="MsoNormal">Based on this preliminary assessment, the next step is to
actually remediate the code.<span>  </span>For this
task, I have invariably relied on IBM’s COBOL and CICS/VS Command Level
Conversion Aid (CCCA) to generate Enterprise COBOL code.</p>



<p class="MsoNormal">CCCA, which has been available since the mid-1980s, lets you
generate Enterprise COBOL code from any existing COBOL language variant.<span>  </span>It uses the same source code and copy books
that are handled by your existing compile process.<span>  </span>It employs a set of options that applications
programmers supply to perform its analysis and subsequent remediation.<span>  </span>Some of these options include:</p>



<ul style="margin-top: 0in"><li class="MsoNormal">Generate
     new source and copy books</li><li class="MsoNormal">Remove
     obsolete elements</li><li class="MsoNormal">Flag
     manual changes</li><li class="MsoNormal">Flag
     FILE-STATUS conditional statements</li></ul>



<p class="MsoNormal">The product’s dialog panels allow you to establish generic
guidelines for all of your programs.<span> 
</span>They also give you the opportunity to modify the options for specific program
requirements.</p>

<p class="MsoNormal">The code migration takes place in a batch job.<span> 
</span>The CCCA utilities parse the source code, determine which elements are
obsolete and must be replaced, and then perform the appropriate actions.<span>  </span>If you provide an output source and copylib
dataset, you’ll get converted code, along with a listing that describes the
actions that were performed on the code.<span> 
</span>At the end of the listing is a summary of all the actions taken.</p>



<p class="MsoNormal">Now the folks in the IBM lab who built CCCA faced a development
design decision.<span>  </span>They used a VSAM file
to keep track of the options used to convert the program, along with the list
of programs that were converted (and a myriad of useful cross-reference
information).<span>  </span>However, because the VSAM file
is used for both read and write, they’ve effectively prevented more than one
person from using the file at the same time, for example in an application group
mode.</p>



<p class="MsoNormal">So the question arises.<span> 
</span>How can an application group maximize the results of the EPA Summary
Report analysis and perform a mass CCCA migration?<span>  </span>Simple:<span> 
</span>You create a mainframe mashup!<span> 
</span>Here’s how I built one.</p>

<h2>The Mainframe Mashup</h2>



<p class="MsoNormal">The client site where I built this solution uses CA’s Endevor
for all source code change management.<span> 
</span>They store the source code in Endevor’s proprietary BDAM format.<span>  </span>To work with a program, you must first
extract the code from Endevor and place it in a PDS(/E).</p>



<p class="MsoNormal">I reasoned that if an application group wanted to know how
much work was involved in migrating their code, they would need to work with
all (or a subset) of their COBOL source programs.<span>  </span>They would also need to see and use an EPA Summary
Report analysis of the corresponding batch or CICS load library.<span>  </span>From that starting point, it was relatively
easy to build the ISPF dialog that would perform these tasks.</p>

<p class="MsoNormal">Figure 2 shows the dialog’s data entry panel.<span> 
</span>As you can see, most of the fields are self-explanatory.<span>  </span>A pop-up data entry panel obtains the names
of the copy book datasets commonly used during compilation.</p>

<p class="MsoNormal"><span class="inline left"><img src="http://www.naspa.com/system/files/images/New+Image.img_assist_custom.JPG" alt="ISPF Dialog Data Entry Panel" title="ISPF Dialog Data Entry Panel"  class="image img_assist_custom" width="390" height="300" /><span class="caption" style="width: 388px;"><strong>ISPF Dialog Data Entry Panel</strong></span></span> </p>

<p class="MsoNormal">After the application programmer completes the data entry
fields, the dialog creates the names of all of the files that will be used in the
various batch jobs.<span>  </span>Some of the files
are allocated during the ISPF session, while the rest are allocated in the
first batch job.</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">The first batch job performs the following processing:</p>

<p class="MsoNormal">&nbsp;</p>

<ul style="margin-top: 0in"><li class="MsoNormal">Removes
     any prior versions of the CCCA VSAM files</li><li class="MsoNormal">Creates
     a new set of CCCA VSAM files (unique to this dialog so they don’t conflict
     with anyone using the program product)</li><li class="MsoNormal">Loads
     the CCCA VSAM CONTROL file with a modified set of base records</li><li class="MsoNormal">Extracts
     the Endevor source code into a PDS/E</li><li class="MsoNormal">Runs
     EPA against the specified load library to obtain a Detail Report</li><li class="MsoNormal">Runs a
     REXX program to split the EPA Detail Report into separate members (one per
     load module)</li><li class="MsoNormal">Invokes
     ISPF to execute another REXX program</li></ul>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">This second REXX program performs several tasks.<span>  </span>For each source member, it checks to see if a
matching EPA Detail Report member exists.<span> 
</span>If it does, the EPA Detail Report member is parsed to determine the
following:</p>



<ul style="margin-top: 0in"><li class="MsoNormal">Does
     the program contain any DB2 components?</li><li class="MsoNormal">Does
     the program contain any CICS components?</li><li class="MsoNormal">What specific
     level of COBOL was used to compile the program?</li><li class="MsoNormal">Does
     the member name match the PROGRAM-ID?</li></ul>



<p class="MsoNormal">If the level of COBOL is VS COBOL II or earlier, the REXX
program submits a batch job to execute CCCA against that source program using
the values obtained from parsing the EPA Detail Report member.<span>  </span>Otherwise, if the level of COBOL is later
than VS COBOL II, a message is issued to let the application programmer know
they can simply recompile the program with Enterprise COBOL.</p>



<p class="MsoNormal">Unfortunately, a review of the CCCA batch job is outside the
scope of this article.</p>



<p class="MsoNormal">After all of the CCCA batch jobs are submitted, a final
batch job is submitted that uses IBM’s <a href="/freelinking/FileManager">FileManager</a> to read the information in
the CCCA VSAM CONTROL file and load it into REXX variables.<span>  </span>Another REXX program summarizes the results
of the status column to categorize the effort involved with the source library
that was analyzed.<span>  </span>Four categories are
established:<span>  </span>none, minimal, moderate,
and extensive.<span>  </span>Figure 3 shows a sample
of this report.</p>

<p class="MsoNormal"> File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help            <br /> -------------------------------------------------------------------------------<br /> SPF/E EDIT TSOUSER.APPLIC.ATION.BATCH.SYSPRINT($INDEX) - 0 Columns 00001 00072 <br /> Command ===&gt;                                                  Scroll ===&gt; CSR  <br /> 000460 Pxxyyzzz      WARNING        10/26/07  18:44                            <br /> 000461 Pxyxyxy0      WARNING        10/26/07  18:44                            <br /> 000462 Pxyxyx        MAN. COMP      10/26/07  18:44                            <br /> 000463 Pzyxyzzzy     COMPLETE       10/26/07  18:45                            <br /> 000464 Pxyzyzyz      COMPLETE       10/26/07  18:45                            <br /> 000465 Szyzyz        COMPLETE       10/26/07  18:45                            <br /> 000466 Sxyzyzyx      WARNING        10/26/07  17:20                            <br /> 000467 Xyzxyxx       COMPLETE       10/26/07  18:17                            <br /> 000468                                                                         <br /> 000469 No change:           0     0%                                            <br /> 000470 Easy to fix:       377    81%                                           <br /> 000471 Moderate to fix:    63    14%                                           <br /> 000472 Difficult to fix:   23     5%                                           <br /> 000473                                                                         <br /> ****** **************************** Bottom of Data ****************************<br />                                                                                <br /> Figure 3: Sample CCCA Analysis Summary</p>

<p class="MsoNormal">Note:<span>  </span>On a heavily
loaded system, I was able to process 500 programs in less than 4 hours.<span>  </span>The CCCA batch jobs are all given the same
job name so that they are single-threaded through the system, avoiding any
contention on the VSAM CONTROL file and using only one JES initiator.</p>



<p class="MsoNormal">Using EPA’s Summary Report and these CCCA statistics, an
application group’s project manager is better able to determine the size and
scope of the actual conversion work effort.</p>



<p class="MsoNormal">Depending on the circumstances, that project manager may
decide to have his or her staff run this utility in “live” mode and have it
perform the actual code migration.<span>  </span>Then
he or she can have the application programming staff spend time working on the manual
conversions, and devote the necessary time to preparing the appropriate test
cases.</p>



<p class="MsoNormal">Despite having improved the up-front analysis time, I don’t
want to discount the fact that there is still significant work involved with
the source code change management product, Endevor.<span>  </span>Old programs must be checked out (and
archived), and the new versions checked in using the new compiler type.</p>

<h2>Conclusion</h2>



<p class="MsoNormal">There you have it, a mainframe mashup.<span>  </span>I was able to take two very different
products, and repurpose them to produce a valuable analysis tool for application
group project managers and their staff.<span> 
</span>Now, the operating system spends the time determining how much work is
involved in COBOL code migration, not the application programming staff.</p>

<h2>Resources</h2>



<ul style="margin-top: 0in"><li class="MsoNormal">Edge
     Portfolio Analyzer (<a href="http://www.edge-information.com" title="http://www.edge-information.com">http://www.edge-information.com</a>)</li><li class="MsoNormal">COBOL
     and CICS/VS Command Level Conversion Aid (<a href="http://www.ibm.com/software/awdtools/ccca/index.html" title="http://www.ibm.com/software/awdtools/ccca/index.html">http://www.ibm.com/software/awdtools/ccca/index.html</a>)</li><li class="MsoNormal">Enterprise
     COBOL for z/OS (<a href="http://www.ibm.com/software/awdtools/cobol/zos/">http://www.ibm.com/software/awdtools/cobol/zos/</a>)</li></ul>

<p class="MsoNormal">&nbsp;</p>

<p><em>NaSPA member Larry Kahm is president of Heliotropic Systems, Inc., an
IBM Business Partner located in Fort Lee, NJ. He has 20 years of experience
working with systems and application programmers, vendors, and management to
ensure that business applications are developed, maintained, and enhanced with
the appropriate set of tools. When not training to run in the ING NYC Marathon,
he&#39;s busy helping clients with their office networks and home computers.</em></p>

<p class="MsoNormal">&nbsp;</p>

<br class="clear" />
            [#weight] => 0
        )

    [adsense_start] => Array
        (
            [#value] => <!-- google_ad_section_start -->
            [#weight] => -1
        )

    [adsense_end] => Array
        (
            [#value] => <!-- google_ad_section_end -->
            [#weight] => 1
        )

    [field_author] => Array
        (
            [#weight] => -4
            [#value] => <div class="field field-type-text field-field-author"><div class="field-items"><div class="field-item"><div class="field-label-inline-first">Author:&nbsp;</div>Larry Kahm</div></div></div>
            [#access] => 1
        )

    [field_description] => Array
        (
            [#weight] => -2
            [#value] => 
            [#access] => 
        )

    [field_article_pdf] => Array
        (
            [#weight] => -1
            [#value] => 
            [#access] => 
        )

    [field_item_type] => Array
        (
            [#weight] => 9
            [#value] => 
            [#access] => 
        )

    [field_article_cost] => Array
        (
            [#weight] => 10
            [#value] => 
            [#access] => 
        )

    [field_temppdf] => Array
        (
            [#weight] => 10
            [#value] => 
            [#access] => 
        )

    [fivestar_widget] => Array
        (
            [#value] => <form action="/node/4363/render"  accept-charset="UTF-8" method="post" id="fivestar-form-node-4363" class="fivestar-widget">
<div><input type="hidden" name="content_type" id="edit-content-type" value="node"  />
<input type="hidden" name="content_id" id="edit-content-id" value="4363"  />
<div class="form-item">
 <label>Your vote: </label>
 <div class="fivestar-widget container-inline  fivestar-average-text fivestar-user-stars"><input type="hidden" name="auto_submit_path" id="edit-auto-submit-path" value="/fivestar/vote/node/4363"  class="fivestar-path" />
<div class="form-item">
 <label class="option"><input type="radio" name="vote" value="20"   class="form-radio  fivestar-average-text fivestar-user-stars" /> 1</label>
</div>
<div class="form-item">
 <label class="option"><input type="radio" name="vote" value="40"   class="form-radio  fivestar-average-text fivestar-user-stars" /> 2</label>
</div>
<div class="form-item">
 <label class="option"><input type="radio" name="vote" value="60"   class="form-radio  fivestar-average-text fivestar-user-stars" /> 3</label>
</div>
<div class="form-item">
 <label class="option"><input type="radio" name="vote" value="80"   class="form-radio  fivestar-average-text fivestar-user-stars" /> 4</label>
</div>
<div class="form-item">
 <label class="option"><input type="radio" name="vote" value="100"   class="form-radio  fivestar-average-text fivestar-user-stars" /> 5</label>
</div>
</div><div id="fivestar-summary-4363" class="description"><div class="fivestar-summary-empty">No votes yet</div></div>
</div>
<input type="submit" name="op" id="edit-submit" value="Submit rating"  class="form-submit fivestar-submit" />
<input type="hidden" name="form_id" id="edit-fivestar-form-node-4363" value="fivestar_form_node_4363"  />

</div></form>

            [#weight] => 50
        )

    [forward] => Array
        (
            [#value] => <form action="/node/4363/render"  accept-charset="UTF-8" method="post" id="forward-form">
<div><fieldset class=" collapsible collapsed"><legend>Forward this page to a friend</legend><div class="form-item">
 <label for="edit-yemail">Your Email: <span class="form-required" title="This field is required.">*</span></label>
 <input type="text" maxlength="256" name="yemail" id="edit-yemail"  size="58" value="" class="form-text required" />
</div>
<div class="form-item">
 <label for="edit-yname">Your Name: <span class="form-required" title="This field is required.">*</span></label>
 <input type="text" maxlength="256" name="yname" id="edit-yname"  size="58" value="" class="form-text required" />
</div>
<div class="form-item">
 <label for="edit-recipients">Send To: <span class="form-required" title="This field is required.">*</span></label>
 <textarea cols="50" rows="5" name="recipients" id="edit-recipients"  class="form-textarea resizable required"></textarea>
 <div class="description">Enter multiple addresses on separate lines or separate them with commas.</div>
</div>
<div class="form-item">
 <label>Message Subject: </label>
 (Your Name) has forwarded a page to you from NaSPA.com
</div>
<div class="form-item">
 <label>Message Body: </label>
 (Your Name) thought you would like to see this page from the NaSPA web site.
</div>
<div class="form-item">
 <label for="edit-message">Your Personal Message: <span class="form-required" title="This field is required.">*</span></label>
 <textarea cols="50" rows="10" name="message" id="edit-message"  class="form-textarea resizable required"></textarea>
</div>
<input type="hidden" name="nid" id="edit-nid" value="4363"  />
<input type="hidden" name="forward_footer" id="edit-forward-footer" value=" "  />
<input type="submit" name="op" id="edit-submit" value="Send Message"  class="form-submit" />
</fieldset>
<input type="hidden" name="form_id" id="edit-forward-form" value="forward_form"  />

</div></form>

            [#weight] => 10
        )

    [links_related] => Array
        (
            [#value] => 
            [#weight] => 1
        )

    [vote_up_down] => Array
        (
            [#value] => <div class="vote-up-down-widget"><span class="up-inact" title="You must login to vote."></span><span class="down-inact" title="You must login to vote."></span></div>
            [#weight] => -10
        )

)
Syndicate content