0% found this document useful (0 votes)
24 views45 pages

AD Module 4 Where Used and Text Search

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views45 pages

AD Module 4 Where Used and Text Search

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Application Discovery

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

▪ Module 1 – Product Overview, Terms, Concepts and Vocabulary


▪ Module 2 – Eclipse Navigation and Introduction to Call Graphs
▪ Module 3 – AD Detailed Analysis Reports
▪ Module 4 – Resource Usage (Where Used) and Text Search

3
Course Contributing Authors

Thanks to the following individuals, for assisting with the


materials in this course:
Russ Courtney – IBM/Application Discovery Technical Specialist
David Lawrence – IBM/Application Discovery Technical Specialist
David Hawreluk – IBM/Application Discovery Technical Specialist
Dave Baxandall – IBM/Application Discovery Senior Technical Specialist
Russell Bonner – IBM/Application Discovery Technical Specialist

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

4. Select a file from result list


(files that contain content matching your search pattern)

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 

 Selected point-of-interest (line)

10
REGEX Examples and Links to Tutorials

▪ Sites that have good Regular Expression tips/techniques:


• http://docs.oracle.com/javase/1.4.2/docs/api/java/util/regex/Pattern.html
• http://www.regular-expressions.info/javascriptexample.html
• http://java.sun.com/developer/technicalArticles/releases/1.4regex/
• http://www.regular-expressions.info/reference.html
11
Text Search – File types – and Search in results

Click the ellipsis


button to popup a file
type selection dialog
• Can check off one or more
z/OS source file types
• Search will be limited to the
selected file type choices

12
Text Search – Search in results (Compound Filter)

Search in results confines the


search to only the files previously
returned as found-search results.

This provides a “Logical AND” filter


– something that can be extremely
useful when screening out False
Positives or when working with
large numbers of files or large
program sources.

In this example we searched for


diag …which produced 33 result
File names.

We then searched for copy within


the diag result set – which filtered
the list of files down to 19 – that
had both diag AND copy
Results
Files
13
COBOL Source

Analysis –
Integration with other AD
functionality

Navigate among AD tools:


1. Select a Point-of-Interest
2. Use the tools in the right-side-bar
14
… by the numbers…

Navigate among AD tools


1. Select a search term (PRIMARY-DIAGNOSTIC-CODE)
2. Click COBOL Source Analysis
3. COBOL Source Analysis screen opens
4. We see that the variable is a WORKING-STORAGE defined variable
5. Look to see where that variable is used throughout the Application
6. Results uncover that several programs use the variable - BNCH5601, BNCH5602, DALYEDIT, etc.
6a. In each case the variable is defined in WORKING-STORAGE and the variable is used in COBOL IF and MOVE statements
6b. By Program, we can see each individual like variables (each of those lines is a hotspot
15 where the program will open and you will be positioned at the line number)
X-Ref Functionality – Usage in…
▪ Usage in… is a control-break (X-Ref) report that reveals
relationships among application elements in the AD Project
▪ There are many built-in indexed Reports
▪ Most of them can be re-sorted
on-the-fly to present information
from an alternate sort key
▪ Each Usage in… sorts all Project
entries of a given type

Result find operation

Files – in a project

Usage in Jobs – 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…

3. Scroll through the Results –


analyzing points-of-interest

5. Optionally trigger
(Double-Click) a related
Usage, Graph, or Report tool

4. Many Usage in… Reports


allow you to change the default
major/minor sort criteria

17
Indexing Functionality – Usage in… Filters
Filters can be used to pinpoint specific Project entries

• Programs with names that start with TR


• In batch Jobs named: DDS0001

18
Dataset Usage in Jobs – 1 of 2

▪ After selecting a Project and Double-clicking Dataset Usage,


you are presented with a standard Filter dialog.
▪ This dialog allows you to filter by limiting the list of retrieved
results

▪ You can save & reload your Filter specification(s):

After specifying your Filters; Click Apply


to launch the Usage cross-reference view
19
Dataset Usage in Jobs – 2 of 2 – Results of Previous Usage/Filter

 Find this text within the Results list (click this to continue finding)

 Single-Click a DSN to access related Usage/Graphs/Reports


 Double-Click Job to open the JCL source file

▪ Usage in … functionality is performed using a The Outline View provides a Tree-Control


common set of dialogs and actions: UI into the Job elements

 Select the Project and select the Usage analytics


 Setup the Filters & limits – click Apply
 Scroll through the Results – to analyze points-of-interest
 (Optionally) select a related Usage/Graph/Report
20
Dataset Usage in Programs
– 1 of 3
▪ Cross-references Datasets (DSNs) with programs and I/O operations
▪ After selecting a Project and Double-clicking Dataset Usage in Programs,
you are presented with a standard Filter dialog where you have a wide
variety of select-able filters. Click

The "Filter" input box can be used to add additional filter specifications

Reorder
button

21
Dataset Usage in Programs – 2 of 3

 Dataset (DSN) Reorder


 JCL DD button
 Program FD
 Language
 Program ID (name)
 Instruction
 Hyper-Link to source line
 Instruction
 Hyper-Link to source line
 Hyper-Link to source line
 Instruction
 Hyper-Link to source line

22
Dataset Usage in Programs – 3 of 3

▪ Can re-order the Attribute


sort criteria – similar to
MS-Excel “pivot tables”
▪ Answer questions such as:
 What Programs REWRITE
which file(s)
 Etc.
 Instruction (REWRITE)
 Dataset (DSN)
▪ Hovering the cursor over each
 Dataset (DSN)
line will identify what that line is.
 DD Statement
 Dataset (DSN), JCL DD, etc.
 FD Statement
 Language
 Program ID (name)
 Program ID (name)
 Program ID (name)
 Hyper-Link to source line

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

▪ COBOL Program DALYEDIT


 Its JCL file
▪ The EXEC Step (PATEDIT)
▪ The program’s 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

As with the COBOL I/O options, you can


re-order the Results. In this case by
Database/Program/Statement Type

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

The SQL Table Field Usage tab shows the


 Schema.Table usage of SQL table columns, within the
 Table Column (field) programs in the current project.



 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

• The MQ Usage tab presents how MQ Series queues are being


used throughout the programs.
• When you send or receive a message using MQ, you specify the
queue manager you working with and the queue you are using.
• This tab has the following levels:
• Queue manager
• Queue
• Program statement type
• Hyperlinks to source occurrences

As with
other Usage
tools you
can reorder
the Results
31
Usage in Programs –
Assembler Program Structure

Assembler Program Structure


is essentially an “outline view” of
an Assembler program – with
source hyperlinks to:
• Assembler programs
• CSECTs
• Entry(s)
• Macros
• Includes and COPY files

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

• Language: 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

Selected COBOL program

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.

You can use Explore project to find out


what Resource types have been parsed in.

Investigate different Filter options with


Usage in

If the Usage in tool you’re running offers


the ability to Reorder – be sure to try this
out – using a couple of patterns

And from Results – try firing off (Double-


Clicking) one of the nascent tools against
a row in the Results

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

You might also like