Labs
Labs
Labs
DevOps
All rights reserved – including the right to use these materials for IDz instruction.
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 IDz Workbench Curriculum
▪ Module 1 – IDz Terms, Concepts and Navigation
▪ Module 2 – Editing Your COBOL Programs
▪ Module 3 – Analyzing COBOL Programs
▪ Module 4 – Remote Systems – Connect, Navigate and Search
▪ Module 5 – Remote Systems – Dataset Access and Organization
▪ Module 6 – Remote Systems – ISPF 3.x, Batch Jobs and Host Emulation
▪ Module 7 – MVS Subprojects – Organizing PDS Members and SCM Checkout
▪ Module 8 - The Data Tools – SQL Code/Test and DB2 Table Access
▪ Module 9 - Debugging z/OS COBOL Applications
Optional Modules
▪ IDz/Endevor Integration Through CARMA
▪ zUnit – Unit Test
▪ Code Coverage – Test quality feature
▪ Code Review – Application quality feature
▪ Menu Manager – Integrate ISPF REXX Execs and CLISTs
▪ Web Services – SOA development
3
How to succeed at this class…
Course
Workshops
1. Attend class:
- Ask questions 2. Do the exercises Application
- Follow the product workflow in Labs.pdf:
3. Apply the
- Identify the terms, concepts - Iterate thru the workflow
& vocabulary - and relate the and practice the tool navigation techniques to your
IDz tools/techniques to ISPF (build eclipse muscle memory) App-Dev projects:
- Discover the productivity - Commit the U.I. and product - Master the product workflow
features layout to memory & navigation
- Explore features both covered - Gain more productivity and
and not covered during class speed over time, and use the
features to improve application
quality
IMPORTANT NOTE:
If while you are taking this class your find that you do not have the time to complete the
workshops between sessions:
Do what you can to follow the instructor's demo during class - and ask questions
Show up 15 minutes early to each session - ask questions, listen to others' questions
At the end of each session we will take 15 minutes to cover additional productivity topics
FWIW - You can re-take any module in this course during a scheduled Entry Level training class
4
IDz Across the Modern SDLC
z/OS Application
Development
Maintenance and
Production Support
SOA/Web Services
Enterprise Remote and Local Search
API Integration Application Analysis IDz Static Analysis Tooling
Continuous Integration Modernization
Parallel/Agile Lifecycle
IBM Debugger & Unit Test Build/Test
Code Coverage
File Manager/Fault Analyzer DevOps Design IDz Graphical Modeling Tools
DB2/SQL and IMS/DLI Tools
Batch Job Management Pipeline
Development
Language Sensitive Editors
Construction COBOL, PL/I, JCL, SQL,
Assembler, REXX/CLIST,
BMS,MFS Graphical Editors
Access to your shop’s custom Code Review
ISPF Tools and Procedures 5
Access to Host Connection Emulator
▪ From the Remote Systems view, launch Host Connection Emulator
for 3270 access to your shops ISPF panels/CLIST/REXX Execs.
▪ Use IDz for:
Code Analysis/Project Research & Documentation
Test/Debug & Code Coverage
High-productivity code development
DB2/SQL Development Host Connection
Test Data Create/Update Emulator
ABEND Root Cause Analysis
6
Course Assumptions
1. You know ISPF and have used it for at least two years, doing
production work on z/OS with COBOL, PL/I or Assembler
Note that all of the workshops in this course are in COBOL – although
files exist that are Assembler and other languages for you to experiment
with – as time permits
2. You have:
No experience with Eclipse or IDz
Some experience with PC tools
▪ You have used MS-Windows applications for at least one year
IDz installed and running on your workstation at version 8.0 or later
7
Product Names and Releases
There are three separately named products:
1. RDz Released 2009
▪ RDz’s predecessor solutions were GA’d in 2003
2. IDz Released 2016
▪ Same client & server software
▪ With functional updates to IDz v9.5
3. ADFz Released 2016
▪ Same client & server software as IDz
▪ Also contains Problem Determination Tools:
– Debug Tool, File Manager
– Fault Analyzer and Application Performance Analyzer
For this course you can use IDz v9.5 or IDz v14 or ADFz. If you
use a previous release the workshops and screen captures will
be significantly different
8
Installing the Education Workspace – Needed for the hands-on labs/workshops
1. Download the Education Workspace from:
https://www.ibm.com/developerworks/community/files/app#/file/15c1414c-2dee-4ecd-a036-525f50233b61
3. When the unzip completes, use Windows to find the education_workspace folder
that contains the .metadata subfolder Remember this directory/location
When you launch ADFz/IDz you will be prompted for a Workspace location.
Browse to your folder: education_workspace – the parent folder of .metada
9
Launch IDz and Browse to the education_workspace
▪ From your desktop or the Windows launch IDz
▪ When you are prompted, Browse… to find your education_workspace (prev. slide)
10
Eclipse, IDz and the Custom Workspace
When IDz opens it should look like this screen capture. Of particular importance is the
IDz Tech Portal folder, which contains lab exercise files and other enablement files
11
Content (Review) versus Workshop (hands-on lab) Slides
There are two types of slides in this PDF:
1. Workshop slides:
These are slides that will help you master IDz through technical
development techniques and hands-on exercises
▪ Workshop slides have this character: in the slide header
– Note that some workshop slides have the word "Workshop" in the slide
header
– However all workshop slides have the character in the slide header
2. Content review:
▪ Any slide that does not contain a character in the slide header
contains conceptual learning / review material
– To be read for understanding.
Often these slides are preparation for the workshop exercises that follow
12
How to do the workshop exercises in this course
2. If you have difficulty doing a lab exercise or just want to review a topic:
Open the corresponding course Module PDF
Do a search (Ctr+F) on the topic or keyword corresponding to the lab exercise
that you’d like more information about
14
What if I want to learn more about a given topic?
1. Your content slides contain many “Optional” or “Advanced” workshop
exercises, that you can perform using IDz during this class
Please finish all of the Non-Optional workshops and material before diving into
the Optional labs
2. Ask a question during course presentation/demo times
3. eMail your instructor
4. Many of the workshops have links to videos that can be used to learn &
review technical content. Here’s an example:
Module 1 –
IDz Terms, Concepts & Navigation
Module 1 Class Recording – Download or use Preview
DevOps
After you have completed the exercises with the IBM sample code,
try the IDz techniques out on your shop’s program source files
17
Workshop – Launch IDz and select the education workspace
▪ From your desktop or the Windows start menu,
launch IDz
▪ When you are prompted for a Workspace, Browse…
to find the custom education workspace you unzipped
Recall that a workspace is just a Windows folder
Your company may have created a custom Workspace – obtain this filespec
(folder-name) from your internal contact
Your IBM instructor may also tell you what folder to select
18
What you should see after you’ve opened IDz selecting the custom workspace
▪ IDz open in the z/OS Projects perspective
19
Workshop – Open and Close a
File from the IDz Tech Portal
From z/OS Projects view,
Expand:
IDzClass
…
cobol
Double-click CDAT2.cbl
...this opens the file into The Editor
the Editor
Close the file by clicking the red Important Note:
X on the Editor view tab Some of you will be using your own shop’s custom
Workspace – with the folder shown above named:
IDzClass named something else: RDzClass, Etc.
Note that Double-click also That is not important – as the only content you’ll access
opens files on z/OS, is content in: asm, bms, cobol, copy and other folders
Endevor, Git, etc. below IDzClass
20
Workshop – Navigate within Edit using the scroll bars
From:
IDzClass
cobol
Open ATCDEM2.cbl
You can also select the bottom window border. Left-click and hold and drag to make the
window's height larger
This window resizing technique is similar to setting your host emulation product screen size (24X80, 32X80, etc.)
23
Review – Maximize Views
It's very useful to work in Maximized
(full-screen) mode.
Steps:
To maximize a view:
▪ Double-click in the middle of the
view tab
▪ You can also click the
Maximize icon in the top-right
hand corner of the view
▪ Or click Restore
24
Workshop Manipulating Views – Open, Close, Maximize, Restore
▪ From the IDzClass project:
1. Edit MTCHMERG.cbl
2. Double-click the editor view’s tab to maximize the View
3. Scroll up and down a few times in the editor
4. Double-click the editor tab to restore the View
5. Close the editor do not save any source changes
6. Load CPAT400.cbl into the editor
When you have multiple
7. Maximize the editor view programs open in Maximized
mode, you will need to Click the
8. Scroll up and down a few times Restore icon – or double-click
the thin white frame strip at the
9. Restore the editor view top of the Maximized view
Reset Perspective
IDz v14.x
26
Workshop – Open (Show) View
IDz has a lot of functionality – all of it accessed through Views. And even though
you're not going to learn to use every available view, you may need to know how to
open a specific view:
Do the following:
1. Close the Remote Systems view
Ctrl+2
Note that if Ctrl+2 does not split the screen, ensure that your Workspace editor defaults are: LPEX/ispf
If you need assistance doing this, contact your instructor
29
Workshop – Editing multiple programs side-by-side, in full-screen mode
From the mainframe, or within z/OS Projects/within: IDzClass and the cobol directory:
1. Double-click StartApp.cbl – to load it into the editor
2. Double-click PrintApp.cbl – to load it into the editor
3. Double-click the PrintApp.cbl tab –
to maximize the editing view
30
Workshop - Working With More Than One Program at a Time
▪ You should now be editing two different programs in full-screen mode
▪ To Restore the editing view Double-click over the tab again
2. Open WARDRPT.cbl and drag the edit-window (View) outside of the Workbench
3. Maximize IDz
4. Click:
Reset Perspective
32
Workshop – The Outline View
Open PARTSUPP.cbl. Use the Outline view to navigate through and
explore the PROCEDURE DIVISION
33
Workshop - IDz GUI-Editing and Navigation Techniques – 1 of 3
▪ From IDzClass – open TRMTRDZ.cbl
Use the scroll bars to slide up and down, right and left
Maximize the view of TRMTRDz.cbl
Press Ctrl+2 – to open a split-screen view the program
Scroll up and down in either side of the split-screen view
Close the split-screen view
Double-click the tab to Restore the Workbench views
34
Workshop - IDz GUI-Editing and Navigation Techniques – 2 of 3
Let's try some new techniques (still using TRMTRDZ.cbl):
Hover and Outline View
Anywhere in the Procedure Division hover your mouse-pointer
over a variable
Find the Outline View, and using it to navigate, click:
▪ PROCEDURE DIVISION
▪ DATA DIVISION
▪ Expand the DATA DIVISION and click WORKING STORAGE
▪ Expand the PROCEDURE DIVISION and click several paragraphs
▪ From within WORKING STORAGE, expand and click a few variables
▪ Using the Outline view, find the following
– FILE CONTROL
– 1000 ABEND ROUTINE
– FD TRMTERR
▪ In the editor, scroll to the bottom of the file
and click: 1000-DB2-ERROR-RTN
– What happened in the Outline view?
35
Workshop – IDz GUI-Editing and Navigation Techniques – 3 of 3
When finished, close all files – don't save any changes you've made
to the source.
36
Workshop – Open Declaration (F3)
▪ Hover displays the definition of a variable of
paragraph/section.
▪ If you want to navigate to the definition in the
source file, use "Open Declaration“ (F3)
▪ Considerations:
This technique works in COBOL, PL/I and
Assembler
If the declaration is in a copybook, IDz will
open the copybook (providing your SYSLIB
Property Group value is correctly set)
37
Workshop – Back to / Forward to Arrows
You can use Forward to and Back to to return to a previous position in your
source file Back to Forward to
▪ Click Back to on the toolbar icon (Click the arrow two (2) times)
Returns you to your previous position in a source file
▪ Forward to toolbar icon
Re-positions your cursor "forward" to the recently positioned lines
38
Optional Workshop – Review of Editing and Program Navigation Features
Open WARDRPT.cbl
1. From the Outline view, navigate to the 400-NEW-PATIENT paragraph
2. Hover your mouse over the variable named: PATMSTR-KEY
3. Click your mouse in the variable named: PATMSTR-KEY and press F3
4. Click the Back to toolbar icon … what happened?
▪ Steps:
From Window > Preferences
▪ General > Editors
– Change: Size of recently opened files list
▪ Click Apply then Okay
▪ Click a paragraph or
section name in the
graphic, and the
source editor will
synchronize.
▪ This provides
analysis that is Top
Down (Big-Picture
Graphic) – and
Bottom-up from the
source paragraph
statements
41
Workshop: Program Control Flow – Additional Options
Search for paragraphs/sections ➔
▪ Zoom to fit ➔
▪ Search ➔
▪ Save graphic
View to disk ➔
42
Workshop – Drag the Program Control Flow view outside of the Workbench
Dragging the View to
the right of the
Workbench
You can drag the view to the left, right, above or below the current workbench to detach the view
44
Optional Workshop – Manipulating Views
▪ From IDzClass:
Repeat the previous
techniques with NACT01.cbl
45
Optional Workshop – Leveraging Full-Screen (Maximized)
▪ One of the benefits of IDz is utilizing Full-Screen for best is for viewing large and/or
related files at a glance … allowing you to more-easily make connections &
deductions in the application semantics.
▪ Return to the RDz Workbench Module 1 material and find the relevant slides
labelled: “Optimizing your use of Full Screen Editing”.
▪ Read the materials and study the icons along the border that provide access to
restored-mode functionality while in Full-Screen
View & Tooling
Functionality
46
Optional Content – Connect to a Mainframe
If you have previous eclipse/IDz experience and if you have
the time to do both the Required & Optional Workshops,
you may want to connect and try IDz on your LPAR.
Please note that the Required Workshops are key to your product mastery &
productivity. And note that we will be covering mainframe connections and
IDz use on your LPAR starting in Module 4 of this course
Using your company's LPAR
1. If you have a shop-specific “custom workspace” that contains connections to your mainframe:
1. From the File ➔ Switch Workspace menu, select your custom workspace
2. Right-click over your connection and select: Connect
2. If you don’t have a custom workspace use the education workspace:
1. Contact your shop's Systems Programmer staff and get the host-name and Port#s for connecting to your z/OS machine
2. Return in this section to the slides that describe how to create a new connection (Creating a New Remote z/OS Connection)
3. Follow the steps to create a connection and login to your company’s mainframe
Video on connecting to a mainframe - Steps are also provided on the next few slides
Create a mainframe connection video –
47
Preview or Download
Conceptual Overview –To access & edit source that resides in a TSO Library on an LPAR
1.Define a connection to z/OS
2.Login to (Connect) using your TSO ID/Password
3.Navigate thru the connection/discover the tools
4.Setup and edit source programs: (JCL, COBOL, PL/I, REXX, etc.)
• From Properties: Map the source library to the proper language
• From Property Group Manager: Specify SYSLIB Search Path – and
associate the Property Group file to you MVS Files
• Edit a PDS member
IDz Client/Server Architecture
Click: Finish
50
Optional Workshop – Connect and Login to TSO
After you have successfully created a connection to a
z/OS LPAR, a new entry with the name of the
connection appears in the Remote Systems view
To login and connect to an LPAR:
▪ Right-click over your new connection
▪ Select Connect
▪ Enter your TSO ID and Password and click OK
Note that if you expand MVS Files and attempt to expand My
Data Sets a TSO/login dialog will pop-up automatically
▪ If your connection fails you will see an error message
▪ And if it succeeds the various icons in the View will show small
green arrows denoting connections
51
Optional Workshop – Configuring the Connection
Additionally, in order to edit program source files you will need to:
1. Map a COBOL PDS/Library to COBOL**
▪ Right-Click on the PDS, and from Properties
– Mapping
– Specify the language suffix for program file: cbl
Notes:
- File mapping is based on low-level qualifier of your dataset: *.*.COBOL, *.*.PLI, etc.
- If your PDS contains a mix (COBOL, JCL, etc.) Module 4 of the course will cover how to handle
2. Specify the SYSLIB concatenation path for Copybooks & Includes referenced in
your program
From the Property Group Manager View
– Right-click on your Connection and create a New Property Group
– Specify the SYSLIB copybook & include file(s) search path, by entering PDS names separated by
a space
– Save your changes
– From Remote Systems, MVS Files, Property Group, Associate the Property Group
** Note – if you are using IDz v14.1.3 or later the product automatically discovers the
File Type – you don’t need to map program source
Create a mainframe connection video – Download or Preview
52
Optional Workshop – Edit a source member in one of your PDS/Libraries
Once you’ve setup & configured your connection, open one or more COBOL programs from the
library you File Mapped. You may find syntax errors flagged in the code – due (most likely) to
copybook/include datasets missing from your SYSLIB/Property Group entry.
Try out the techniques you’ve just learned on your mainframe-hosted program.
Note the IDz error/annotations and discuss these with your instructor.
53
Review: Host Connection Emulation + IDz Advanced Tools
You can launch IDz’s Host Connection Emulator – while using IDz’s advanced
functionality for: Program Analysis, Debugging, SQL/DB2 Coding, Software
Quality, etc. This can provide an easier on-ramp for your learning, as well as
giving you access to the custom ISPF tooling you need day-to-day.
54
Optional Workshop – Connect to 3270 Emulation
Experiment with:
▪ Show Key Pad
▪ Hide Key Pad
▪ The 3270 keys
When you’re finished
exit out of TSO/ISPF
56
Optional Workshop – Combine Emulation Functionality with ID’s Advanced Tools
▪ Log back into TSO/ISPF through Host Connection Emulator
▪ From IDzClass: Open BKP92S1D.cbl and go to full screen
▪ Right-Click in your source file and from the Context Menu select:
Show In ➔ Program Control Flow
57
Optional Concept – Accessing files that belong to others
Retrieve Data Sets allows you to access z/OS files
in your LPAR similar to the way you use ISPF 3.4
▪ Create a list of file links by Data Set name pattern
DSN Qualifier
Wildcard *
▪ Select the file links into Retrieved Data Sets
▪ Expand Retrieve Data Sets and access a file
3. Press Enter
4. Double-click a DSN from the list
▪ Repeat the above steps to add additional DSN links
• Expand a library
• Double-click to open PDS Member Retrieve Data Set Video
59
Optional Workshop – Navigation with Hyperlinks
▪ The Ctrl key turns anything into a hyperlink – including: internet URLS, and files stored on
a networked drive, and variable/paragraph references in your program code
Workshop
▪ Open BKP92C2.cbl
▪ Hold down the Ctrl key
▪ Left-Click the file:/// link ➔ Ctrl+ file:///c:\IDzwksp85\bnch.png
▪ Optionally drag to create a multi-windowed view of the program and documentation
side-by-side
▪ From inside your program code, hold down the Ctrl key, and Left-Click a variable or
Paragraph name.
W-RETIREMENT-WA
Ctrl+
60
Optional Workshop – F1 on a COBOL Keyword – Language Reference Manual Context Sensitive Help
Open program the IDz Tech Portal
Navigate to a paragraph in the PROCEDURE DIVISION
Set your cursor focus in a COBOL verb and press F1 on the keyboard
Repeat with an Assembler program - and/or a PL/I program
Ctrl+
mailto://
62
Optional Workshop – Customize Workspace File Associations
Depending on what kind of work you’re doing with IDz, you may
need customize your Workspace’s ”File Associations”
File Association preferences
dictate which editor is used
with a given Filetype – by
default - when you double-
click to open a file
Note that you can always
“Open With” any defined
Workspace editor
To access:
Window ➔
Preferences ➔
General ➔
Editors ➔
File Associations
You can:
▪ Set a different Default editor
▪ Add a new File type to your Workspace
▪ Add a new Associated editor
63
Section Review - What have you learned?
▪ Some Workbench terms and concepts – and how they contrast and compare with
ISPF – including:
Workspace, Perspective, View, Menu, Editor
▪ Understood the role of your mouse (both left or "selection" button, and the right or
"context-menu" button in doing IDz development
▪ Launched IDz and closed the Welcome tabs to access the z/OS Projects perspective
▪ Created a new project – populated with example COBOL programs
▪ Opened a program into the "COBOL editor"
▪ Navigated up & down, right & left using Scroll bars
▪ Resized your editor window
▪ Maximized views and Restored them back to normal size
▪ Reset your z/OS Projects perspective to the IDz default
▪ Opened views that might have been closed accidentally
▪ Worked in Split-screen mode
▪ Learned a few other IDz editing techniques, utilizing:
Outline view
Back to/Forward to
Bookmarks – Optional workshops – see course content slides for additional help
Please try out your new IDz techniques on some production source code.
Even if there are (flagged) syntax errors try things like Program Control Flow, maximizing
Views, Split Screen (Ctrl+2), Hover (over a variable) Outline view, Open Declaration
64
®
Module 2 –
Editing COBOL Programs
Module 2 Class Recording – Download or use Preview
DevOps
Status line
- The Esc (Escape) key on your PC positions your cursor in the command line
- Shift + Enter pops your cursor from the code to the Prefix Area
- The Up arrow key on your PC retrieves the previously executed command line command
- ISPF command line commands are NOT case sensitive
67
Workshop – ISPF PF-Keys and Navigation Options: Top, Bottom, ISPF commands
Open TRMTRDZ and do the following:
Press F8 – several times to page down in the source file then press F7 – several times to
page back up in the file
Double-click on the Editor tab – to maximize the size of the Editor window
▪ Press F8 and F7 again
▪ Note that the # of lines scrolled has changed, according to your window size
▪ Press and hold the F8 key down – to zoom downwards in the source file
The Esc
(Escape) key
Locate the following lines in TRMTRDZ.cbl on your PC
positions your
22 cursor in the
333 command line
444
999 – Note that TRMTRDZ.cbl is not 999 lines long
143
1
69
Workshop – Navigation Options
Practice your IDz navigation skills by trying out the various scrolling and
navigation techniques – and make up your own workshop.
Maximize the editor view of TRMTRDZ.cbl and practice the following:
Commands:
▪ Top, Bottom, <Line#>
Hint – Set your mouse cursor focus in the Command line and press the up arrow key
on your keypad to "retrieve" the previous line command
This is exactly like PF12 or the ISPF Retrieve command
Practice the ISPF and IDz paging and scrolling techniques:
▪ F8 / F7
▪ PgDn key / PgUp key
▪ Click inside the Scroll bar on either side of the indicator
Practice centering paragraphs, long statements, records
▪ Drag Scroll bars up and down (left-mouse button)
▪ One line at-a-time up/down scrolling:
– Click the up/down arrows
– Click (set focus) inside your source file
and use your mouse's scroll-wheel
F R'[^\s]' 8 8 prev
– Find the nearest previous non-space character in column 8
Close TRTMNT
Do not save changes
75
Workshop – Prefix Area Commands
Using your ISPF skills, issue some ISPF commands by entering commands in
the Prefix area and pressing Enter after each edit operation
(From IDzClass) open the SANDBOX.cbl program in the editor –
and try out a a variety of ISPF Prefix Area commands:
Repeat lines
Block repeat lines, Block delete lines
X (exclude) some lines
Copy a line before and after
Block copy lines
Delete a single and block delete multiple lines
Move a single and block move multiple lines
Block shift lines
Exclude lines and block exclude some # of lines
Insert some lines
Optional:
▪ Upper case multiple lines at once: UCn – in the Prefix Area
▪ After an X (exclude) try the “FLIP” Command Line command
77
Optional Workshop – Change editor background colors – 2 of 2
▪ Second – from LPEX Editor ➔ Parsers ➔ Parser Styles
Select Document parser: cobolZosSQLCICS
▪ Select a style
▪ Change the Style(s)
▪ Repeat
78
Cheat Sheet: Hot-Key combinations for ISPF developers – Part 1
IDz Hot Keys Description ISPF Equivalent
Ctrl+Home Top of file Max PF7
Ctrl+End Bottom of file Max PF8
Ctrl+2 Open same program in split-screen view PF2 - then open the source member
Ctrl+0 / Ctrl+F4 Close edit session PF3 (or CAN on the command line)
Ctrl+S Save edit session Save
Ctrl+P Print current file N/A
Ctrl+T Make current line top line in the editor PF7/PF8 with CSR as your paging option
PgUp Page up one physical page of source at a time PF7
PgDn Page down one page of source at a time PF8
PF7/PF8 Page up/down one page of source at a time PF7/PF8
Up/Down – Scroll one character at a time through your source: Up/Down/Right/Left Arrows
Right/Left Arrows Up/Down – Right/Left
Ctrl+PgDn Page Right PF11
Ctrl+PgUp Page Left PF10
Ctrl+L Open Line Number feature N/A
Ctrl+G Filters out all COBOL code except the four divisions Prefix area exclude
Ctrl+W Show all filtered lines RES
Shift+F10 Show the Context (popup) menu N/A
Ctrl+Shift+L Show the list of all Hot-Key Combinations N/A
Ctrl+J Returns to the previous (most recent) edit in your source file N/A
Escape Cursor jumps to the command line N/A
79
Cheat Sheet: Hot-Key combinations for ISPF developers – Part 2
IDz Hot Keys Description ISPF Equivalent
Ctrl+F Opens Find/Replace Dialog Find/Change ISPF Commands
Ctrl+Z Undo last change UNDO (if Recovery On)
Ctrl+Y Redo last change N/A
Shift+Down Arrow Select text from the cursor position downward in the source file Prefix Area Command: CC … CC PF7
Shift+Up Arrow Select text from the current cursor position upward in the source file Prefix Area Command: CC … CC PF7
Ctrl+Shift+Right Arrow Select word N/A
Shift+End Select text from cursor position to end of line N/A
Shift+Home Select text from cursor position to beginning of line N/A
Shift+Enter Moves the cursor up and down inside the ISPF Prefix Area N/A
Ctrl+A Select all text in the source file Prefix Area Command: C99999
Alt+U Unselect selected text N/A
Ctrl+C Copy currently selected source lines Prefix Area Command: C or CC
Ctrl+X Cut currently selected source lines Prefix Area Command: M or MM
Ctrl+V Paste currently copied source lines Prefix Area Command: A or B
Ctrl+J Find previous edit change N/A
Ctrl+Right Arrow Locates cursor at the beginning of the next COBOL word N/A
Ctrl+Backspace Delete Current line Prefix Area Command: D
Ctrl+D Repeat Current line Prefix Area Command: R
Ctrl+/ or Ctrl+\ Comment or Uncomment current line N/A
Ctrl+Enter Insert new line Prefix Area Command: TS or I
Ctrl+Delete Delete (Truncate) to end of line Erase (EOF) key
F5 and F6 Find and Repeat Find, Change and Repeat Change PF5 / PF6
80
Workshop – ISPF editing using Hot-Key combinations
Load TRMTRDZ.cbl into the editor. Press Ctrl + Shift + L - and scroll
through the hot key list.
Take 5 minutes or so, and from the previous two slides, try out some of the
hot-key combinations that you feel you are likely to use
Some of the more ISPF-centric hot keys include:
▪ Make several source changes – Press Ctrl+Z - several times
▪ Move your cursor to the middle of the screen – Press Ctrl+T
▪ Press Ctrl+2
▪ Press Ctrl+S
▪ Move your cursor to the middle of any line and press Ctrl+Del
▪ Move your cursor between two keywords and press Ctrl+Enter
▪ Try:
Shift+Enter – several times
Make a change in a program. Navigate away and press: Ctrl+J
Press the Escape key … what happens?
In any line, press Ctrl+D
Time Permitting – Return to the previous two slides, and check out any
of the IDz editing hot keys that look interesting
81
Optional Workshop – ISPF Command Line Commands – Picture String Editing
Workshop steps:
▪ Open the program: NACT01.cbl
▪ Try out one or more of the above Picture String editing commands: C P'$' '9' 12 72 all
▪ After each command:
Click your mouse into the source
Press Ctrl+z - enough times to
undo your changes
83
Optional Workshop – Making LPEX/ispf the default editor
To set the LPEX editor as the default for COBOL, JCL and PL/I source files:
From: Window ➔ Preferences ➔ LPEX ➔ z Systems LPEX Editor
Click the hyper-link in the middle of the dialog on the right
85
Optional Workshop – Switching Editor Defaults from LPEX to the JCL Editor
To set the dedicated JCL
editor as the default for
Double-Click file open:
From: Window ➔
Preferences ➔
General ➔ Editors ➔
File Associations
Scroll to *.jcl
Steps:
Open FORMATER.cbl with the COBOL Editor
Using the Outline view, locate the paragraph: 400-NUMERIC-RANGE-EDITS
Stare at this paragraph for a second. Aren't you glad you don't have to modify it?
Using your mouse, select all of the code in the paragraph
Right-click and select:
▪ Source > Format
Note the following:
▪ The indentation follows the
logical structure of the
code:
- MOVE "Y"… is unconditional
- IF nesting is visually correct
- Etc.
88
Optional Topic and Workshop – COBOL Editor Block (Rectangle) Edit
For Block (Rectangle) editing, use the COBOL Editor:
Workshop:
▪ Open the COBOL Editor
Right-click on the file and select: Open With > COBOL Editor
If you’re using IDz v9 you can use the Context Menu during an LPEX edit
session to Open With the COBOL Editor (and vice versa)
▪ From the toolbar, click the icon that toggle block selection mode
89
Optional Topic and Workshop – Local History
Every time you save changes to a file, IDz creates a local version
of the file in “Local History”
Which allows you to:
Compare files to saved versions
Replace files with saved versions
Workshop:
▪ Edit a program and make a few
source changes
▪ Save the program
▪ Repeat
▪ Select the program and from the
Context menu
Compare with Local History...
Replace with Local History...
90
Optional Topic and Workshop – Comparing Local History Versions
You can even compare two historical versions of the same file
Workshop – using the same program you’ve made changes to:
▪ From the Context
Menu select Compare
with Local History...
Select two history
versions
Right-click and select
Compare with Each
Other
91
Optional Workshop – Custom User Key Actions
Setup the Enter key to open a newline below the current line in the ISPF editor
From Windows > Preferences >
LPEX Editor > User Key Actions
3. Click Set
4. Click OK
Workshop
▪ Open BNCHS601.cbl
▪ Change some COBOL code
▪ Delete a few lines Deleted lines – viewed by mousing over the
rectangle
▪ Mouse over the gray annotations
area to see the original lines –
before you changed them
▪ Mouse over the underscore that Changed line
marks the deleted lines Annotations
▪ Save your changes Area
▪ From the Context Menu select:
Replace with Local History
93
Workshop - Source Code that This example is a screen-capture.
The Workshop is below...
Contains Hex Values – LPEX Editor
To view or source lines that contain
embedded Hex characters – or
to enter binary values in your
source files:
- Select the source line
- Right-click and select:
▪ Source > Hex edit line
You will see the EBCDIC Hex (Cp037) line only if you open a file from Remote Systems
Workshop:
From IDzClass > cobol Open SAM1.cbl
▪ Find the COPY CUSTCOPY REPLACING… statement and view that line in Hex
▪ What is the EBCDIC/Hexadecimal value of a colon ?
– Note that this will be an ASCII hex value. When you use IDz to access files from your
mainframe you’ll see EBCDIC hex values.
94
Optional Workshop – Hex editing using the COBOL Editor
The COBOL Editor has superior Hex Editing functionality
To view or source lines that contain embedded Hex characters – or to enter
binary values in your source files using the COBOL Editor:
From the Workbench toolbar
▪ Click Toggle Hex Editing
You will see a Hex Edit line on the bottom of your file
Current line ➔
Workshop:
From IDzClass > cobol open SAM1.cbl using the COBOL Editor
▪ Find the COPY CUSTCOPY REPLACING… statement and view that line in Hex
▪ What is the EBCDIC/Hexadecimal value of a colon ?
– Note that this will be an ASCII hex value. When you use IDz to access files from your
mainframe you’ll see EBCDIC hex values.
95
Workshop: Real-Time Syntax Validation
▪ Steps:
1. With StartApp.cbl open in the editor
2. Scroll to line 53
3. Change: until to unti
4. Move the cursor to see the yellow syntax
validation triangle
5. Move your cursor directly over the
validation triangle to view the validation
message text
6. Then correct unti back to: until
7. Note that the validation triangle
disappears
Open GAM0VMI.cbl and find out if Syntax Validation works for –
• Misspell variable name references inside the Procedure Division
• Misspell paragraph names in PERFORM statements
• Misspell CICS statements – including the CICS “INTO” variable
Open BNCHS602.cbl and misspell:
• SQL Reserved Words
• SQLCA (the copybook member name)
96
Workshop – Content Assist – 1 of 2
Change the 300-WRAP-UP paragraph in
TEST1.cbl using Content Assist – and
move the file close statement into a new
performed paragraph. 3.
1. Add a new 290-File-Close COBOL paragraph name
above the 300-WRAP-UP paragraph
2. Enter a new blank line below the paragraph name
3. Type: cl and press Ctrl+Spacebar
▪ Select CLOSE
4. Use content assist to select both file names 4.
(one at a time - see graphic for actual names →)
97
Workshop – Content Assist – 2 of 2
Open TESTDATA.cbl
▪ Are there any existing syntax errors? If so, what are they?
98
Optional Workshop – Uppercase all
▪ Open one of the COBOL
programs in the IDzClass
folder
▪ Change upper-case to lower
or mixed case for several:
Keywords
Paragraph names
Variable definitions
References to the variables
in the PROCEDURE
DIVISION
Value Clauses for a Data
Division variable
Literal
Comments
Open TRTMNT.cbl
1. From the Context Menu select: Show Expanded Source
What happened?
What’s the value of “expanded source”?
2. Drag your mouse and select some source lines in a paragraph, and from the Context
Menu select Source ➔ Comment ... then select the same lines and Uncomment them
** Important note: Starting at IDz v14.1 Show Expanded Source supports EXEC SQL INCLUDE
statements. If you’re using IDz or IDz v14.0 use: Filter View ➔ Embedded SQL
to see EXEC SQL Includes
100
Optional Workshop – Combined Workbench Editing Techniques
Open TEST1.cbl
1. From the Outline View – do the following:
▪ Click on several of the COBOL Divisions
▪ Click on: FD STUDENT-FILE
▪ Expand: PROCEDURE DIVISION
▪ Click on: 200-PROCESS-RECORDS
▪ Click on and Expand the WORKING-STORAGE SECTION
▪ Click on several lines in TEST1 - within the editor and
note the effect on the Outline View
2. Experiment with several of the ISPF editing options:
• PF7/PF8
• Prefix area commands
• Find / Change (command line) commands
3. Experiment with mouse hover
• Hover over STUDENT-FILE, CTR-STUDENTS, END-OF-DATA
• Press Ctrl+F - to find these variables
4. Experiment with validations (by editing in some COBOL syntax errors)
Press Ctrl+Z - to undo the errors Perform Hierarchy
7. Practice with any other techniques you've learned so far – especially: Content Assist
101
Workshop: Editing JCL – 1 of 2
▪ From IDzClass > jcl
Open BNCHMRK.jcl
▪ Note:
Source coloring
Outline view
103
Review: The Eclipse/Java JCL Editor
▪ The Java/Eclipse editor provides superior JCL
syntax checking – and syntax hints – as well as:
Collapsible Job Steps (EXEC statements)
The ability to Validate JCL using either:
▪ TYPRUN=SCAN
▪ DSN/DISP= validation
Syntax errors, resolved with Quick Fix
Toolbar editing options
▪ Hover over the syntax error and solve it using Quick Fix
107
Optional JCL Workshops – 2 of 2
▪ Edit a JCL file from z/OS (any one of the files
you copied up the mainframe earlier in this course)
108
Optional Workshops – Validating FDs & DDs
▪ Open BNCHMRK.jcl
▪ Open the program: TRTMNT.cbl
▪ Drag one of the views so that they are side-by-side (see screen capture)
▪ Select the JCL, and from the Outline view navigate to the TRTMNT job step.
▪ Filter the JCL – show only ✓ EXEC statements
▪ Filter TRTMNT.cbl – Edit the program in Outline mode. Then expand FILE-CONTROL (see screen capture)
▪ View the COBOL program's ASSIGN statements. Match them up against the JCL //DD statements in the TRTMNT step
Note that the you may have to experiment with these techniques to make the best use of the combined tools
Note also that the Outline view displays the proper contents depending on which file is selected
109
Optional Workshop – Auto Commenting Changed Lines in COBOL – 1 of 4
▪ Edit any COBOL program
Autocomment
110
Changed Lines Video
Optional Workshop – Auto Commenting Changed Lines in COBOL – 2 of 4
▪ From Window > Preferences > Auto Comment:
From Auto Comment Language Profiles – you can see the various languages there
From Extension Associations click Add – you can see the current workstation file extensions associated with the Auto
Comment Language Profile
112
Optional Workshop – Auto Commenting Changed Lines in COBOL – 4 of 4
▪ Open a COBOL program
▪ Right-click and from the Context Menu select:
Start Flagging Changed Lines
Enter your auto comments in Base Flag:
JS060112
Click OK
▪ In the editor:
Change some lines
Insert a new line
113
Optional Workshop – Save Perspective
to Persist your Workbench Views
▪ Sometimes you have to close your IDz
session, but want the Views arranged
exactly as you’ve got them– before you exit
114
Optional Workshop–Uppercase COBOL & JCL Source Code Upon Save
Both the Java/COBOL & LPEX editor can do this upon file Save
To make this a Workspace preference:
From Window - Preferences ➔
LPEX Editor ➔
z Systems LPEX Editor ➔
Check the Save options
116
Optional Workshop – Comment/Un-Comment a Block of Source
▪ Sometimes you have multiple contiguous statements to comment out
▪ Use Source ➔ Comment to comment out a contiguous range of source lines
Use Source ➔ Uncomment to remove comments from selected lines
Comment/Uncomment Code Video
Download or Preview
117
Optional Workshop – Block Copy Code Using LPEX
▪ Position your cursor at Byte 1/upper left-hand corner of the block
▪ Right-Click and from
Select ...
Click: Select Rectangle
Snippets are the preferred method of doing this. You access them
through a Snippets view, which you get to by:
From Window > Show View > other…
Type: snippets – and select the Snippets view
3. Double-Click the
Snippet
5. Click Insert
121
Optional Workshop - Snippets for ISPF "CREATE" command line command – 1 of 2
Steps:
1. Create a new Snippet category
Right-click over the Snippets view
Select Customize
From Customize Palette, under New
Select: New Category
Name the Category
Add a description and Click OK
2. Select and copy the code you wish to turn into a Snippet
3. Expand the category you wish to add the Snippet to, and select Paste as Snippet…
123
Optional Workshop:
Create and Use a Code Snippet
▪ From your PDS open a piece of JCL that contains a
valid Job Card
▪ Select and Cut (Ctrl+X) the Job card
▪ Follow the previous steps to add the Job card snippet to your JCL category
▪ During the process of creating the Snippet add JobName and MsgClass as variables – to be filled in by
the developer during the reuse of the Snippet
124
Optional Workshop: Use Code Snippets as a Scratch Pad Area for Multiple Paste Buffers
Occasionally you may need to create multiple “copy/paste buffers” – if you need
to say, replicate a set of changes across multiple programs.
This can be accomplished using Snippets:
1. Open a program
2. Copy and create a Snippet from a code fragment
• Optionally customize the Snippet to include Variables – for generalized use
3. Create another Snippet
4. Repeat from step 1 until you’ve
created separate Snippets for each
code fragment
5. Apply the Snippets to your program(s)
6. Optionally Export the Snippets to
other developers on your team
You export to a standard Windows
drive:\directory infrastructure
125
Review: IDz's Language Content Assist Code Templates
▪ Finally - you can customize
IDz's template "proposals"
offered in the Content Assist
▪ You access this from:
Window
▪ Preferences
– COBOL
– Templates
▪ Customization options
include:
Modify (Edit…) an existing
template
Add a (New…) template
Remove a template
Export all templates – so that
other team members can
share
Import…
Restore Removed (un-delete)
Revert to Default (un-modify) You can customize a template's:
- Content - Pattern - Context - where it's
applicable - Description – hover help
126
Optional Workshop – Customizing Template Proposals
▪ From Window, Preferences,
COBOL, Templates:
Select one of the Template
proposals and delete (Remove…)
it
Select a Template proposal and
Edit… (change it) – something
simple like changing the case to
mixed-case, instead of all UPPER
case
Add a New… proposal, as shown
here ➔
You can copy and paste the this text.
If <condition one>
Then
If <condition two>
<imperative statements on true path>
Else
<imperative statements on inner false path>
Else
<imperative statements on outer false path>.
127
Optional Workshop – Create New Programs Using Templates
▪ There are several ways to create new programs from scratch
▪ The "Best Practice" method is to use IDz's COBOL program templates
128
Optional Workshop – Create New
Programs From Templates – continued
You can add CICS or DB2 template
sample code to your new program:
MVS SubProjects
and z/OS Projects
are covered in
another module of
this course
130
Optional Topic: Customize the New Program Templates – Comments
You can create
a custom
Code
Template for
COBOL
comments or
the base
program code
itself.
To add or
customize
comments:
▪ Click the
comment option
you wish to
modify
▪ Code an
asterisk in
position 7 (you'll
have to space
over 1-6)
When a new
program is created
using the
templates all of the
custom comments
and code are
inserted.
132
®
Module 3 –
Analyzing COBOL Programs
Program Analysis Topic Video
Source Analysis Videos: ISPF Command Line Search Video
DevOps
When you are finished, close your editor session and do not save changes
137
Workshop – Using Regular Expressions
▪ Open WARDRPT.cbl
▪ Press Ctrl+F
To open the Find/Replace dialog
▪ Find MOVE statements that reference WS-LINES using the following Logical And Regular
expression: move.*ws-lines
▪ Click: All
▪ Press Ctrl+W
Note that, the Logical AND finds lines with both search strings - on the
same line, and in the order they are specified
To find two strings in either order use: (xxx.*yyy)|(yyy.*xxx)
138
Optional Workshop – Using Regular Expressions
A few more examples:
▪ Find all non-display (binary or hex) values in a program: [^\x20-\x7E]
Note that there are no hex-values in WARDRPT. But – if you are using a mainframe for these labs - you can edit in Hex
(see prior topic) then searching for the hex values using this regular expression
▪ (Logical AND search) Find all lines with compute+ size-supp in the program PARTSUPP.cbl
(compute.*size-supp)
Increase Peek to 1, Click All again
▪ (Combined AND/OR search in PARTSUPP.cbl) Find all lines with compute+ size-supp in the program
PARM-LENGTH|(compute.*size-supp)
139
Optional Workshop – Discovering Regular Expressions
Expression
▪ Load test1.cbl into the editor
▪ Press Ctrl+F
▪ Check the Regular expression checkbox ➔
▪ From the Find dialog, enter (type) the following Regular expressions one at a time
Click All after each:
Expression What it does
[0-9] All numeric characters
[a-z] All alphabetic characters
[a-z] Check: Case sensitive in the dialog, and reissue this regular expression.
Then un-check Case sensitive before continuing
DL.C Find all variables with "DL" – any character – then the letter C
[^\s] Find all characters except for white space (blanks: \s )
[^a-z] Non-alphabetic characters
[^A-Z\x20] Non-alphabetic characters and no white spaces
[^A-Z0-9\x20] Non-alphanumeric characters and no white spaces
[^A-Z0-9\x20-] Non-alphanumeric characters, no white spaces, no dashes
[^A-Z0-9\x20\(\)..-] Non-alphanumeric characters, no parenthesis and no white spaces
[^*A-Z0-9\x20\(\)..-] Non-alphanumeric characters, no parenthesis, no asterisks, no white spaces
.*(data) Find all variables that end in "data"
PIC .9|PIC 9\( Find all numeric variable declarations
140
Optional Topic – Regular Expressions to search for "any hex chars in a file"
You can use Regular Expressions to find any EBCDIC (hex) data in source files:
Regular Expression
Type this in the find area: [\x00-\x1F]
142
Optional Workshop – Learning Regular Expressions
Regular Expression references and tutorials:
http://www.regular-expressions.info/reference.html
http://en.wikipedia.org/wiki/Regular_expression
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
Steps:
Open With – the COBOL Editor ➔
Ctrl+F
In the Find box type \x then your EBCDIC hex character
144
Workshop – Filter Views for Code Understanding and Navigation – 1 of 2
Context Menu filtering
From your mainframe PDS or the cobol
folder in IDzClass open: CADDDB2.cbl
Try each of the Context Menu Filters out
Try expanding the filtered source lines by clicking
the plus signs in the Editor's left-hand border
145
Workshop – Filter Views for Code Understanding and Navigation – 2 of 2
Open ADSORT.cbl and/or TRTMNT.cbl and check out the Filter
options for copybooks and called programs
146
Optional Review - Find/Replace Use Cases
IDz Editing Tool Considerations
Find/Change one time (one-off Use ISPF F 'xxx' – same as ISPF Most of the ISPF Find operands work
command)
Complex search (Logical OR/AND find) Use Ctrl+F and "Regular expressions" Regular expressions are discussed in the
for application and program analysis Optional Topics of this section of the course
Combine the results of multiple Use Ctrl+F find – and then Find within (against) the editor results
searches (AND the search results)
without using Regular expressions
Peek at (view) n lines above and below Use Ctrl+F and set Peek to > 0 in the Peek tool
the Found text
Search for binary (hex) data (EBCDIC Find (Ctrl+F ) using the COBOL editor The COBOL editor is discussed in
format) Appendix B of this module. Hex find for
EBCDIC binary data is available in v8.5
Search through Excluded/Not-excluded Use the Prefix area to exclude lines. From the command line, enter:
source lines F 'xxx' X … or… F 'xxx' NX
Highlight all found occurrences of a Preferences > LPEX Editor > System z LPEX Editor > Find Not that this disables "incremental find".
search Text Incremental find behaves like Google's
search
Persist Find results in a view Select a variable or partial text, and use Search > Text > File Can "Pin the Search View" to allow for
multiple persistent search results
147
Optional Review – Source Code Editing, Find/Replace Use Cases
IDz Editing Tool Considerations
Make ISPF the default editor From Preferences > LPEX Editor - select ISPF This preference is tied to your workspace
Use ISPF command line commands Same as ISPF – for the supported commands The commands are case-sensitive
Find out what ISPF command line From the command line, press Ctrl+Spacebar
commands are supported?
Use ISPF Prefix area commands Same as ISPF – for the supported commands
Change editor background color > black From Preferences > LPEX Editor > Appearance > Palette Other source elements can be colorized
Use COBOL numbering Same as ISPF: Num COBOL, Num On, Num Off, etc.
Show the list of all available hot keys From inside the editor, Press: Ctrl+Shift+L The list is context sensitive
Customize your hot keys From Window > Preferences > General > Keys – specify the Hot-key combinations that are currently in
Binding (hot-keys) and When (the IDz context) under which to use by Eclipse will take precedence over
invoke the hot-key custom settings
Delete to end of line (EOF) functionality From with the editor press: Ctrl+Del
Find one time (one-off find command) Use ISPF F 'xxx' – same as ISPF Most of the ISPF Find operands work
Complex search (Logical OR/AND find) Use Ctrl+F and "Regular expressions" Regular expressions are discussed in the
Optional Topics of this section of the course
Combine the results of AND'd searching Use Ctrl+F find – and then Find within (against) the editor results
Peek at (view) n lines above and below Use Ctrl+F and set Peek to > 0 in the Peek tool
the Found text
Search for binary (hex) data Find (Ctrl+F ) using the COBOL editor The COBOL editor is discussed in Appendix
B of this module
Search through Excluded/Not-excluded Use the Prefix area to exclude lines. From the command line, enter:
source lines F 'xxx' X … or… F 'xxx' NX
Highlight all found occurrences of a Preferences > LPEX Editor > System z LPEX Editor > Find Not that this disables "incremental find".
search Text Incremental find behaves like Google's
search
Persist Find results in a view Select a variable or partial text, and use Search > Text > File Can "Pin the Search View" to allow for
multiple persistent search results
148
UNIT IDz for ISPF Developers
Topics:
▪ Paragraph (control flow) Analysis,
▪ Data Flow Analysis
▪ Source Formatting
▪ Software Analyzer/Code Review
153
Optional Workshop – Perform Hierarchy & Fall Thru
Part 1.
Open FORMATER.cbl from your IDzClass project
Using the Outline view locate the Procedure Division
Hover your mouse over the 100-MAINLINE paragraph
Right-click and select: Open Perform Hierarchy
Expand the first few paragraphs
Note the following: IF statement flags, CALL statement, Iteration icons
Part 2.
In the 100-MAINLINE paragraph, find and un-comment the
GO TO 300-FIELD-EDITS. statement
Save the file (press Ctrl+S)
Create another Perform Hierarchy (see steps above) on the 100-MAINLINE paragraph
Expand the second reference to 300-FIELD-EDITS (the GO TO statement)
Note that the uncommented GO TO breaks the logic out of the "perform chain"
– and execution falls out of the bottom of the program
These sorts of errors can be very difficult to see in large complex code
▪ PERFORM 1000-RETURN-SORT THRU 10000-EXIT.
154
Review: Data Flow Analysis – Tracking variable & data flow in a program
▪ Data Flow research is a complex analysis process that involves iterative
searching and building of mental "dependency maps" for variables that are
modified or referenced through statements within one or more programs
▪ On the mainframe, you either:
Utilize listing files/XREF entries – or –
Using ISPF, you access option 3.4, or =3.14 and issue a series of manual text FIND
operations – saving or writing down interim results.
▪ This is:
Typing-intensive
Error-prone
With lots of time spent loading programs into the editor, splitting and sizing screens, etc.
▪ Using IDz you:
▪ Find your starting Search variable
▪ Pin the Search View and double-click each found-reference
▪ This is:
▪ Not typing-intensive
▪ Less error-prone
▪ With IDz, all Search results are:
▪ Visual – and graphed for you
▪ Hyperlinked – available from a mouse click
155
Workshop – If you are using IDz v14 or later
Open EBUD01.cbl. Select: L-INPUT-DATE and from the Context Menu select:
Show In ➔ Data Flow ... Click different variables ... Move the program source outside
of the workbench ... Mouse-over the lines between the nodes to view the statement
Right-click a different
variable and select
Show Data Flow for
this Node
157
Workshop – Continued from previous slide
Having Data Flowed SELECTIONNUMBER:
▪ Discover what literals are moved to LOCSELECTMAKEFIELD
(Challenge) Discover how CICS/User data makes it into LOCSELECTMAKEFIELD
158
Workshop – Data Flow Analysis/Occurrences in Compilation Unit
Open DFLOWIDz.cbl in the editor
▪ From the command line, type: F WS-PHARM and press <Enter>
1. In the Editor source, Double-click (to select) WS-PHARMACY-CHARGES
2. From the Context Menu,
select Occurrences in Compilation Unit
This will launch a search for WS-PHARMACY-CHARGES
throughout your program, and saves the search results
in a Search view
3. From the Search View, click: Pin the Search View – This persists your results view, even when
you launch additional searches
5. Analyze each COBOL statement. If the operation would alter the value of some other
variable (through a MOVE or COMPUTE statement) return to Step 1 on the previous slide,
and search on the next variable in data flow
▪ Double-click to select another variable – For example: PATIENT-PHRM-PER-DAY-O
▪ From the Context Menu select: Occurrences in Compilation Unit
▪ From the (new) Search results click: Pin the Search View
160
Workshop – Data Flow Analysis – continued
Again analyze each COBOL statement in the pinned Search view.
If the operation would alter the value of some other variable (through a MOVE or COMPUTE statement) return
to Step 1 and search on the next variable in data flow
▪ Double-click to select another variable
▪ From the Context Menu, select: Occurrences in Compilation Unit
▪ From the (new) Search results click: Pin the Search View
▪ Analyze the next variable's usage and continue
If the operations for a COBOL variable do not modify the contents of storage, return to a
previously pinned view, and double-click the next line
Additional pinned
Search Views
for other variables
161
Optional Workshop – Using multiple Data Flow tools
From the ims phonebook application open: DFSIVA64
▪ Discover what variable & literal values are moved to: TEMP-TWO
▪ Discover what variable data ends up in OUTLINE5
▪ After selecting the variable in the program (the source pops up) – from within the
DFSIVA64’s Context Menu select: Occurrences in Compilation Unit – and click
a hypertext-link
▪ Both of these tools can be used together, to solve program semantic riddles
162
Optional Workshop – Occurrences in Compilation Unit on a large program
From IDzClass – open PARTSUPP.cbl
1. From the Outline view navigate to 300-LOOKUP-SECTION and from within
301-MATCH-WREHOUSE:
• Hover over: COLR-DIV-CLI-3 (note the variable declaration)
• Left-click your mouse in: COLR-DIV-CLI-3.
• Right-click and select: Open Declaration (note the ease of navigation)
• Right-click again, and select: Occurrences in Compilation Unit
2. From the Search view that is opened. Click several of the results-lines
that hyper-link to the original source file line
163
Optional Workshop – Occurrences in Compilation Unit (continued)
6. Right-click and select: Occurrences in Compilation Unit
• Note that there are many, many references to this variable throughout the source.
In fact, it would be nice to provide this View with room, wouldn't it?
7. Left-click on the View tab. Hold and drag the view to the top right-hand
corner of the workbench and drop the tab (let go of the left-mouse button)
• This will provide the Search view with more vertical space
165
Workshop – Identify Unreachable Code (“Dead Code”)
▪ Open SAMOS1.cbl – and from the Context Menu, select:
Source ➔ Identify Unreachable Code
▪ Use markers in the right-hand editor border to navigate to the ➔
unreachable code lines
Optional: Spend a minute or two understanding why IDz chose to flag the statements as never
having a control flow path to them – from the beginning of the PROCEDURE DIVISION. Note that
for the un-Performed Paragraphs you can validate using the Program Control Flow
Finding Called/Calling errors can be difficult. For more on this useful function:
Click this link for the write-up in the Knowledge Center
168
Optional Workshop – Data Flow analysis walk-thru using Ctrl+F (Find)
▪ An alternative to the multiple-windows approach for certain search use
cases is to use Ctrl+F searching, iteratively building up an "OR" condition
▪ Try this:
Open BNCHS602
Press Ctrl+F and check: Regular expression
Search for WS-PHARMACY-CHARGES, using All
Find will show that WS-PHARMACY-CHARGES is compared to
IN-PHARMACY-CHARGES.
Type a separator pipe: | ➔ WS-PHARMACY-CHARGES|
Type IN-PHARMACY-CHARGES after the separator pipe and press All
You will grow the list of returned rows and continue to iterate over newly-found
variables
At any time you may:
▪ Stop and edit the code
– Return to search (press Ctrl+F) – your search expression persists
▪ Select, copy and paste the results into a spreadsheet – for a more permanent analysis
documentation
▪ See next slide for a snapshot of how this approach differs from the previous
169
Optional Workshop – Data Flow Analysis using Search/Text/File - 1 of 3
Open DFLOWIDz.cbl in the editor
▪ From the command line, type: F WS-PHARM and press <Enter>
1. In the Editor source, Double-click (to select) WS-PHARMACY-CHARGES
2. From the Search menu,
select, Text >
File
3. From the Search View, click: Pin the Search View – This keeps the view intact, when you
launch additional searches
5. Analyze each COBOL statement. If the operation would alter the value of some other variable
(through a MOVE or COMPUTE statement) return to Step 1 on the previous slide, and search on the next
variable in data flow
▪ Double-click to select another variable - in this example, double-click: PATIENT-PHRM-PER-DAY-O
▪ Pull down the Search Menu, and select, Text > File
▪ From the (new) Search results click: Pin the Search View
171
Optional Workshop – Data Flow Analysis using Search/Text/File - 3 of 3
Again analyze each COBOL statement in the pinned Search view.
If the operation would alter the value of some other variable (through a MOVE or COMPUTE statement) return
to Step 1 and search on the next variable in data flow
▪ Double-click to select another variable
▪ From the Search Menu select, Text > File
▪ From the (new) Search results click: Pin the Search View
▪ Analyze the next variable's usage and continue
If the operations for a COBOL variable do not modify the contents of storage, return to a
previously pinned view, and double-click the next line
Additional pinned
Search Views
for other variables
172
Review - Software Analyzer (Code Review)
▪ Software Analyzer provides "electronic desk-checking" - a means for you
to enforce shop coding standards and best practices
▪ Available for COBOL programs opened from:
Remote Systems Explorer
Local Workstation Projects – including a PDS downloaded to a local project
z/OS Projects/MVS Subprojects
▪ Easy to use and easy to setup:
Create custom rule sets configuration based on in-the-box COBOL rules
More requirements (from customers) are encouraged/gladly accepted
▪ Customizable:
In-the-box rules customizable through Preferences/Configurations for rules
▪ Considerations:
Code Review runs locally (on your PC – not on z/OS)
You can drag & drop an entire COBOL PDS to your Local Workstation – to run Code
Review against all of the members in the PDS at one time
Its functionality expands on existing Java code review
Check for COBOL standards deviations in the editor
Can run reports on standards compliance and trends
Software Analyzer / Code Review Video
173
Review - Software Analyzer – Interactive use
▪ Single program
results
▪ Each of the
collapsed rule
indicator allows you
to hyper-link to the
statement in the
source program
➔
174
Workshop –
Run Code Review Rules
▪ Open BNCHS602.cbl in
the editor
▪ Right-click and select:
Software Analyzer >
Coding Standards for Unit Test
175
Optional Workshop: Code Review – Create a Ruleset – 1 of 2
▪ Open WARDRPT.cbl in the editor
▪ Right-click and select:
Software Analyzer >
Software Analyzer Configurations…
176
Optional Workshop Code Review – Create a Ruleset – 2 of 2
▪ Select Software Analyzer and Click: the
New launch configuration icon
▪ Name your Ruleset ➔
▪ Select the Rules tab
Notes
▪ You can return to Software Configuration, and
modify your rule selection at any time.
▪ If you are using IDz v8.5 you will see different
COBOL Code Review rules than this screen
capture ➔
177
Optional Workshop – Review the Code Note that you could drag a
in the IDzClass/cobol Folder mainframe PDS to a Local
Workstation project – and
perform code review against all
From z/OS Projects: of the PDS members in the
library in a single operation
▪ Right-click over the cobol folder and
select:
Software Analyzer ➔ COBOL RULES
▪ Or whatever you named your custom Ruleset
▪ You might want to run this in the background
▪ Note that Code Review may find syntax errors in the programs
178
Optional Workshop: Software Analyzer – Review the Code in WARDRPT.cbl
▪ Right-click and select:
Software Analyzer >
Software Analyzer Configurations…
COBOL RULES
▪ Or whatever you named
your Ruleset
179
Optional Workshop – Software Analyzer (Custom Rules and Categories) – 1 of 4
• Click Finish
181
Optional Workshop – Software Analyzer (Custom Rules and Categories) – 3 of 4
To include your custom
Rules/Categories edit a program,
and from the Context Menu select
Software Analyzer Configurations…
182
Optional Workshop – Software Analyzer (Custom Rules and Categories) – 4 of 4
A few of the other
Custom Rules definitions
183
Optional Topic – Persist Find Results
▪ Using the Search menu, you can
search on a variable (or any partial
selected text) in a program with:
Search
Text > File
▪ The results persist and are hyperlinked – for
easy navigation, and can be:
Copied/pasted to a requirements document
Changed
Replace Selected…
Replace All…
Searched Again
to provide the
capability of
AND-ing
multiple search
patterns
184
®
Module 4 –
Remote Systems: Connect, Navigate & Search
DevOps
Steps:
1. Define a connection to a z/OS LPAR
2. Configure that connection with a Property Group – to specify SYSLIB
3. From there you can:
• Browse, Edit, View source files:
• If setup has been done, you can access your host-SCM tool: Endevor, Changeman, SCLM,
RTC EE, etc.
• Browse, Edit & Access data files
• Allocate Datasets
• Submit & manage batch Jobs
• Run MVS Utilities
• Access 3270-tools thru Host Connection Emulator
• Access and run CLISTs & REXX Execs
• Debug programs
• Access DB2 tables/views and execute SQL statements
• Copy files:
• From within an LPAR – or library
• From one LPAR to another
• From your PC to a mainframe LPAR
• From a mainframe to your PC
186
Connecting to a Mainframe
If you are using your company's LPAR:
1. You may have been given a “custom workspace” that
contains connections to your mainframe. If so:
▪ Right-click over your connection, and select: Connect
▪ Check out the files you have access to in the tree control ➔
2. If you don’t have a custom workspace:
▪ Contact your shop's Systems Programmer staff and get the host-name and Port#s
for connecting to your z/OS machine
▪ Find the slides in this PDF titled: Creating a New Remote z/OS Connection
▪ Follow the steps to create a connection and login to your mainframe
3. Follow the instructions on the slide titled: –
Workshop: Allocating PDS (Libraries) for Class:
▪ fAllocate COBOL, COPYLIB, ASM and JCL libraries
▪ Copy the COBOL, COPYLIB, Assembler and JCL source files from the
IDzClass olders to your new libraries
– This is shown on subsequent slides in this doc
If you are using IBM's zserveros - you will have to ensure that:
You have access to this host URL: zserveros.centers.ihost.com
▪ Note that you cannot ping the URL – you’ll have to use IDz to access it
You'll also need to open the following Port on your workstation: 4035
If you are working from a home computer, most likely you'll be able to do access zserveros.
But if you are working from an office machine, you should check with your I/T personnel to ensure that you have access
to the above remote IP address and the Port#s.
Once you can connect, your instructor will give you a valid TSO ID/Password combination for use during this class (it will
be disabled after).
187
Workshop – Create a New z/OS Connection – 1 of 2
Steps from Remote Systems
1. Right-click over z/OS…
2. Select New Connection…
This will begin a wizard for completing the connection
specifications
3. Fill out: New Connection
▪ Parent Profile
Will default to your local machine name
▪ Host name: your.host.ip.address
Enter a ping-able logical name or IP address
for your z/OS host machine
This can be case-sensitive
▪ Connection name:
A descriptive name that will show up in the
Remote Systems View
The Connection name must be unique within
your workspace
▪ Description: Click Next >
Mouse-over (hover) help for this connection
▪ Verify host name
Will ping the host name to verify:
▪ Connectivity
▪ Availability of the z/OS machine
188
Create a Mainframe Connection Video
Workshop – Create a New z/OS Connection – 2 of 2
4. Specify the Daemon Port in Connection Configuration
▪ Specify how you would like IDz to launch the remote server (that listens for incoming activity
requests from IDz on your workstation to access z/OS UNIX files and commands)
▪ In many shops you will use the default:
Daemon Port (1-65535)
▪ But you may have to enter a port# other than 4035 which is the port for IBM’s zserveros
Find this out by contacting your Systems Programming staff
nnnn
Click: Finish
189
Workshop – Connect/Login to a Mainframe
After you have successfully created a connection to a
z/OS LPAR, a new entry with the name of the
connection appears in the Remote Systems view ➔
Connect to z/OS and Login to TSO:
▪ Right-click over your new connection
▪ Select Connect
▪ Enter your TSO ID and Password and click OK
Note that if you expand MVS Files and attempt to expand My
Data Sets a login will occur automatically
▪ If your connection fails you will see an error message
▪ And if it succeeds the various icons in the View will show small
green arrows denoting connections
190
(Review) Remote Systems Explorer
Remote Systems Explorer (often referred to as "RSE"):
Displays your connection(s) to a z/OS LPAR
Provides access to MVS Files, Datasets and JES/Jobs
▪ All files with high-level qualifiers starting with your TSO ID
– You will later learn how to access any file in the LPAR
▪ These files include:
– Partitioned Data Sets (PDS or library files) shown as expandable folders
– Sequential Data Sets - Shown as individual entries in the view
The JES Queue and "your batch jobs"
▪ Access to all batch job output from jobs you "own"
– You will later learn how to access batch job output from the JES queue
Provides access to Z/OS UNIX Files
▪ And allows Search, running Shell Scripts, etc.
In order to use a mainframe for these labs, you will need to:
Allocate Partitioned Data Sets
Copy/Paste or Drag & Drop files from your PC the new PDSs
Important Note: The screen captures and in some cases the workshop text,
directions & designated libraries refer to files on the IBM zserveros LPAR.
When using your company’s mainframe/LPAR, substitute names for your:
<HLQ> TSO-ID, Libraries and Data Sets in the upcoming workshops
191
Workshop – Allocate PDS (Libraries)
Allocate Like... steps:
1. Right-click over a PDS with the same LRECL,
BLKSIZE and DSORG and select: Allocate Like…
2. Enter the new dataset name – and click Finish
Notes on Allocate:
▪ If files named <HLQ>.TEST.xxx
exist; Select and Delete them
using the Remote Systems
Context Menu
▪ If the dataset you want to
Allocate Like… has been
archived:
• Restore it on the mainframe
• Disconnect from IDz Note: <HLQ> = your TSO ID
• Reconnect and try again
▪ I you need to allocate datasets (on your
own mainframe) using System Managed
Storage, click Next > at the prompts until
you see an option button for System
Managed Storage... 192
Workshop – Copy/Paste files from your PC to the mainframe
Allocate Like creates new empty files and libraries.
In which you can drag & drop or copy & paste the
class programs and copybooks from your local
workstation IDzClass folder to the mainframe
IDzClass Folder Workshop:
From the z/OS Projects view
1. Expand the cobol folder under IDzClass
2. Left-click on the top file in the list
3. Hold the Shift key down on your PC
4. Left-click on the bottom file in the list
5. Right-click over the marked list and select: Copy
6. In the Remote Systems view:
- Select (Left-click) your new COBOL PDS
- Right-click and select: Paste
193
Workshop – Allocate and copy additional mainframe libraries and files
Using the steps on the previous two slides:
Allocate Like
▪ Create four new PDS libraries on your mainframe, based • if you run out of DASD
on the dataset properties of <HLQ>.TEST.COBOL: space while copying files –
– <HLQ>.TEST.BMS see the next slide
– <HLQ>.TEST.ASM
– <HLQ>.TEST.JCL
– <HLQ>.TEST.MFS
Copy/Paste (transfer) files from your PC workstation project folder, to
your four new libraries
▪ bms folder to TEST.BMS
▪ asm folder to TEST.ASM
▪ jcl folder to TEST.JCL
▪ mfs folder to TEST.MFS
194
Consideration – Allocate adequate DASD space for the class files
If you receive an E37 (out of space)
error message when you
copy/transfer files, do the
following - using a series of
wizards…
1. From MVS Files > New > Allocate Partitioned Data Set…
4. Specify:
Space Units: TRACKS
Primary Quantity: 30
Secondary Quantity: 20
Directory Blocks: 30
3. Select:
Category: SOURCE
Type: COBOL
195
Workshop – Open your education files from Remote Systems
You can now access the files
referenced in the workshops
throughout the rest of this course
from the mainframe.
▪ Expand a library/PDS
▪ Double-click one your PDS
members
This opens a copy of the
program in IDz for edit
It also locks the file on the
mainframe
▪ Make some changes in the
source file
▪ Close and save your changes
to the file
This uploads a modified copy
of the file to the library
And releases the lock
▪ Right-Click over one of your
files and select: Browse
This opens a read-only copy
of the program in IDz
The program is not locked on
the host – this is like TSO =1
196
Workshop – Configure SYSLIB for Program Copybooks – 1 of 2
In order for IDz to access copybooks and Includes in your programs, you must
specify SYSLIB (library search path). You do this using a “Property Group”
Steps:
▪ From the Property Group Manager view
Select your connection
Right-click and select: New Property Group…
• Change: <HLQ> …to… <USERID> Alternatively, you can hardcode the full DSN for the library
Steps:
▪ From Remote Systems:
Right-click over MVS Files
Select Property Group >
Associate Property Group…
Un-check and Check your
named Property Group
Click OK
199
Workshop – Configure the Property Group JCL Job Card – 2 of 2
Step #2 – Paste the Job Card text into your Property Group
From the JCL tab – Paste your copied Job Card into the JCL job card
area above. Ensure that there are no extra blank lines below the Job Card
statements, and save changes to the Property Group (press Ctrl+S)
200
Workshop – Exploring Remote Systems files
Once you've connected to Remote Systems Explorer and copied
the class files to newly-allocated PDS libraries do the following:
▪ Expand MVS Files – you will see a list of all libraries/datasets that
you "own" … where your TSO ID is the high-level-qualifier in the DSN Context menu
▪ Expand a COBOL or Assembler PDS (source library) on a PDS
▪ Right-click over the PDS name (DSN) and check out the
Context menu options
Context Context
▪ Find and expand JES menu on a menu on a
- Open any jobs you have submitted JCL file Program
201
Workshop – Paging and Locating members in libraries n Remote Systems
From Window > Preferences > Remote Systems > z/OS > MVS Files
Set Default Page Expansion size to 10
Click OK
From Remote Systems:
Open (expand) TEST.COPYLIB
Page up and Page down several times
Right-click over TEST.COPYLIB and select:
▪ Locate…
Type: DFH and press Enter (what happens?)
Return to Window > Preferences > Remote Systems > z/OS > MVS Files
and set your Default Page Expansion size to: 500
4.
2.
3.
Retrieve Data Set Video
Use Locate in a Large PDS Video 204
Optional Workshop – Displaying PDS Members by Last Date/Time
To display PDS (Library) members sorted by Last Date/Time
1. Right-click the library and select Show in Table
2. Click the column header you wish to sort on
Note that you can customize the Table, and remove unneeded information
Sort by Date/Time Video –
Download or use Preview
1.
2.
205
UNIT The IDz Workbench
Topics:
▪ Connect z/OS Projects for Remote Development
▪ z/OS Remote Search
3.
4.
3. 2.
208
Workshop – Remote Search
Assuming you have copied all of the IDzClass files to your
mainframe libraries, Search for the Content string: diag
210
Workshop – Saved Search Query
▪ From Remote Systems:
Select and Search… for: *AMOUNT* in:
▪ <HLQ>.TEST.ASM
▪ <HLQ>.TEST.BMS
▪ <HLQ>.TEST.COBOL
211
Workshop – Remote z/OS File Search
From the Search menu select: Remote z/OS File Search
▪ Search in specification:
Type or select one or
more Datasets:
▪ Click Existing filters
– Select the DSNs
▪ Click Data set names:
– Enter names
manually separated
by with ;
▪ Optionally use
wildcards for member
filtering of large library
lists
212
Workshop – Remote z/OS File Search Results
When your search completes
(from the Remote z/OS Search view)
Time permitting:
Experiment with Filter:
▪ If you’ve opened a COBOL
program type: move
Save query as…
▪ Then Double-click the
query to re-run it from
My Favorites – in Remote
Explorer
Export results
▪ Then open the exported
results file to see what was
produced
213
Optional Workshop – Search Options
Search Options>> allows you to modify search behavior defaults for:
Search result limit: How many records/lines are returned as points of interest
Whether or note to search thru:
• Migrated datasets
• Datasets in off-line volumes
Case sensitive search (or not)
214
Optional Workshops –
Search Combined w/File Compare
You can combine IDz’s File
Compare with Remote Search
to simplify certain project tasks:
1. Using Ctrl+Left Click, Select
the files you wish to compare.
These can be:
QSAM files
PDS members
Libraries ➔
2. Right-click and Remote Search
them:
1. Name
2. Content strings:
3. From the Search Results select
two files and compare them
215
Optional Workshops – Remote Search with Regular Expressions
1. Using Search and Regular Expressions, find Examples
out what COBOL programs in the libraries
could be affected by a change to the DB2
tables (use your programs or the IDzClass
code you copied up to your mainframe PDS)➔
WARD_DATA|HOSP_BED
216
Optional Workshops – Regular Expressions in Remote Search
• Search for PDS members module inside of <HLQ>.TEST.COBOL where the
member name begins with TR or BN.
Use: (BN.*)|(TR.*)
218
Optional Workshop – Find Binary Values
▪ Try searching for a specific binary/hex value Regular expression: \x3f
Note that \x
signifies that the
Regex search value
is in Hex
219
Workshop – Column-range Remote z/OS File search within a dataset
220
Remote Search – Optional Workshops
Collect (copy) just the names of the PDS members where search has found your
Content string:
▪ Select your <HLQ>.TEST.COBOL library
▪ Search for the content string: row-sub
From the results:
▪ Hold down the Shift key and press the
down arrow on your PC (to select all)
▪ Right-click over the selected files and
from the Context menu Copy
▪ Open Notepad (or any text file)
▪ Paste
221
®
Module 5 –
Remote Systems Dataset Access & Organization
DevOps
2. In the Filter string field of the New Filter window, type an uppercase filter string 1.
RTPOT40.COBOL.*
2. RTPOT40.COBOL.*
224
Workshop – Modify (Add Filter Strings to) an MVS File Filter
Filter Strings allow you to create subset or super-set file organizers for
yours and others’ datasets by adding additional DSN patterns.
▪ Click Create
225
Workshop – MVS File Filters – continued
Follow the steps on the prior slides and create more MVS File Filters:
1. A Filter for one of your co-worker's (personal) TSO libraries
2. A Filter for two or three of your co-worker's JCL libraries
3. A Filter that combines three different dataset types from multiple co-workers:
▪ COBOL libraries
▪ Copybook libraries
▪ JCL library
4. A Filter for your own TSO ID's COBOL or Assembler libraries (see screen capture
below)
▪ Modify the properties of this Filter and add copybook (or Macro) libraries
▪ Move this Filter to the top of your Filter list under MVS Files
226
Optional Workshop – Library Member Filters
Steps:
1. Right-click over MVS Files and select:
New > Member Filter…
2. Name the Member Filter
3. Type a member naming pattern
• Try a wildcard, like: BNCH*
4. Select libraries that contain the members
you want added to the Member Filter –
from any of the following:
• My Data Sets
• Other existing Filters in RSE
• Other contexts (specific named libraries in
your LPAR)
• Note that Other contexts is an
either/or choice with selection from
Filters in RSE
5. Your Member Filter will be created in
“My Favorites” along with any saved
search queries
• Check out the result by Double-
Clicking your created Member Filters
227
Optional Workshop – Library Member Filters Using Regex Search
• Use a Regular Expression Search for Member names - and save the
Search (IDz will place your saved-search in My Favorites).
Note that regular expression member name searches are CASE SENSITIVE
228
Optional Workshop – Search for a specific member by
name within a group of Libraries
Combine Search with MFS File Filters to find a
specific members across several libraries -
Steps:
Select one of your MVS File filters within Remote
Systems
Right-Click and select Search
In the Search dialog, specify ONLY a member name
(see below) – do not type anything in Content strings
Steps
1. Right-click on MVS Files and select Retrieve Data Set...
2. From the Retrieve Data Set dialog:
▪ Enter an ISPF 3.4-style search pattern (* = wildcard text)
▪ Press Enter
▪ Scroll through the list to find your PDS, sequential or VSAM
file name(s)
▪ Double-click to select a dataset. Alternatively you can use
standard Window Ctrl+Click …or… Shift+Click
DSNs matching your search patterns will appear in the
Retrieved Data Sets Filter under MVS Files
230
Workshops – Retrieve Data Set… 1 of 2
From Remote Systems
Right-click over MVS Files and select:
Retrieve Data Set…
From the Retrieve Data Set dialog ➔
▪ Type a wildcard Dataset specification
– See the example in the screen capture or use
something that matches your DSNs better
Press Enter
Double-click a DSN from the list
▪ Repeat the above steps to add a few
additional Retrieved Data Sets to the
Filter – for example:
▪ SYS1.P*
▪ DB2.V11*
▪ IMSV.*
▪ CICSTS.*
232
Workshops – Manage the Retrieved Data Set DSN List
After you’ve added a few Data Set names to the Retrieved Data Sets list, remove
(some of) them without deleting the files
▪ Steps:
Right-click over Retrieved Data Sets
Select Manage…
▪ Work with the DSNs
▪ Increase/Decrease the max number of DSNs
▪ Add one or two other DSNs to Retrieve Data Sets (see prior two slides if you need a
“how-to” reminder) then Remove… one of them from the Retrieved Data Sets filter:
Expand Retrieved Data Sets
Right-click on a Dataset
Select Remove…
233
Optional Workshop – Find Member
1. Partially-qualified member name use case:
Right-click over MVS Files and select Find Member
Specify the following pattern: <HLQ>.TEST.COBOL(TR*)
Press Enter
Select one of the programs and click: Open
234
Optional Workshop – Dataset Mapping
Do this workshop only if you are using
RDz v9.5 or IDz v14.1 **
Do this workshop
only if you are using
RDz 9.5 or IDz 14.1
236
Review - Property Groups
If you are using your company's mainframe…
Check with your IDz setup and administration person to see if they have created a custom
property group for your z/OS environment.
If so, obtain a copy of it, and use your Property Groups.
Check with your instructor on what – if any – workshops you should finish for this section
If you are working on the IBM mainframe (zserveros) – or if you need to learn
how to create Property Groups from scratch and have finished the previous
workshops to allocate and copy the class files to your zserveros ID – follow the steps
on the next set of slides.
Additional Notes:
• Property Groups can be defined to provide “outside-of-SCM” build processes –
Compiling/Linking your programs outside of Endevor, Panvalet, Changeman, etc.
• Setting up a Property Group file is a one-time process
• To better obtain “economy of scale” consider having one person setup the Property
Group file for your team – who then can Import their work
• SYSLIB – the most important Property Group entry – can be created by
copy/pasting in the SYSLIB concatenated library list from a compile job
237
Workshop – Define SYSLIB for your MVS connection
Property Groups are used by IDz to map its advanced functionality onto your shop’s custom/TSO environment. Property
Groups manage everything from finding and pulling in the necessary COBOL and PL/I Includes, Copybooks and DCLGEN
Libraries – to generated JCL for Syntax Check, Search and Build.
If you haven’t already done this: From the Info tab in your Property Group:
From Basic settings/Application language: Enter the DSN of one or more Copybook and DCLGEN
Include libraries – each separated by a space
238
Workshop – Property Group: JCL JOB card, DSN for generated JCL and PROC lookup path
The JCL tab allows you to customize your z/OS Batch Environment: Job Card, your (own) TSO JCL PDS for “generated JCL” –
a feature of IDz used in Build and other functionality. Finally you can enter a concatenated look-up path for your PROCs.
This will allow you to find and open a PROC from in-stream JCL that references it.
240
Workshop – Test SYSLIB Search Path
After you’ve customized SYSLIB and saved your Property Group edits and associated your
Property Group to MVS Files you should test your work: I.E – find out if you need to add
additional Copybook/Include/DCLGEN files to SYSLIB
241
Workshop – SYSLIB: Verify the correct
copybook version – 1 of 2
There are two approaches to verifying that your
SYSLIB path points to the correction library
versions:
1. Open Copy Member
2. Show Dependencies
Best Practice:
From full-screen open the source
program and copy file(s) side-by-side
242
Workshop – SYSLIB: Verify the correct
copybook version – 2 of 2
Show Dependencies
▪ From Remote Systems:
Right-click on a program and
from the Context Menu select
Show Dependencies ➔
243
Workshop – Open JCL Procedure
From within Edit on JCL file that references a PROC
▪ Select and right-click over the named PROC
▪ Select Open JCL Procedure
Note the PROC must be found on the Property Group JCL tab search library list
244
Optional JCL Workshops – Opening Files With Symbolics - 1 of 2
▪ (Using the JCL Editor) Open a run stream JCL file from z/OS (any JCL file on the host that accesses
a PROC)
▪ Click/Select a PROC - and from the Context Menu: Open JCL Procedure
245
Optional JCL Workshops – Opening Files With Symbolics - 2 of 2
(Using the LPEX Editor) Open a JCL
file that contains a reference to a PDS
member (PARMLIB, etc.)
Go to Full-Screen mode
246
Optional Workshop – Add File Lookup Path
so that you can open the source for a called subroutine
Let’s get the open called program function to work… 3.
2.
From your Property Groups:
1. From the COBOL tab
2. Select Editor Configurations
3. From File-look-up paths; enter the DSNs of
COBOL source libraries, where called sub-
module source is found
Notes:
• Opening Dynamically-called modules only works if you are using IDz v14 or above
• If you’re using IDz v14 – how can you use this technique to open ANY module during an Edit session?
• If you are using IDz v9.x you can open Statically-called modules
247
Optional Workshop – File Lookup Options
The ADSORT program contains examples of various types of program call protocol
248
Workshop - Other RSE Context Menu Features
▪ When you have successfully setup your Property Group and
associated it with MVS Files experiment with these options
Show Dependencies
▪ Use DDS0001.TEST.COBOL(TRTMNT)
Compare With
▪ DDS0001.TEST.COBOL(IDAT1) and IDAT1OS
Replace With
▪ Open IDAT1 and make a trivial source change
▪ Close and Save your change
▪ Try: Replace With ➔ Local History…
249
®
DevOps
254
Optional Workshop – Combined Dataset Management Techniques – 2 of 2
From the Context Menu, open the Perform Hierarchy view on
200-PROCESS
Find out how 232-LOOKUP-MODEL gets executed
Study the perform chain indentation in the Outline view
From the Context menu select:
▪ Show In ➔ Program Control Flow
▪ Navigate from paragraph to paragraph using the Program Control Flow View
Edit the code in MSTFILUP and add a few COBOL syntax errors
Remember the mistakes you're coding into the program
Save your edits (syntax errors) and close your MSTFILUP edit session
Right-click over MSTFILUP and select Remote Syntax Check
From the Remote Error List view - double-click an error message
Do not fix the errors manually, instead undo your edits using Replace with
Local History (from the Context menu)
Right-click over the Remote Error List view and select Remove All
Messages
Remote Syntax Check the program again
255
Review – Submitting Batch JCL Jobs
IDz has access to the JES queue - Compatible with either JES
2 or JES 3
259
Workshop – Create Custom JES Job Filters
▪ Right-click over JES
Select New JES Job Filter…
▪ Specify any custom filtering properties:
Job Owner
▪ The &USERID variable = you
Job Name Prefix
Job Output Class
Job Status
Job Class
▪ Click Next >
▪ Name the Job Filter
▪ Click Finish
JES
Custom Filter
260
Workshop – Create a Custom Filter for active jobs launched by a group of users
▪ Create a custom Job Filter for active jobs from certain job owners
▪ Expand the custom Job Filter - or show results in Table format
261
Workshops – More custom Job Filtering options
Using the information on the previous slide, create several JES
Job Filters:
Some possible examples:
My jobs with names ending in "C"
262
Optional Workshop – Set LPEX/ISPF as the Default Editor for JES Output **
You may wish to change the IDz/IDz default editor for JES Output to LPEX
To do this – from:
Windows > Preferences >
General > Editor >
File Associations
▪ Scroll to *.spool
▪ Click Add
▪ Select z Systems LPEX Editor
** Your education
workspace may already
have LPEX defined as
the default editor for
.spool files 263
Review - TSO Host Connection Emulation (HCE)
▪ Right-click over an Remote Systems file and select
Host Connection Emulator from the context menu.
▪ Select your mainframe application
Login, etc.
PF Key and
3270 system key
Emulation
264
Workshop – Host Connection Emulation (HCE)
Login to TSO using HCE on your shop’s mainframe
▪ From the primary menu, access:
Edit (=2) and Browse (=1)
▪ Edit or Browse a PDS member
Any of the =3 Data set utilities
=6 and run a REXX or CLIST
Your Outlist or SDSF panel(s)
=0 and setup your Log/List and PF-Key defaults
▪ Split-screen – then =x out of split screen
▪ Your DB2 SQL (SPUFI) tools
▪ From the Key Pad try out a few of the 3270 keys:
SYS Request
ATTN
Erase EOF
265
Workshop – Host Connection Emulation – multiple emulation sessions
▪ Select an HCE session – and from Window ➔ Clone the emulator
266
Workshop – Host Connection Emulation – Screen size
▪ Launch emulation
▪ From Host Properties modify your Screen size
▪ Close emulation
Save your changes to the
Properties
▪ Reopen emulation to enjoy
your new screen size
267
Optional Workshop – Host Connection Emulation – Macro record/playback
▪ From the content slides
(Module 6) find the slide
that describes how to
define/record and play
back a Macro.
▪ Try this technique using
either an online screen
(CICS or IMS) or using
TSO/ISPF
269
Workshop - Using TSO Commands – 1 of 2
▪ Launch the TSO Commands Shell ➔
▪ Maximize the view (double-click the tab)
▪ Issue the following TSO commands (after each command press <Enter>):
Note: A few of these commands require you to have successfully finished
previous Dataset Management workshops
▪ TIME
▪ LISTC
▪ LISTC ENTRY(TEST.COBOL) ALL
▪ LISTC LEVEL(<HLQ>)
– Note: HLQ = your TSO ID
▪ LISTDS TEST.COBOL
▪ PROFILE
▪ SUB TEST.JCL(COMPLINK)
▪ ST
▪ HELP LISTALC
▪ SE 'HI REGI HOWS THE SCUBA DIVING?' USER(DNET045) LOGON
▪ RENAME TEST.COBOL TEST4.COBOL
▪ LISTDS TEST4.COBOL MEM
Press the up arrow key twice to retrieve the rename command
▪ RENAME TEST4.COBOL TEST.COBOL
272
Optional Topics and Workshops For This Section
▪ If you have time, and are comfortable with the material covered, please read
through the slides – and/or try out the techniques shown using IDz and
sample programs.
▪ The development techniques covered in these slides can make your
standard z/OS Maintenance, Production Support and Development tasks
much easier, and make you more productive. So at some point – perhaps
after class please consider returning to these optional topics to build out
your IDz skills.
▪ Also – if you have access to IDz installed on your mainframe and time
permits, please try out the techniques shown using your own application
source.
273
Workshop – Edit QSAM Data File on ZSERVEROS
If you're using the IBM ZSERVEROS LPAR
from z/OS File System Mapping ensure that you have added
this Mapping criterion (previous workshop):
**SAMFILE
Workstation file extension: Other tdat
Transfer mode: Other binary
▪ If time permits and you can connect to your own mainframe, try editing one of your own QSAM
files
▪ Also, if time permits, from Window > Preferences > z/OS Solutions > System z Data Editor
- change some of the preference settings (set the number of records to: 20, etc.)
274
Optional Workshop – Browse Load Module – zserveros
If you're using IDz v8 or later from Right-click over MVS Files,
select: Retrieve Dataset
Data set name pattern: DDS0001.TEST1.LOAD
▪ From Retrieved Datasets,
Expand: DDS0001.TEST1.LOAD
Right-click over SAM2.exe and select: Browse
Try some of standard Load Module browsing techniques you may have
used in your work as a z/OS developer:
▪ Check the Timestamp: From the command line, type: F 2012
▪ Look for a specific literal: From the command line, type: F CEEFMAIN
276
/* REXX */
Optional Workshop - Using TSO Commands – parse upper arg mvscmd
(Working with REXX scripts) "CONSOLE ACTIVATE"
"CONSPROF SOLDISPLAY(NO)"
▪ Create a new member in a REXX PDS "CONSPROF UNSOLDISPLAY(NO)"
named: RUNMVS say 'Running MVS command:
'mvscmd
▪ Select and Copy the code shown here ➔ "CONSOLE SYSCMD("mvscmd")"
▪ Paste the code into the RUNMVS member rc = getmsg('msg.','sol',,,5)
if rc = 0 then do
Save your code (Ctrl+S) do i = 1 to msg.0
say msg.i
end
▪ From the TSO Commands Shell, run the end
REXX – passing "CONSOLE DEACTIVATE"
Important notes:
▪ You must be authorized to execute Sys commands
▪ Certain commands can be dangerous
277
Optional Workshops – Copy Job Output from JES
▪ You may wish to copy the output of a job to some file for save/reuse
▪ Open the Job – and from inside editor press:
– Ctrl+A ….then Ctrl+C
▪ Open receiving file (in the example below Notepad – but could be an empty PDS member from a listing dataset
(LRECL=133) ) and press: Ctrl+V
278
Optional Topic – Customize Host Connection PF-Keys
▪ You might want to setup different defaults:
▪ From: Window > Preferences > General > Keys
Select PF-Key
▪ Click Apply then click OK - and test using Host Connection Emulator
280
Optional Workshop – Map F3 to Close (like ISPF) in LPEX
▪ ISPF maps F3 to
file/edit Close.
▪ To do this with
IDz:
From Preferences >
▪ General
Keys >
▪ Enter: close to filter
the mappings
▪ Place your mouse in
the Binding edit box
and hit: F3
▪ Select LPEX/ispf
from the When box
281
Optional Workshop – Map Ctrl+C to Copy (like MS-Word) in LPEX
▪ ISPF maps Ctrl+Insert to text
copy. To do this with IDz:
282
®
Module 7 –
Using MVS Subprojects
Module 7 Class Recording – Download or use Preview
DevOps
MVS SubProjects are used to organize DSN lists of commonly
© 2019 IBM Corporation
edited files for quick and convenient access
Workshop – Create a z/OS Project and MVS Subproject
1. Connect to the mainframe
and from z/OS Projects
2. Select: New ➔ z/OS Project…
284
Workshop – Add Resources to an MVS Subproject
From Remote Systems
Add (Drag & Drop) an assortment of individual resources
to your MVS Subproject
– COBOL
– Choose TRTMNT – or at least one program with copybooks
– Assembler
– JCL
– REXX/CLIST
– BMS/MFS
– Etc.
285
Workshop - Create Another MVS Subproject and Add Resources
Right-click over your new z/OS Project and add one or two other MVS
Subprojects (named anything you want)
Considerations:
Each MVS Subproject is connected with one (and only one) LPAR
A z/OS Project can contain several MVS Subprojects. The Subprojects can be connected to
the same or to different LPARs
Use MVS Subprojects to provide quick (one-click) access to individual dataset members that
you are using in your project tasks
Do not populate MVS Subprojects with 100's or 1,000's of files – as this could
cause long IDz client-software launch times.
286
®
Module 8 Workshops –
Using the Data Source Explorer (DB2/SQL)
DevOps
Your Location
Your z/OS LPAR Hostname
Your DB2 System’s Port#
▪ Click Finish
▪ Hit Apply
▪ Then OK
291
Workshop –
Filtering Schemas and Tables
After you’ve created your connection you
can continue to Filter your DB2 Schemas
and/or Tables at any time
Click Apply
Click OK
292
Workshop – Data Source Explorer
When your connection create process finishes, you will be returned to the Data
Perspective, where you now can:
Expand:
▪ Schemas
– Synonyms
– Tables
– Table elements Expand
– Views
293
Workshop – Data (Row Content) Analysis
• Select a column in a table
• Right-click and select: Data ➔ Sample Contents
295
Workshop – Read/Only View of a Table's Row Values: Data Studio
From the Data Source Explorer, Right-click over a table, and:
▪ Browse the Data and Sample Contents
▪ Try out: New “Select” Script
▪ Press <F5> to run the Select script
▪ Value Distributions > Multivariate
▪ Repeat these steps with one or two other tables
About Browse Data and Sample Contents: These options ignore the Preferences
setting for maximum number of rows to return from DB2, and on a very large table will cause
Workbench performance issues
296
Workshop – Read/Only View of a Table's Row Values: Non Data Studio Install
Note: Return All Rows ignores the Preferences setting for maximum number of rows
to return from DB2, and on a very large table will cause Workbench performance issues
▪ Better to use Sample Contents
297
Workshop Edit Tables
To edit your DB2 table data:
▪ Select the table or view you wish to edit
▪ Right click and select: Data > Edit
▪ Note that you can open (edit) multiple tables. And project them out in multiple window views –
so that you can analyze data, or copy/paste values from one table to another
298
Workshop Table Filtering – Requires Data Studio
From the Data Source Explorer
Right-click CUST
Select: Data > Edit Data
Click: Filter the data
299
Workshop – Testing Interactive SQL Statements: Process
Sample SQL Statements
on the next slide
3. Code/Test your SQL statements – you can Run the SQL from the toolbar,
Context menu or from the Outline view
302
Using SPUFI Files - Video
Workshop – Running Embedded SQL Statements – Requires IBM Data Studio
Open the PDF titled: Module 8 IDz Workbench – Using the Data
Explorer. Follow the detailed slide instructions in the PDF to set up
for Testing (running) your Embedded SQL from within a program
editing session. The high-level view of what you need to do is this:
• From Remote Systems:
• (If you don’t already have one): Create a Property Group for the
connection to pick up your copybooks and DCLGEN includes
– for the DB2 programs you wish to work with
• From z/OS Projects
• Create an MVS Subproject (Module 7 in this curriculum
shows you how to do this)
• Right-Click on the MVS Subproject and Add Data
Access Development Support to the Subproject
• Copy a few DB2 programs into the Subproject – from the COBOL
programs you copied to the host. Use your own code, or from
IDz/Class, copy: CURSRAVG, TRTMNT
Optional – Select and visually-explain a statement. Note that your DBA may
have to setup your Plan_Tables for Visual Explain to work
304
Workshop – Testing Embedded SQL Statements: Without IBM Data Studio
▪ From the Remote Systems view:
Open <HLQ>.TEST.COBOL(CURSRAVG)
Right-click and from the Context menu select: Filter view > Embedded SQL/CICS/DLI
Select and Copy the Interactive portion of the SQL SELECT statement in this paragraph –
minus all of the embedded COBOL syntax (shown below in the screen capture)
305
Workshop – Testing Embedded SQL Statements: Without IBM Data Studio
▪ Swap back to the script editor and paste the copied embedded SQL inside
the SQL script editing area
▪ Right-click and select Run SQL
306
Workshop – Extract/Load Table Rows
From the Data Source Explorer:
Right-click over the table name
Select: Data > Extract…
Specify data extract (unload) options:
▪ Output file-spec
▪ Column delimiter type
▪ Char-string delimiter type
▪ If you are using your own DB2 system, please choose
a small table (under 5K rows)
307
Workshop - Extracted Data for Decision Support Applications
▪ Extract a DB2 table into a file named with an extension of .csv
▪ From Remote Systems ➔ Local ➔ Local Files
Find and Open the .csv extract file
From here you have all the tools of Excel at your disposal
308
Modifying Extracted DB2 Table Values using Excel – 1 of 2
▪ You can also open DB2 extract files using Excel – and modify row values with Excel
Extract to a file named: *.csv
Find the file in Remote Systems:
▪ Local
– Local Files
Double-Click to open the file
▪ This should into MS-Excel
309
Modifying Extracted DB2 Table Values using Excel – 2 of 2
Modify the table values using Excel editing techniques
For Date/Time/Timestamp
you may have to Format the
Cell type
Module 9 –
Debugging z/OS COBOL
Module 9 Class Recording – Download or use Preview
DevOps
▪ Overview:
There are two workshops in this course:
▪ The CDAT CICS Transaction – which is supplied by the IBM Debug
Tool IVP
– Simple setup ➔ Online debugging
▪ A Batch COBOL program
– Complex setup ➔ Batch (JCL-driven) debugging
The following slides will guide you through the process
313
UNIT
The IDz Workbench
Topics:
▪ Debugging a z/OS COBOL Batch Application
Notes:
• The steps is this workshop are mean to convey a general plan and approach to
Debugging your program with IDz.
• Specifics having to do with which Debug product you use – your compile-for-debug Build
process, etc. are shop specific.
• Finally – it goes without saying that you will get the most benefit out of Debugging your
own application code.
314
Batch COBOL Pre-Workshop Overview
▪ You will use Debug Tool to test the SAM1 and SAM2
batch COBOL programs
▪ Steps:
Allocate data sets
Modify the JCL for the compile and run stream JCL
Find your workstations:
▪ I/P Address
▪ Port#
Substitute those variables into the run steam JCL
Debug
Test out various Debug Tool options
315
Workshop – Preparing for the Workshop
▪ Prerequisites:
Ensure the IBM Debug Tool is installed and configured on your z/OS
▪ You may need to speak to one of your systems programmers about this
Ensure that you have a "real" I/P address (as opposed to a router-generated I/P address)
for your workstation
Ensure that you know the location (system library) of the COBOL compiler IGYCRCTL –
typically found in: COBOL.VnRn.COBOL - Example: COBOL.V3R4.COBOL
Hint:
Specify characteristics by usage type:
Will allow you to select the correct DCB for the files
Give each dataset 5 primary and 5 secondary TRKS
of disk space
317
Workshop – SAM1 and SAM2 Code Review
▪ Load both SAM1.cbl and SAM2.cbl into the editor – and review the logic in this
typical z/OS data collections/editing/report writing pattern
▪ Time permitting, learn a little bit about the programs you're going to debug, using a
few of the IDz code analysis tools & techniques:
Multiple editing windows to study the logic, Program Control Flow, Perform
Hierarchy, navigation techniques, Hover, etc.
318
Workshop – Compile SAM1 and SAM2
▪ Ensure that green listener tool is – in fact – green, and not red.
If it's red (not listening) click it (once) to change it to green
320
Workshop – Modify and Submit the Run JCL
322
Workshop – Debug Techniques – Variables
▪ Change some values:
From the Variables tab:
▪ Filter Locals > 0 ALL
– What does this do?
323
Workshop – Debug Techniques – Monitors
▪ From within Variables
Select Monitor Local Variable
▪ Experiment with:
Change representation
Change Value…
Show Type Names
Remove
324
Workshop – Monitors (more techniques)
▪ From Monitors
Select Detached
325
Workshop – Debug Techniques – Breakpoints
▪ Optional:
Right-click in the Debug
Console and Export History
– for your debug trace
328
Workshop – Jump To Location
▪ Branching and testing
Use the Outline view to navigate to 730-READ-CUSTOMER-FILE
Right click on the EVALUATE
statement and in the prefix area
(on the left) select Jump to Location
What did this do?
▪ Answer: Set the current instruction
pointer to the line
330
Workshop – Optional Workshop (Force an ABEND)
If your debugging hasn't yet hit an ABEND condition, try forcing one by doing
the following:
▪ From SAM1.cbl
Add these two variables in the
WORKING-STORAGE SECTION.
331
®
Code Coverage
Code Coverage Video
DevOps
334
Review – Code Coverage – Specifying ENVAR
▪ Specifying the ENVAR parameter
Batch:
▪ PARM card
Online
▪ DTCN Profile
▪ DTCN Transaction
– PF9 ➔ Options
335
Review – Code Coverage – Reports
▪ When the Code Coverage batch
job or transaction finishes – and
you’re running IDz interactively:
The current Code Coverage report
opens in the editor window
The Compiled Code Coverage Results
view is opened
Paragraph
coverage
▪ The lines that were executed
A warning symbol to let you know of
any modules and/or paragraphs that
were accessed at below a specified
coverage threshold
▪ You set the threshold for coverage warnings
in Preferences
Individual program paragraph
coverage statistics
Opens…
336
Workshop – Code Coverage
▪Using the information & techniques in this
section add Code Coverage into either
your batch or online debugging JCL TEST
statement
▪Submit the Job
▪View results
337
UNIT
The IDz Workbench
Topics:
▪ Debugging a CICS Online Application
Note that if you’re using the IDz Integrated Debugger the CICS
setup is completely different than what follows in these slides.
You will need to check with your instructor.
338
Workshop – CICS / CDAT** Transaction – Debug Workshop
▪ Configuration/Steps:
Sign on to CICS
**Note that the CDAT transaction will have had to be defined to CICS
and be available/running in the region
339
Workshop – DTCN Transaction – Debug Setup
From the DTCN screen:
Press F10 to define a valid Terminal ID
Enter your transaction: CDAT
Enter the LoadMod::>CU(s): CDAT*
Specify:
▪ TCP - Your Port Number
▪ Your workstation’s I/P address (in the Display Id field)
Press F4 to
save your
settings
Press F5 to
activate your
settings – if it
is currently
inactive
▪ Note that F5
is a toggle
340
Workshop – Start Debugging
Press F3 to exit from DTCN and from
the CICS region
- Enter the Trancode: CDAT
- Press Enter
- Click: Yes – at the Confirm
Perspective Switch
341
Workshop – Debug the CDAT Transaction and COBOL Program(s)
▪ Debug as learned during the Distance Learning class demonstration
342
UNIT The IDz Workbench
343
(Optional) Use Case #1 – Program Search and Analysis – 1 of 5
▪ Use IDz to do the following:
From Remote Systems Explorer, select a number of
libraries and PDSs
▪ Search for something, anything-of-interest
a variable
Computation
literal value
etc.
344
(Optional) Use Case #1 – Program Search and Analysis – 2 of 5
▪ From the Search Results
view
Expand the selected
modules
Hover over a
line/statement
▪ Note the Peek window
Double-click a
line/statement
Repeat (hover and
double-click) on different
lines of different programs
in Search Results
345
(Optional) Use Case #1 – Program Search and Analysis – 3 of 5
▪ From one of the program source modules:
Do a find on: COPY (or INCLUDE)
Double-click (select) the copybook
Right-click and Open the copybook
346
(Optional) Use Case #1 – Program Search and Analysis – 4 of 5
▪ Go to full-screen mode in the editor
▪ Create a side-by-side view of the copybook and program source
Open one or two other copybooks and add them to the view
▪ Note that you can use multi-window viewing of two-or-more programs
352
Optional Workshop - Understanding MVS Subproject Behavior
Recall from the class discussion that MVS Subproject DSNs are links – back to
the MVS resources used to populate the Subprojects. To understand this
more clearly – from an MVS Subproject:
Select and rename a PDS member
After the operation completes, navigate to the original library and check out the
member name
Select and delete a PDS member
Again navigate to the original library and see if the PDS Member exists
353
Optional Workshop - Understanding MVS Subproject Behavior - continued
From one of your MVS Subprojects:
Select a PDS member and remove it from
the Subproject
▪ Did this delete the file –
or just remove it from the
Subproject?
▪ Time permitting, try out some of the other Context menu options for files in an
MVS Subproject:
Syntax Check – Remote
▪ First clear the results in the Remote Error List view
▪ Do a Syntax Check > Remote
▪ View the results in the Remote Error List
Select two files and try out: Compare With Each Other
354
Optional Workshop - Show Dependencies
From an MVS Subproject: Right-click over a
COBOL program that contains copybooks
and select Show Dependencies
Use the following programs:
▪ TRTMNT
▪ CUSVSAM
If you need to add
the programs to your
Subproject do so at
this point
For
TRTMNT -
select all
COPYLIB
dependenci
es and add
them to
your
Subproject 355
Optional Workshop – Working With Copybooks in an MVS Subproject
Edit TRTMNT. Right-click over a variable that is declared inside a copybook
and press F3 (Open Declaration).
356
Optional Workshops – Working With Copybooks in an MVS Subproject
Edit CUSVSAM. Select the POTVSAM copybook and Browse the Copy Member
Optionally
customize
your
Workbench
views as
shown
357
Optional Topics – Setup for Open Copybook
To open copybooks/includes from within edit you need to set up a SYSLIB path.
On the host – this path will look and behave like SYSLIB from compile JCL –
i.e. you reference copybook libraries (PDS datasets)
In a Local Workstation Project you’ll point to the folders that contain copybook
and source files
In our class these files are contained in subfolders of your custom workspace.
To enable this functionality:
1. Left-click to select the copy folder
From SYSLIB:
5. Paste the copied folder’s location
6. Delete the word “location” and delete
any blanks before the file-spec
7. Save your changes
358
Summary graphic of setup for Local Workstation SYSLIB configuration
359
Optional Topic – Working With Copybooks – 1 of 2
Most of your programs contain copybook or Include
files. To open them using IDz:
1. Double-click to select a copybook name:
2. Right-Click
3. Select: Open Copy Member
360
Optional Topic – Working With Copybooks – 2 of 2
You can make
seriously
good use of
IDz's multiple
window
development
paradigm
using this
technique.
Precisely how
IDz locates
your
copybooks is
a topic that
will be
covered in
the course
module:
"IDz Workbench
– Using Remote
Systems
Explorer"
1. Press Ctrl+F
5. Optional: Create the Program + copybooks multi-file view shown on the next slide by:
• Maximizing the screen
• Dragging and dropping all of the copybooks to different areas of the editing frame
• Or – if you’re using IDz Version 9 or later, drag and drop the
copybooks outside of the IDz Workbench
362
Optional Workshop – Screen Capture for Step 4 of Previous Slide
364
Optional Topic – Open a Program From a Static CALL Statement (1 of 2)
(When your IDz "Property Groups" are setup correctly) You can do the following:
Select a CALL statement:
Right-click on the program name
Select: Open, View or Browse Program <"program name">
365
Optional Topic – Open a Program From a Static CALL Statement (2 of 2)
366
Optional Workshop – Opening Called Programs – 2 of 2
From IDzClass – open ADSORT.cbl
1. Find the CALL and XCTL statements
2. Select and: Open, Browse and/or View the static or dynamically-referenced modules.
368
Workshop – Allocating Libraries using IDz
Follow the steps on this and the next few slides to allocate 5 new
libraries and copy source files from IDzClass to your mainframe
369
Workshop – Copying Files to a Mainframe
You now have 5 new, empty libraries. Copy/Paste the class
COBOL programs and copybooks from your local workstation
IDzClass project to the mainframe
Workshop:
From the z/OS Projects view
1. Expand the cobol folder under IDzClass
2. Left-click on the top file in the list
3. Hold the Shift key down on your PC
4. Left-click on the bottom file in the list
5. Right-click over the marked list and select: Copy
4. Specify:
Space Units: TRACKS
Primary Quantity: 30
Secondary Quantity: 20
Directory Blocks: 30
3. Select:
Category: SOURCE
Type: COBOL
371
Workshop – Using Regular Expressions - 2 of 2
▪ Search for: date - using a regular expression and Ctrl+F (find)
Find date.*
372
Optional Workshop – Finding COBOL “Semantic” Syntax Errors
Open EBUD01.cbl
Preferences
Click:
▪ LPEX Editor
And in the Editor profile list
– Select: ispf
Click: OK
- Change the
command line to
top
- Open an Assembler
Note - in this course
or COBOL the command line is
program from screen captured at the
IDzClass bottom – but that makes
no difference to the IDz
functionality or the
375 workshop directions
Optional Workshop – Other Preferences to Customize
1. Set Tab stops:
From Window, Preferences
▪ LPEX Editor
– Tabs ➔
Press OK
Appendix D –
Adding a new File Association
378
Steps – Adding a File Association – 2 of 4
From Content Types, scroll down to Text > COBOL Source File
Click Add… and add your File association: *.cobdb2
379
Steps – Adding a File Association – 3 of 4
From LPEX Editor > Parsers > Parser Associations
Type the Document type: cobdb2
Select the Document parser from the combo box: cobolZosSqlCics
Click Set
Click OK
380
Steps – Adding a File Association – 4 of 4
▪ Test your work
Source colorization, Overview diagram, Context menu
Hover, Content Assist, Program Control Flow, etc.
381
Backup Slides
382
Reminder...
Why Learn IDz? (once you become familiar)
1. Your work will become easier
▪ Just as you probably use Windows (graphical)
tools vs. command prompts, once you get
comfortable with IDz, going back to green-screen
(ISPF) will be like using a DOS command prompt.
▪ Because IDz’s advanced graphical tools are:
– Easier / More intuitive / Less effort
– Faster
– You can do things with IDz that aren’t possible with ISPF