164 WebSphere Studio Asset Analyzer for Multiplatforms 3.1
Now, after some discussion, in addition to creating a first and last name field for CUST-NM,
you also need to expand the size of TR-CUSTOMER-NAME, (as well as the file it represents).
That concludes the research for the fields associated with CUST-NM.
5.2.2 Results of your exploration
You have explored a variety of aspects of WSAA in your search to segment the CUST-NM
field. What tasks do you see that will require you to make changes?
򐂰 Update the copybook, CUSTFILE, with the new segments of CUST-F-NM and
CUST-L-NM.
򐂰 Update the copybook, TRANFILE, to expand the TR-CUSTOMER-NAME field.
򐂰 Recompile the two programs that use the copybooks:
TRADERB
MYTRADS
The latter may have additional considerations, but that work is beyond the scope of this
chapter.
Oh, and what about the JCL that references these application data files? Well, those are
actually displayed in the detailed information your project manager originally generated for
you.
5.3 Extracting code for reuse
You can use WSAA to extract specific lines of code to create a new compilable program. You
can extract code only from a COBOL program if it has successfully completed the inventory
collection process. When you extract a segment of code, select lines of code that other
programs can use and that contain COBOL statements such as CALL or MOVE.
Two files are created when you extract code:
򐂰 Code extract file, which contains the lines of code extracted from a COBOL program in
your inventory.
򐂰 Complement file, which contains the lines of code that were not extracted from the original
COBOL program.
When the complement file is created, a COBOL CALL statement is added to invoke the code
extract file. If the code extract file and the complement file are created without any errors, you
can compile these two files and link each of them into load modules. When you invoke the
complement module, it should perform the same function as the original COBOL program.
Note: We are well aware that you could have made this discovery if you were using your
existing methods of maintaining program source code. WSAA just brings all of the
potentially hidden material to the foreground.
Restriction: The complement file is created only if you have selected one or more
contiguous lines of code. If you select lines that are non-contiguous, WSAA is not able to
create a complement file.
Chapter 5. Working with your inventory 165
5.3.1 Extract code from TRADERB
To extract code from TRADERB, perform the following steps.
1. On the Data element summary page, click the number next to program under Program
heading and the Program summary page will be displayed, as shown in Figure 5-16.
Figure 5-16 Program summary page (Part 1 of 1)
2. Now click on TRADERB under the Program heading. The Program details page will be
displayed as shown in Figure 5-17 on page 166 and Figure 5-18 on page 167.
166 WebSphere Studio Asset Analyzer for Multiplatforms 3.1
Figure 5-17 Program details page for TRADERB (Part 1 of 2)
Chapter 5. Working with your inventory 167
Figure 5-18 Program details page for TRADERB (Part 2 of 2)
168 WebSphere Studio Asset Analyzer for Multiplatforms 3.1
3. Click Code extraction. The Code extraction page is displayed, as shown in Figure 5-19
and Figure 5-20 on page 169.
Figure 5-19 Code extraction page, preliminary view (Part 1 of 2)

Get WebSphere Studio Asset Analyzer for Multiplatforms 3.1 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.