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 ===> Scroll ===> 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"> </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 ===> Scroll ===> 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">[img_assist|nid=4362|title=ISPF Dialog Data Entry Panel|desc=|link=none|align=left|width=400|height=300] </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"> </p>
<p class="MsoNormal">The first batch job performs the following processing:</p>
<p class="MsoNormal"> </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"> </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 FileManager 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 ===> Scroll ===> 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 (http://www.edge-information.com)</li><li class="MsoNormal">COBOL
and CICS/VS Command Level Conversion Aid (http://www.ibm.com/software/awdtools/ccca/index.html)</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"> </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's busy helping clients with their office networks and home computers.</em></p>
<p class="MsoNormal"> </p>