AD Module 4 Where Used and Text Search
AD Module 4 Where Used and Text Search
Module 4 –
Where Used (Usage In…)
and Text Search
© 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 the following AD Reports and Features – and be able to interpret the
information presented
Explore
▪ Optimized (fast/efficient) Text Search for
components within your Project
Usage in Jobs
▪ X-Ref reports, which provide many different
dynamic filter options to explore associations,
dependencies and component usage from the
context of batch jobs
Usage in Programs
▪ X-Ref reports, which provide many different
dynamic filter options to explore associations,
dependencies and component usage from the
context of Program elements: Data, Logic Flow,
File CICS/IMS and Database usage, etc.
5
UNIT AD for ISPF Developers
Topics:
▪ Text Search and Usage In … Reports
▪ Labs & Module Review
6
Review – AD Tools/Functionality and Report Categories
7
Text Search
Optimized text search across selected files loaded into selected
repository(s)
• Variables
• Procedural components; Paragraphs, Sections, PROCs, etc.
• Comment Text
Steps:
• Select one or more Projects
• Specify search string options
• Standard text + Wildcards
• REGEX expressions
• CasE senSitiVe search option
• Filter file types
• Click Search
• View/Select from result files
• Results are hyper-linked to source file
• Can further Explore COBOL variable usage through COBOL Source Analysis
• Export results to .csv
8
Text Search
1. Select one or more Projects
2. Specify search string patterns
3. Click Search
Search/Filter options
▪ REGEX patterns
▪ Case sensitive search
▪ Ignore pattern if
found in comments
5. Analyze result occurrences within ▪ Filter on File type(s)
the selected file ▪ Search only previous
Hypertext linked to source file search Result files
9
Text Search – REGEX (Regular Expression) Example
diag.*|.*data
Locate source files with text strings that:
• Begin with diag
diag.*|.*data • Or end in data
Note that this is a case-insensitive search
Points-of-interest in
selected result file
Result files
10
REGEX Examples and Links to Tutorials
12
Text Search – Search in results (Compound Filter)
Files – in a project
16
Indexing Functionality – Usage in…
1. Select the Project and select
▪ The workflow follows a set pattern: the Usage analytics tool
1. Select the Project.
Double-Click the Usage in tool
2. Customize Filters & Limits –
Click Apply to trigger the report
3. Scroll through the Results –
Analyze points-of-interest
4. Re-Sort results on different
Major/Minor index Attributes
5. (Optionally) select a related
Usage/Graph or Report
2. Specify search Filters & Limits then Click Apply
Search filtering specification entry box…
17
Indexing Functionality – Usage in… Filters
Filters can be used to pinpoint specific Project entries
18
Dataset Usage in Jobs – 1 of 2
Find this text within the Results list (click this to continue finding)
The "Filter" input box can be used to add additional filter specifications
Reorder
button
21
Dataset Usage in Programs – 2 of 3
22
Dataset Usage in Programs – 3 of 3
23
Pgm Usage in Jobs
– 1 of 2
▪ Select a Project and Double-click Pgm Usage in Jobs
You will be presented with the Pgm Usage in Jobs Filter dialog
▪ This dialog allows you to limit the list of usage results.
You can save & reload your Filters
Initial breakout of
the program types
in this Application
Expanded Assembler
24
and Utility Results
Pgm Usage in Jobs – 2 of 2
– For Assembler Apps
The Assembler CSECT (program) ORDUPD
Its JCL file
The EXEC Step (STEP10)
The program’s DSECT (FD) list
25
IMS/DB Usage in Programs – 1 of 2
▪ After selecting a
Project and
Double-clicking
IMS/DB Usage you
are presented with
a standard Filter
dialog.
▪ Click the Apply
button to generate
The "Filter" input box can be used to add additional filter specifications
Points-of-Interest
(Results)
IMS DB
▪ This provides the IMS DC (IMS TM)
tree-control shown IO PCB Mask
here Language
Program ID (name)
▪ Complete with: IMS DC Keyword
IMS DB/DC Hyper-Link to source line
statement
categories
Hyperlinks to the
source files
26
IMS/DB
Usage in
Programs
– 2 of 2
27
SQL Table Usage
• The SQL Table Usage view lists the DB2 tables that are used
by the project.
• For each table, nodes represent the different statement types
that refer to the tables (select, update, delete, insert), and
for each statement-type, the references in the source code
(file name and location of the reference) are hyperlinked
SCHEMA
Language
Table
SQL Statement Type: DECLARE CURSOR
SQL Statement Type: FETCH
Reordered Results:
▪ Statement Type
▪ SCHEMA.TABLE
▪ Language
▪ Program
▪ Line Hyperlink
28
SQL Table Field Usage
Language
Program
program
SQL Statement Type: SELECT
Hyperlink to source line
29
SQL Table Field Usage – Reordered Results
Statement Type
Table
Table
Statement Type
Statement Type
SCHEMA.TABLE
SCHEMA.TABLE
SCHEMA.TABLE
Column
Column
Column
Language
Program
Hyperlink to source line
30
MQ Usage in Programs
As with
other Usage
tools you
can reorder
the Results
31
Usage in Programs –
Assembler Program Structure
32
• The Include Usage tab displays information on the
Include Usage in Programs usage of copy files in the project:
• The nodes represent the Includes in the project
• Expanding an include node displays
• Include statements in COBOL files that refer to the
copybook or EXEC SQL Include
• The name of the file that contains the Include
statement
• Hyperlinks to the statement’s location
• Copybook
• Language
• Program
• Statement Type
• Hyperlink to source location
33
COBOL Variable Usage
• The COBOL Variable Usage tab presents how all variables are
used throughout a program source file
• This tab has the following levels:
• Program name
• Program Section (WORKING-STORAGE or LINKAGE)
• Variable name
• Read (versus) Write breakout
• COBOL language statement type
• Hyperlinks to line references
34
Explore Project
▪ Double-Click a Project to open a list
of the Resource types contained in the
Project
▪ Select and/or Select & Filter the list
down to specific files
▪ Select a file and choose an AD Tool
35
Topics in this module
After completing this module you will be able to:
Launch AD and navigate within the product running under Eclipse
Invoke the following AD Reports and Features – and be able to interpret the
information presented
Explore
▪ Optimized (fast/efficient) multi-faceted Text
Search for components within your Project
Usage in Jobs
▪ X-Ref reports, which provide filter options to
explore associations, dependencies and
component usage from the context of batch
jobs
Usage in Programs
▪ X-Ref reports, which provide filter options to
explore associations, dependencies and
component usage from the context of Program
elements: Data, Logic Flow, File & Database
usage, etc.
36
UNIT AD for ISPF Developers
Topics:
▪ Detailed Analysis Reports
▪ Labs and Module Review
37
Review Questions
1. Options for Exploring a Repository 4. True/False: Usage in … functionality is
include Filters for: performed using a common set of
1. Text-based Search Patterns dialogs and actions
2. Regular expression Search Patterns
5. True/False: The steps for Usage in …
3. File name filters
functionality include:
4. File type Filters
▪ Select the Project. Double-Click the Usage in tool
5. Projects ▪ Setup Filters & limits, Click Apply to trigger the report
6. Ignoring or Including Comments ▪ Scroll through the Results, Analyze points-of-interest
7. Case Sensitive search ▪ Re-Sort results on different Major/Minor index
8. Search for Anagrams Attributes
▪ (Optionally) select a related Usage/Graph or Report
9. PDF-enabled search
10. ASCII vs. EBCDIC searching 6. True/False: You can Reorder the Result-
11. All of the above level reports from Usage in – allowing
12. Numbers 1 7 of the above you to refactor the code in a program or
13. Numbers 1, 3, 5, 7, 9 above – only include file
14. Numbers 2, 4, 6, 8, 10 above – only 7. True/False: You can Reorder the Result-
2. REGEX Logical OR search is: level reports from Usage in – allowing
1. The | character you to understand asset usage from
2. .* varying contexts – similar to “Pivot
3. REGEX Logical AND search is: Table” functionality in MS-Excel
1. The | character
2. .*
38
Hands-on Workshops – 1 of 4 Explore – Text Search
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
Close each of the views after you’ve finished each of the Use Cases
Workshop steps:
• Select one or more Projects. **If you are using zTrial continue using the Hospital Project
• Experiment with the following search string options – Combine options in ways
that you would find useful in your own production analysis work:
• Filter (search) using standard text + wildcards
• REGEX expressions
• CasE senSitiVe search option
• Filter on file types
• Click Search
• View/Select from result files
• Results are hyper-linked to the source file
• Explore COBOL variable usage through COBOL Source Analysis
• Optionally (time-permitting) Export your search results to a .csv file
39
Hands-on Workshops – 2 of 4 Dataset Usage in Jobs
Review the material in the slide on this topic – then:
1. Select an AD Project. Expand Usage in Jobs then Dataset Usage in Jobs
2. Setup the Filters & limits – click Apply
3. Scroll through the Results – Expand the file icons and learn what each represents
4. Options to experiment with – from Results:
1. With the file selected, access a Flowgraph and/or the Dataset Usage in Programs tool
2. Double-click a Job to open the Job’s JCL
3. Note the Outline view’s Tree-Control
40
Hands-on Workshops – 3 of 4 Dataset Usage in Programs
Review the material in the slide on this topic – then:
1. Select an AD Project. Expand Usage in Jobs then Dataset Usage in Programs
2. Setup the Filters & Limits – click Apply
3. Scroll through the Results – and derive an understanding of what this specific tool
provides – note that this information is captured on one of the previous slides in this course
4. Options to experiment with – from Results:
1. Double-click a statement and note the source for that statement opens in a view
2. Select a file or statement. Experiment with the additional Usage functions that appear
in the toolbar on the right-hand side of the product
3. Click the Reorder button – and experiment with the Reordering options
41
Hands-on Workshops – 4 of 4 Usage tools
Open-Ended Workshop
Experiment with the Usage in tools that
apply to the AD Project resources in your
Repository.
42
UNIT AD for ISPF Developers
Topics:
▪ Detailed Analysis Reports
▪ Labs and Module Review
▪ Backup Slides and Answers to Review Questions
43
Review Questions
1. Options for Exploring a 4. True/False: Usage in … functionality is
Repository include Filters for: performed using a common set of
1. Text-based Search Patterns dialogs and actions
2. Regular expression Search Patterns
5. True/False: The steps for Usage in …
3. File name filters
functionality include:
4. File type Filters
▪ Select the Project. Double-Click the Usage in tool
5. Projects ▪ Setup Filters & limits, Click Apply to trigger the report
6. Ignoring or Including Comments ▪ Scroll through the Results, Analyze points-of-interest
7. Case Sensitive search ▪ Re-Sort results on different Major/Minor index Attributes
8. Search for Anagrams ▪ (Optionally) select a related Usage/Graph or Report
9. PDF-enabled search 6. True/False: You can Reorder the Result-
10. ASCII vs. EBCDIC searching level reports from Usage in – allowing you
11. All of the above to refactor the code in a program or
12. Numbers 1 7 of the above include file
13. Numbers 1, 3, 5, 7, 9 above – only
7. True/False: You can Reorder the Result-
14. Numbers 2, 4, 6, 8, 10 above – only
level reports from Usage in – allowing you
2. REGEX Logical OR search is: to understand asset usage from varying
1. The | character contexts – similar to “Pivot Table”
2. .* functionality in MS-Excel
3. REGEX Logical AND search is:
1. The | character
2. .*
44
Access IDz Tooling
• There are a few IDz tools available to you
• Right-Click – and select enabled options
• Different releases enable different options
45