AD Module 3 Detailed Analysis Reports
AD Module 3 Detailed Analysis Reports
Module 3 –
Detailed Analysis Reports
© 2019 IBM Corporation
1
Company Trademarks and Copyrights
© Copyright IBM Corporation 2008 through 2019.
All rights reserved – including the right to use these materials for instructional
purpose.
The information contained in these materials is provided for informational purposes only, and is
provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible
for any damages arising out of the use of, or otherwise related to, these materials. Nothing
contained in these materials is intended to, nor shall have the effect of, creating any warranties
or representations from IBM or its suppliers or licensors, or altering the terms and conditions of
the applicable license agreement governing the use of IBM software. References in these
materials to IBM products, programs, or services do not imply that they will be available in all
countries in which IBM operates.
This information is based on current IBM product plans and strategy, which are subject to change
by IBM without notice. Product release dates and/or capabilities referenced in these materials
may change at any time at IBM’s sole discretion based on market opportunities or other factors,
and are not intended to be a commitment to future product or feature availability in any way.
IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM
Rational products and services are trademarks or registered trademarks of the International
Business Machines Corporation, in the United States, other countries or both. Other company,
product, or service names may be trademarks or service marks of others.
2
The IBM Application Discovery Curriculum
3
Course Contributing Authors
4
Topics in this module
After completing this module you will be able to:
Launch AD and navigate within the product running under Eclipse
Invoke some of the AD Mainframe Reports – and be able to interpret the
information presented in the reports
Complexity Reports
▪ Statistically analyse your COBOL, PL/I and Assembler programs for complexity
and maintain-ability
Datasets Reports
▪ Track data values from the context of the files they are read from and written
to
Dead Code Reports
▪ Discover orphaned programs within a project – and unreferenced/unused
routines (paragraphs/sections and PROCS) in programs
Impact Reports
▪ Analyze the effects of changes to program variables and DB2 table columns –
across all resources in your Project
▪ Paths through Jobs – defined CA7 scripts
Inventory Reports
▪ A detailed list of all the DDCL elements in the current project as well as details about
each element. Includes missing inventory (COPYBOOKS/INCLUDES not found, Called
programs not found etc.
Miscellaneous Reports
▪ Job triggers and Paths through Jobs – defined in CA-7 scripts
▪ Forward and Backward Call Chains for modules and DB2 tables
Where Used Reports
▪ Where Used Reports show all the places within the application where specific
resources are referenced.
5
UNIT AD for ISPF Developers
Topics:
▪ AD Detailed Analysis Reports
▪ Labs & Module Review
6
Review – Eclipse Terms, Concepts and Navigation
Back Button
module:
1. Select a Project
2. Select a Report to run against
the project
Content
Reports
Properties view
Outline, Problems,
Help System
Error Log views
7
Review – AD Tools/Functionality and Report Categories
8
Complexity Reports – 1 of 4
Select the Project
Double-Click a report
Save
and/or
Export to
PDF, DocX.
Cyclomatic Report
10
Complexity Reports – Heuristics – 3 of 4
Heuristic Report – measures
▪ An Assembler program and a COBOL complexity by identifying types of
program’s Heuristics metrics statements in values are customized
in the report properties files during
installation.
11
Complexity Reports – 4 of 4 https://en.wikipedia.org/wiki/Halstead_complexity_measures
https://www.cachequality.com/docs/metrics/sei-maintanability-index
14
Reading the details of a report – zoom-in/zoom-out
On the top of the Reports view, next to the paging controls you will find
zoom controls – that may make reading report details simpler
15
Datasets Reports – Data Flow
Through Datasets – 1 of 3
Select the Project then…
Double-Click Data Flow Through Datasets
…to BNCHMRK2.PATEDIT.WEEKLY
…to BNCHMRK2.PATSORT.WEEKLY
…to BNCHMRK2.PATSRCH.WEEKLY
…to BNCHMRK2.PATSRT2.WEEKLY
…to BNCHMRK2.PATERR.WEEKLY
Program[JobNameJobStepLine# in JCL]
Program[JobNameJobStepLine# in JCL]
Program[JobNameJobStepLine# in JCL]
18
Dead Code Reports – Unreferenced Programs – 1 of 2
Program
Type
Filters
Report Generation
Options
A statistical summary
graphic showing:
▪ Programs in a Project
that are executed
(Batch or Online)
▪ Programs that are
never executed
21
Dead Code Reports – Unused Routines Within Programs – 2 of 2
Cyclomatic Report
22
Field Expansion – 1 of 4
Field Expansion – documents the impact on
programs, variables, copybooks, DB2 tables and
Select the Project files in your Project affected by enlarging the
Double-click Field Expansion Report definition of a single variable or DB2 column
Select programs
and specify
Report
Impact generation
analysis reports likeoptions
Field
expansion in medium-sized or large
projects can take a while to produce.
Note that there are 137 pages in this report
Double-Clicking a variable
in the report opens to the
variable definition in the
source code.
26
Field Usage – 1 of 3
Field Usage – documents the
Select the Project relationships among the resources of an
Double-click Field Usage Report application so that the impact of renaming a
field can be understood.
Note: No option for limiting report depth Further refine your Field selection
27
Field Usage – 2 of 3
32
Impact Analysis – 4 of 4
Interpretation
33
Summary of this module…
In this module you learned how to:
Launch AD and navigate within the product running under Eclipse
Invoke the Mainframe Reports against an AD Project
Utilize the filter dialogs to zero in on specific Points-of-Interest
Interpret the summary & detail information presented in the reports – following
report flows and interpreting the semantics presented
Complexity Reports
▪ Statistically analyse your COBOL, PL/I and Assembler programs for complexity
and maintain-ability
Datasets Reports
▪ Track data values from the context of the files they are read from and written
to
Dead Code Reports
▪ Discover orphaned programs within a project – and unreferenced/unused
routines (paragraphs/sections and PROCS) in programs
Impact Reports
▪ Analyze the effects of changes to program variables and DB2 table columns –
across all resources in your Project
▪ Paths through Jobs – defined CA7 scripts
Inventory Reports
▪ A detailed list of all the DDCL elements in the current project as well as details about
each element. Includes missing inventory (COPYBOOKS/INCLUDES not found, Called
programs not found etc.
Miscellaneous Reports
▪ Job triggers and Paths through Jobs – defined in CA-7 scripts
▪ Forward and Backward Call Chains for modules and DB2 tables
Where Used Reports
▪ Where Used Reports show all the places within the application where specific
resources are referenced.
34
Summary of the Impact Reports
Field Expansion and Impact Analysis utilize a
Byte/Displacement tracing algorithm – i.e.
Trace the movement of bytes 1216 in a given
record, throughout the source files in an AD Project
36
Review – Match the Report Name to its Description
Report Name Report Description
Impact Analysis__ 1. Documents the impact on programs, variables and files in your Project
affected by enlarging the definition of a single variable or DB2 column
Unreferenced Programs__ 2. COBOL Paragraphs/Sections or PL/I PROCs that are never executed through
a program’s processing logic
Maintainability Index__ 3. Measures complexity by identifying types of statements in the programs and
assigning a weight to each type.
Field Usage__ 4. Measures the number of linearly independent paths through a program
module.
Heuristic Report__ 5. Measures complexity by calculating data - variables & operators – both
defined and in use
Unused Routines__ 6. Combines Cyclomatic and Halstead and defines a threshold for rewriting
program code
Field Expansion__ 7. Shows the data flow within a batch process, starting with a physical dataset
that can be either at the start of the process or at the end of the data flow or in
the middle of it
Cyclomatic (McCabe) 8. Source programs in your Project that are never referenced in JCL or
Report__ Transactions, or referenced through program-to-program CALL statements.
Halstead Report 9. Documents the relationships among the resources of an application so that
the impact of renaming a field can be understood
Data Flow Through 10. Allows you to understand the consequences of modifying a variable or DB2
Datasets__ column. The report also determines what other resources use the variable or
DB2 column that would be affected by a change.
37
Hands-on Workshops – 1 of 8 Complexity Reports
Log into your AD Analysis Server:
If you are using zTrial - Login to the zTrial machine and launch AD
If you are using your own AD Server – launch AD
Having logged into AD –– do the following with the tools and source Projects stored in the AD
Repository. Close each of the Reports views after you’ve finished the respective Use Cases:
Complexity Reports
1. Select an AD Project. Expand Mainframe Reports and expand Complexity Reports
2. Double-click (launch) a Cyclomatic Report
3. Filter programs to run the reports against, using: Program Type and/or Program Name
4. In Report Generation Options show the appendix
5. Read through information produced by the report: Graphical summary & Detailed information
6. Return to step 2 (above). Launch each of the other Complexity Reports (one at a time) and
follow steps 3 5
1. Halstead Report
2. Heuristic Report
3. Maintainabiliy Index
7. Experiment with changing default Report algorithms & weights:
1. Heuristic Complexity
2. Halstead Report
Refer to the slide in this module if you need a reminder of how to customize
the weights and settings for the reports
38
Hands-on Workshops – 2 of 8 Dataset Reports
Dataset Reports
1. Select an AD Project.
2. Expand Dataset Reports
3. Double-click (launch) Data Flow Through Datasets
4. Filter the Available Datasets and select one or more files to run the report against
5. In Report Generation Options: Show the appendix
6. Experiment with Limit data flow and Data flow direction
7. Read through the information produced by the report:
1. Use the TOC to link to a file’s chain(s)
2. Follow the data flow in Report Details for one or more files
3. Example……………………………….
40
Hands-on Workshops – 4 of 8 Field Usage
Before tackling the workshop, review the slides that cover the Field
Usage Report creation process, options and report nuances
Workshops Steps:
1. Select an AD Project.
2. Expand Impact Reports
3. Double-click (launch) Field Usage Report
4. Depending on whether you’re using the zTrial Repository or your own, proceed
through the wizard and set – or select:
▪ Target selection If you are using zTrial consider:
• Locate variables
▪ Expansion depth • Include
▪ Type of source • PATMSTR
• PATIENT-ID
▪ Single include selection
▪ Select report inputs
5. Generate the report and review the report summary:
1. Review the Outline report
2. Choose one of the variables and mentally trace the logic (Impact analysis of variable)
3. Click a variable and open the source file to the line that produced the impact trace
analysis
Field Usage – documents the relationships among
the resources of an application so that the impact of
renaming a field can be understood. 41
Hands-on Workshops – 5 of 8 Field Expansion
Before tackling the workshop, review the slides that cover Field Expansion
Workshops Steps:
1. Select an AD Project.
2. Expand Impact Reports
3. Double-click (launch) Field Expansion Report
4. Depending on whether you’re using the zTrial Repository or your own, proceed
through the wizard and set – or select:
▪ Target selection
▪ Expansion depth If you are using zTrial consider:
▪ Type of source • Locate variables
• Include
▪ Single include selection • PATMSTR
▪ Select report inputs • PATIENT-ID
5. Generate the report*** and review the summary and detailed information:
1. Browse the programs
2. Choose one of the variables and mentally trace the logic (Impact analysis of variable).
Note that this detailed discovery and documentation aspect of Field Expansion
represents one of the primary value propositions of the AD Tool
3. Click a variable and open the source file to the line that produced the point-of-interest
46
AD Asset Partitioning
AD Repository
(Default DB2 Database == DMHDB)
47
AD Tools: Graphs, Reports and Usage
AD Tools
Graphs
COBOL
Program
48
Chalkboard/Discussion
Application Analysis Tasks Current methods and tools?
Project scoping
Analyze an application
Halstead Report_5_ 9. Documents the relationships among the resources of an application so that
the impact of renaming a field can be understood
Data Flow Through 10. Allows you to understand the consequences of modifying a variable or DB2
Datasets_7_ column. The report also determines what other resources use the variable or
DB2 column that would be affected by a change.
50
AD Analysis Project – Review
What is an AD “Analysis Project”?
▪ AD calls physical groupings of parsed programs and other application source code
components “Analysis Projects” – or just “Projects”
Component Types
z/OS Application
51
Summary of the Impact Reports
Field Expansion – documents the impact on
programs, variables and files in your Project affected
by enlarging the definition of a single variable or DB2
Table or View column
52