Labs

Download as pdf or txt
Download as pdf or txt
You are on page 1of 383

®

IBM Software Group

IDz/ADFz/RDz Technical Enablement

Workshop Slides and Lab Exercises


Jon Sayles: IDz Technical Enablement - jsayles@us.ibm.com

DevOps

© 2019 IBM Corporation

© IBM Corporation – March, 2020


IBM Trademarks and Copyrights
© Copyright IBM Corporation 2008 through 2020.

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

Eclipse and Advanced Advanced


Improved Screen COBOL Static Source Editing Test & Debug DB2 Tools
Real Estate Analysis Tools Tools

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

▪ Note that all ISPF discussion/examples and screen captures


assume IBM-installed ISPF product defaults – not any 3rd party
or custom Dialog Manager applications you may have installed
on your mainframe

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

2. Unzip the workspace to your PC


 Here I’m unzipping directly on the c:\ root drive
 Note that many zip products create a folder named
the same as the zipped file

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)

Browse to the parent folder


of the .metadata folder ➔ C:\education_workspace

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

If you’ve used Eclipse products before you’ll recognize a


lot of the tooling in this IDE. That’s because IDz/ADFz/IDz
are all based on the framework from eclipse.org

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

Using your IDz client software and connection to the IDz


Server at your site:
1. Follow the directions from the workshop () exercises in this slide deck

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

3. If you are still unclear:


Search the directory where you unzipped the course PDFs (see next slide)
Ask someone in your shop who either knows IDz and/or has attended a
prior class
eMail the instructor
Ask a question before or during the next class
Google the question or topic
Ask someone on your IBM account team
13
 Workshop – Search the course PDFs for answers to questions
▪ From within a PDF you can press Ctrl+F at any time, and search for answers to
your IDz questions. However – you may want to search through multiple PDF files –
or perhaps even all of the PDFs in a Windows folder to locate something.
▪ To do this:
 Open any PDF and press: Shift+Ctrl+F
(or from the Edit menu select Advanced Search)
 Use the Browse function – to Browse to the
 location of the PDFs you wish to search through
 Click Search

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:

NEW Video Learning Example


Some of the recording links require just a single-click (to launch the video), others require you to press a Preview
button – or you can download the recordings
If you Preview the video, Click the icon on the bottom-right, to view the content in full-screen mode

5. Chat with other software developers during the presentation/demo


using the Web Conference Chat system
6. Look the topic up in the IDz “Help” system
7. Google a topic: While there’s no guarantee you’ll find exactly what you’re
looking for, IDz hit the market in 2003. Thousands of companies have used it – and
many have published public content that is indexed by Google
15
®

IBM Software Group

Module 1 –
IDz Terms, Concepts & Navigation
Module 1 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


UNIT IDz for ISPF Developers
Topics:
▪ The IDz Workbench – Terms and Concepts
▪ Editing COBOL Programs
▪ Editing With Keystroke Shortcuts
▪ Find and Replace Dialog
▪ Creating New Programs From Scratch
▪ Miscellaneous Features – Hex edit, Content Assist
▪ Execution (control flow) and Data Flow Analysis
▪ Working with Copybooks and Property Files
▪ Appendix – ISPF / LPEX Editor Comparison

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

Browse to this folder ➔ education_workspace

18
What you should see after you’ve opened IDz selecting the custom workspace
▪ IDz open in the z/OS Projects perspective

 If IDz opens to a "Welcome Screen“ instead of the z/OS Projects perspective:


- Close IDz
- Verify the windows folder where you unzipped the education workspace.
- Re-open IDz and browse to the windows folder where you unzipped the workspace

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

Up-down slider bar


The Editor
Using your mouse:
1. Move the slider bars:
▪ Up and down Left-right slider bar

▪ Right and left


Get comfortable moving the slider bars to navigate in the source file. Note that if the editor
window is sized wider than the 80-column source, the Right/Left slider disappears
2. Left-click the up and down scrolling arrows:
▪ To scroll one line at a time through the source file
These scrolling techniques are similar to pressing PF8/PF7/PF10/PF11 in ISPF
21
 Workshop – Resize a View
You might wish to see more program source at-a-glance. There are many
ways to do this, but we'll start by resizing the view windows:
- Move your mouse-cursor over the left or right-hand border of the editor
window. At a certain point, the cursor changes to an East-West facing pointer 

- When this happens:


Left-click, and holding the left-mouse button down, drag the border to the right or left and
resize the view

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.)

Time-permitting, spend a few minutes working with


your mouse: Window-resizing/View-manipulation

Manipulating Views Recording – Download or use Preview


22
 Workshop – Open, close and navigate source files
▪ Open BNCHS602
▪ Use the scroll bars:
 Up and down
 Right and left
▪ Use scrolling arrows
▪ Use your mouse scroll
wheel to navigate
up/down
▪ Resize the editor
window make it larger:
 Horizontally
 Vertically
▪ Close the editor –
Do not save any
changes
Close the editor by
clicking the Red X

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

To restore a view back to its


original size:
▪ Double-click (again) in the
middle of the tab

▪ 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

10.Close the editor - by clicking the X in the tab


11. (Time Permitting) Open some other files from other
folders into the editor and practice maximizing/restoring
editor views
12. When finished close all editor sessions by:
1. Right-click over a tab and select Close All ➔

Manipulating Views Recording – Download or use Preview


25
 Workshop – Reset your Perspective Reset Perspective Video
When you first start working with a new toolset, it's easy to do things inadvertently. For instance,
you could close views, or resize them – making the windows too small or too big for your task.
The easiest way to restore the entire workbench IDE is to access the Window
menu and use Reset Perspective to returns to previously saved state
 Reset Perspective:
 Close a few Views
 Resize the editor and one other view
1. Left-click the Window menu
2. The click:
– Reset Perspective… Reset Perspective…
RDz v9.5
– At the prompt, click OK

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

2. Close the Properties view

3. Reopen (Show View):


Left-click the Window menu
Click:
▪ Show View >
Remote Systems

Repeat the above steps to re-open


the Properties view
27
 Workshop – Split-Screen (Ctrl+2)
From  IDzClass:
Edit StartApp.cbl
 Press Ctrl+2 (Hold down the Ctrl key and press the 2 key on your PC)
 Double-click the tab to maximize the view of both source files
Unlike ISPF (which only allows you to browse the same source in another split-screen session) you are in
full edit mode in both sides of the split screen
▪ To close the view, click the X in the right-hand corner of the split-screen

 Practice makes perfect: When you have multiple programs open


in Maximized mode you will need to
Click the Restore icon – or double-click
Open MTCHMERG.cbl and split-screen. Close the split-screen. the thin white frame strip at the top of
the Maximized view
28
 Optional Workshop – Split Screen practice
When you're developing/analyzing/editing programs, it can be useful to be able to edit different
sections of your program source
Open TRTMNT.cbl and press Ctrl+2 four (4) times
Note that IDz’s split screen allows editing from either vertical window

 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

With both programs open


in maximized view:
4. Left-click and hold the
left mouse button
down over the
PrintApp.cbl tab as
you drag your mouse
to the right 
5. When your mouse
moves next to the
scroll-bar you will see
two side-by-side
rectangles ➔

6. Release the mouse


button

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

If you are in Maximized mode please see the Note below


Notes
1. this may have seemed like a lot of individual steps, but once you've done the GUI technique a few times,
the motion will become quick, and you'll find it easy to do

2. These are multiple


"physical" windows –
you have carte' blanche
to work with your source:
- Browse
- Edit
All of IDz's tools
are available in either view

 Practice makes perfect


Close Startapp, Printapp
and open:
EBUD01, EBUD02, EBUD03
Create a split-screen view ➔ Note: When you have multiple programs open in Maximized mode, you
must Click the Restore icon (top-right hand corner) ➔
– or – double click the thin white frame strip at the top
Restore the view to a single screen ➔
of the Maximized view to exit from Maximized mode
31
 Workshop – Drag a View outside of the Workbench
You will often want to drag an IDz View completely outside of the Workbench – in order
to make the best use of the graphical/screen functionality
Steps:
1. Restore Down IDz ➔

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

Note: The Outline


view is the simplest way
to move around within
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

From z/OS Projects, open: TEST1.cbl

From the Outline View – do the following:


• Click on several of the COBOL Divisions
• Expand the FILE SECTION, Click on: FD STUDENT-FILE
• Expand the PROCEDURE DIVISION, and click on 200-PROCESS-RECORDS
• Click on and Expand the WORKING-STORAGE SECTION
• Click a line in TEST1 within the editor and note the effect on the Outline View
• Try selecting other program fields and paragraphs

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)

 Experiment with Open Declaration:


Click your mouse in a variable name
Either:
▪ Press F3 …or…
▪ Right-click and select Open Declaration
Repeat F3/Open Declaration with several
variables and Paragraphs from one or
more programs

▪ 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

 Experiment with Back to and Forward to on one or more programs:


 Open any COBOL program and use Open Declaration (F3) to position your cursor on a
variable or paragraph
 Use Back to – to return to the source line where you did an Open Declaration

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?

5. Repeat steps 2 → 4 with the variable: PATPERSN-KEY


6. From the Outline view, navigate to the beginning of the PROCEDURE
DIVISION
7. Click your mouse in the paragraph name: 999-CLEANUP and press F3
8. Click the Back to toolbar icon
9. Click the Back to toolbar icon 4 more times (what happens?)
10. Click the Forward to toolbar icon 5 times (what happens?)
11. From the Outline view, navigate to 100-MAINLINE
12. Move your mouse over the paragraph name in the editor and click F3
13. Click the Back to toolbar icon
14. Close WARDRPT
39
 Workshop – “Most recently opened files”

▪ Steps:
From Window > Preferences
▪ General > Editors
– Change: Size of recently opened files list
▪ Click Apply then Okay

▪ Click File (from the menu bar) and


verify your customizations
40
 Workshop: Show In > Program Control Flow Control Flow Diagram Video
Open WARDRPT.cbl

From the Context Menu


select:
Show in
Program Control Flow

▪ 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 ➔

Size/Resize the graphics in the View


Save the graphic View to disk

▪ 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

Dragging the View below the Workbench


43
 Optional Workshop – Program Control Flow View
Try any of the
techniques
you just
learned
with this
detached
graphical
view + code

Reset your Perspective, then open: MSTRUPDT, BKP92C2, BNCHS602 …


and try out the Program Control View techniques

44
 Optional Workshop – Manipulating Views
▪ From IDzClass:
 Repeat the previous
techniques with NACT01.cbl

 Repeat the previous steps and techniques with DFSIVA34.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

View & Tooling


Functionality

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

Using IBM's zserveros LPAR


 Ensure that your workstation provides free & clear (firewall) access to:
▪ zserveros.centers.ihost.com – and Port 4035
▪ If you are working from a home computer, most likely you'll be able to do access zserveros.
▪ If you are working from an office machine, you need to 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

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

Details on the next slides...

Other modules of this course


will drill deeply into IDz/ADFz
IDz mainframe access features
48
 Optional Workshop – Create a New z/OS Connection to zserveros (1 of 2)
Steps – from the Remote Systems View ➔
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:
 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:
 Mouse-over (hover) help for this connection Click Next >
▪  Verify host name
 Will ping the host name to verify:
▪ Connectivity
▪ Availability of the z/OS machine
49
 Optional Workshop – Create a New z/OS Connection to zserveros (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

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

When you’ve connected to your LPAR through Remote Systems:


Right-click on the connection name
Select Host Connection Emulator
Respond to the VTAM application screen
And Log into TSO
55
 Optional Workshop –
Work in 3270 Emulation Mode
Once connected through
HCE you’ve got carte
blanche to access TSO/ISPF
resources and file assets

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

1. Right-click on MVS Files and select Retrieve Data Set...


2. From the Retrieve Data Set dialog:
▪ Enter an ISPF 3.4 search pattern (* = wildcard text)
▪ Press  Enter
▪ Scroll down in the list to find your PDS, sequential or VSAM
file name
– Note that the files listed in alphabetical order by type (same as RSE)

▪ Double-click to select a dataset


A link to the selected DSN will be inserted into the
Retrieved Data Sets Filter under MVS Files
58
 Optional Workshop – Retrieve Data Sets
From Remote Systems:
1. Right-click over MVS Files and select:
Retrieve Data Sets
2. From the Retrieve Data Set dialog ➔
▪ Type a wildcard Data Set specification
– See the example in the screen capture or use something that
matches the Data Set names in your system

3. Press  Enter
4. Double-click a DSN from the list
▪ Repeat the above steps to add additional DSN links

From Retrieved Data Sets:

• 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

Note that this feature also


works for PL/I and Assembler
However, if Data Studio is
part of your Client installation
this feature may not work 61
 Optional Workshop – Explore the Custom Workspace
Open any of the files under the folders in the Custom Workspace
 Some will have plain-text help-content
 Some will have http:/// URLs
▪ You should be able to launch any of those sites, provided that you have internet-connectivity and that your
company does not URLs firewalled off
 Some will have file:/// URLs.
▪ In order to open those files the URL must point to a filespec you have access to.
▪ Many companies copy the PDFs and other technical Help content from this course to a
shared/network drive and update these URLs so that you can open the files from within IDz
▪ Some links to try

Ctrl+
mailto://

Ctrl+ Google Map

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
®

IBM Software Group

Module 2 –
Editing COBOL Programs
Module 2 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


Review: Tooling Options
There are two approaches
to working on z/OS projects
with IDz
1. Make IDz your default
IDE for the majority of
your work

2. Continue to use a 3270


green-screen IDE – using
Host Connection Emulator,
and use IDz for specific
project tasks and phases:
 Test/Debug
 DB2
 Analysis
 Etc.
66
Review – ISPF Edit using IDz
▪ The IDz LPEX editor emulates mainframe ISPF
New Function keys & the ISPF "Prefix Area" & ISPF Command Line appears

Status line

▪ Note – the same:


 Scrollbars Vertical
 Status line – showing: Scroll
Bar
▪ Current line
▪ Columns
 Command line
 Colorized source
 Prefix area - for
ISPF prefix commands
 PF-key assignment Prefix
Area
 The command line now
works with ISPF commands

 Try: Command line➔ X all ; f ws-ph last 20 50

- 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

Experiment with ISPF F(Find) and C(Change) commands – using F5/F6


On the command line, type the ISPF command shown. Press <Enter> after each
command:
▪ Top
▪ Bottom
▪ Top
▪ Bottom

 There is no Max/PF8 or Max/PF7 option. Instead, use: Top, Bottom – or


as you learned in the previous section: PgUp, PgDn and the Scrollbars
However, your education workspace has Alt+F7 mapped to Top
and Alt+F8 mapped to Bottom
68
 Workshop “No L Locate” – Navigate to a specific source line
▪ Using ISPF you locate a given line by typing Locate, Loc or: L <Line#>

▪ Using IDz (from the command line):


Type (only) the line number
Press <Enter>

 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

Source Navigation Options– Download or use Preview


70
 Workshop – ISPF Command Line Commands (Find/Repeat Find)
 With TRMTRDZ.cbl loaded into the editor, do the following:
- On the command line, type the ISPF command shown and press <Enter>
▪ top
▪ F WS-T
▪ Press F5 several times
▪ Bottom
▪ F WS-T first Hint: Don't forget that – with mouse focus in the
▪ F WS-T last Command line, you can press the Up arrow key
to retrieve the previous command
▪ top
▪ F WS-T 12 20
▪ F WS-T first 12 20
▪ bottom
▪ F WS-T 12 20 first
 Command line
▪ F WS-T last
▪ F WS-T prev
▪ Press F5 several times
▪ top ; F WS-T all
▪ x all ; f ws-t all
▪ Del All nx
▪ undo
▪ RES Note – You can "stack' ISPF line commands by separating
with a semi-colon. But – you also need to type a space
– To reset your source view
(a blank) between the operands and the semi-colon.
71
 Workshop – ISPF Commands: Change, Repeat Find/Repeat Change, Undo, Exclude, Bounds, RES
IDz supports the ISPF change commands and most options and variations.
 Edit TRMTRDZ and try the following ISPF command-line commands:
▪ top ▪ F "Y" all
▪ C row-sub row-idx ▪ F '"Y"' all
▪ undo ▪ Press F5
▪ C row-sub row-idx all ▪ F '01' all 8 12
▪ undo 12 ▪ X all ; f '01' all
▪ C all row-sub row-idx ▪ RES
▪ undo 12
▪ X all ; f '01' all 8 12
▪ C row-sub row-idx first
▪ RES
▪ undo
▪ X all ; f move all
▪ C row-sub row-idx last
▪ flip
▪ undo
▪ RES
▪ top ; c row-sub row-idx 12 40
▪ X all ; f row-sub all
▪ Press F5 then Press F6 ▪ c * row-idx
▪ Continue pressing F5 and F6 ▪ Press F6 a few times
for "discretionary find/change" ▪ bounds 20 40
▪ undo 12
Take another few minutes and use the F
▪ bottom command with the following find operands:
char, suffix, prefix, word,
Editing with LPEX/ISPF Video char, RFIND
72
 Optional Workshop - Combining Regular Expressions with ISPF Command Line Search
Open: TRTMNT.cbl and from the ISPF Command Line issue the following
combined Regex & ISPF Find commands:
X ALL ; F R'IF.*PAT'
– Find lines that contain both if and pat

X ALL ; F R'PIC .9|PIC 9\(' All


– Find all PIC 9 fields

F R'[^\s]' 8 8 prev
– Find the nearest previous non-space character in column 8

X ALL ; F R'PATIENT|SURGERY|COST' ALL


– Find patient, surgery or cost

X ALL ; F R'(MOVE.*WRITTEN.*COUNT)' all


– Find line with: MOVE, WRITTEN, COUNT

Reminder: Both literal values & Regex keywords are case-sensitive


73
 Advanced Regex Workshop – Using Regex Snippets with Expanded Source
Still using TRTMNT.cbl - from the context menu select: Source ➔ Show Expanded Source
1. Open the Snippets view to the Regex drawer
2. Click your mouse in an empty source line
3. Double-Click any Regex Snippet to the empty line – replacing the default Variable Value
4. Copy/Paste the Snippet to
the ISPF Edit command
line

Run the Snippet

Close TRTMNT
Do not save changes

Note that Expanded


Source is a Read-Only
version of your program
– with Copybook files
expanded “inline” 74
Review – ISPF Prefix Area Commands
▪ Most of the ISPF prefix area edit
commands are supported with same
functionality
ISPF Prefix area
commands
▪ For a complete list of supported prefix
commands:
 Place your cursor in the prefix area
 Press F1

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

Editing with LPEX/ISPF Video


76
 Optional Workshop – Change editor background colors 1 of 2
▪ First – open any file in the editor (Calc.cbl will do)
▪ Next, from: Window > Preferences ➔ LPEX Editor ➔ Appearance
Set customized attributes. After each operation, click: Apply - then look at your
editor view

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

IDz supports the following ISPF Picture String editing commands:


▪ P'#' Numeric characters ▪ P'-' Non-numeric characters
▪ P'@' Alphabetic characters ▪ P'<' Lowercase characters
▪ P'$' Special characters ▪ P'>' Uppercase characters
▪ P'=' All characters

 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

Note – this feature is not


available in IDz Version 9.5
82
Optional Review – Switching from LPEX to the COBOL Editor
Open a file with (either)
...the LPEX or COBOL editor)
….from the Context Menu ➔

If you are using IDz v9 you may


open/switch from the LPEX editor to the
COBOL editor from the Context Menu

From within edit on a file:


▪ Right-click
▪ Select:
 Open With
 COBOL Editor
…or…
System z LPEX Editor

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

Set ISPF as the default source editor – video


84
 Optional Workshop – Switching Editor Defaults from LPEX to the COBOL Editor
To set the COBOL (Java/Eclipse-style) editor as the default for Double-Click file open:
 From: Window ➔ Preferences ➔ General ➔ Editors ➔ File Associations
 Scroll to *.cbl
 Select the COBOL Editor and click: Default

File Association Preferences


can also be used to set the
default editor for:
• *.jcl
• *.pli

You can also add custom File


Associations from this dialog

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

Select the JCL Editor


and click: Default

Note that the JCL editor provides:


• JCL Syntax Checking
• Dataset DISP= checking 86
Review Topic – Source Formatting
▪ Source formatting applies rules-based code formatting:
Indents statements
Outlines nested IF statements – showing the nested logic visually
Modifies statement case (upper/lower/mixed/etc.)
▪ Available under the Source context menu for individual
programs opened from Remote Systems or Local Workstation
project, using the dedicated language editors:
COBOL Editor and PL/I Editor
Not in the LPEX editor
▪ To open a file using the COBOL or PL/I editor
Right-click the file
Select Open With >

▪ Formatting rules are configurable:


87
 Workshop – Source Formatting

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

▪ From there you can:


 Left-click and drag to select a rectangle
 Cut/Copy/Paste the selected block
▪ Context menu
▪ Hot keys

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

1. In the Key area, type (lower case):


enter
2. Select openLine from the Action
drop-down list

3. Click Set

4. Click OK

Test out your functionality in the LPEX


editor by pressing the Enter key on any
line
__________________________________

Note that there are lots of other editing


Actions “in the box”. And note that you
can extend these editing Actions by
custom developing your own features.
This would require you to code in
Eclipse/Java plugin. The techniques
are beyond the scope of this course.
92
 Optional Workshop – IDz annotations for modified lines of code
▪ When you make code changes to
files, IDz annotates the changed
lines with light-gray rectangles in
the Annotations area – a white
vertical bar to the left of the Prefix
Area
▪ IDz also retains the original text
for the changed lines which you
can see by mousing over the
rectangles.
▪ In the case of deleted lines, IDz
marks the beginning of the
deletion with an underscore in the
Annotations area 
_____________________________ Original text values in changed lines

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

The Source encoding Cp037 line shows EBCDIC/Hexadecimal values.

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 ➔

Current line ‘s Hex values➔

 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 →)

5. Add a period at the end of the CLOSE statement


6. Enter a blank line in place of the current CLOSE
statement in 300-WRAP-UP

7. Use Content Assist to select:


7a.
7a. PERFORM
7b. Your new paragraph name
- Note that you may have to hit Ctrl+Spacebar
twice to get to the Template Proposals 7b.

97
Workshop – Content Assist – 2 of 2
Open TESTDATA.cbl
▪ Are there any existing syntax errors? If so, what are they?

Open TRMTRDZ.cbl – and using Content Assist:


▪ Add a new (short) paragraph (see 050-INIT … below, as an example)
▪ Add an INITIALIZE statement – use Content Assist to find variables
▪ Add one or two other COBOL keywords
▪ From within 000-HOUSEKEEPING, add a PERFORM statement that branches to the
new paragraph

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

▪ From the Context Menu –


select:
Source ➔ Uppercase all

Verify that Variable Names, Paragraph Names and Keywords were
changed to Upper-Case – but not Value Clauses, Comments or Literals
99
 Workshop – Show Expanded
and Comment/Uncomment

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

Close and do not save your changes.

** 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

6. From inside the source file:


- Find the 200-PROCESS-RECORDS paragraph
- Click your mouse inside the paragraph name
- Right-click and select: Open Perform Hierarchy
- Expand the entries – and consider how the Perform Hierarchy is different from the Outline View

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

▪ Open the Context menu,


and note the JCL-specific
functions
 We will cover these once
you connect to an LPAR
102
 Workshop: Editing JCL – 2 of 2
▪ Right-click from the
Context Menu
▪ Open and experiment
with the various Filter
views:
EXEC statements
DD statements

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

Hex Isolate Block


Edit Step Rectangle
editing
toggle

 Other options (next slide)

 You can toggle back and forth between


the dedicated JCL and LPEX editors from
the Context Menu – or you can
Open With…
104
 Workshop: The JCL Editor
From either your mainframe connection or the IDzClass project:
▪ Open the  jcl folder and open SAMCMPLK.jcl using the JCL Editor and do the
following:
Collapse/Expand the job steps
Experiment with the toolbar options:
▪ Toggle Hex
– On then off
▪ Click your cursor into a JCL step, and try: Show source of selected element
▪ Toggle Block (rectangle edit) mode
– On then off
Make a syntax error in any of the statements
▪ Note the error message(s)

▪ Hover over the syntax error and solve it using Quick Fix

In a subsequent course module you will see how to:


Submit JCL
Open mainframe QSAM files from within JCL
105
 Workshop: The JCL Editor – Validate JCL (IDz v14)
1. Open a JCL file from Remote Systems
2. Right-Click and select Source > Validate JCL

You will be prompted


to run either a
TYPRUN=SCAN … or
a DSN validation

DSN validation errors ➔


106
 Optional Workshops: Editing JCL – 1 of 2
From either your mainframe connection or the IDzClass project:
▪ Open the jcl folder and open BNCHMRK.jcl and explore (note) the JCL statement colorization
▪ Use the Outline view to navigate within the JCL
▪ Right-click in the JCL and select Filter and experiment with the Filter options (try several out)
▪ Add a comment line
▪ Modify an EXEC statement – or DCB parameter on a //DD statement
▪ Move your cursor to the next line - note the syntax error
▪ Press Ctrl+z (undo) and close the file

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)

▪ Modify a DSN= statement to point to a


QSAM file, or PDS member
A small test file – pleas

▪ Select the filename, Right-click and


select Open Member

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

▪ From the Context Menu select: Start Flagging Changed lines

▪ Type in some 6-character comment and press OK

▪ Modify code, and arrow down through the source file


How did we get
the comments
to appear in
columns 1 ➔ 6?

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

Note that adding Language Profiles and associating extensions you


could add your own Auto Comment capability for languages such as Autocomment
CA-Easytrieve, REXX, CLISTs, etc. Changed Lines Video
111
Optional Workshop Optional Topic –
Auto Commenting Changed Lines in COBOL – 3 of 4
▪ Under the Format tab, specify the options shown here ➔
 To enter an 8-character Auto Comment

▪ Under the Insertion tab, specify:


 Start column: 73
 End column: 80

 Optionally check Overwrite existing

▪ Click OK twice – to close this dialog

If you want to insert in columns 1 thru 6 use


these specifications (and set Max length to 6)

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

Note – if you want to stop Auto Commenting, from the


Context Menu select:
Change Flag > Stop Flagging Changed Lines

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

▪ Do this by saving your Perspective:


From Window
Select Save Perspective As...
And either:
▪ Provide a new Name:
▪ Over-write the existing Name

▪ Consider saving with a new name, because when you Reset


this Perspective, all of the Views will rearrange themselves to
the last Saved Perspective state 

114
 Optional Workshop–Uppercase COBOL & JCL Source Code Upon Save

Many shops have coding standards to UPPER CASE all COBOL


statements:
 COBOL verbs
 Variables and paragraph/section names should be upper case
 But Comments & Literals should be left “as is”

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

 Check the On save actions for COBOL & JCL


115
 Optional Workshop – GUI Copy/Overlay Text Technique
If you copy and paste using
LPEX (or the COBOL/PL1 Editors)
you will displace existing text to
the right. The easiest way to
overlay existing text in a line:

1. Select/Copy the text on line1

2. Select the area in line2 to be


overlaid

3. Paste - the selected text is


overlaid in line2

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

▪ Hold down the Shift Key and Left-click –


to select a block of code

▪ With the block selected, you can:


 Delete - the selection
 Copy - the selection
 Overlay existing code - with the selection

To copy or overlay, first move your mouse to Byte1/upper left-hand


corner of the new (target) block – then select Copy or Overlay
118
Optional Topics: IDz’s Code Reuse Options
Three methods of Code Reuse using IDz/ADFz/IDz:
1. Program Templates
▪ Useful if creating a new COBOL or PL/I program using the New program wizard
▪ Can include standard (not customized) minimal CICS and SQL statements
2. Snippets
▪ Most flexible and simple method of code reuse
▪ Snippet scope can be from anywhere from a keyword to an entire program
▪ Can define any number of custom variables to manage idiosyncratic requirements
▪ Can export/import Snippets with Workspace
▪ Can include Snippets view in custom Perspective
3. Language/Code Templates
▪ Most granular form of code reuse
▪ Integrate with Content Assist
▪ Typically used for statements – but could extend to large code samples
Snippets are the most popular approach – although Language/Code
Templates provide powerful, intuitive workflow

Code Reuse “How to” Recording – Download or use Preview


119
Code Snippets
Sometimes during development you might want to:
▪ Save some code temporarily for reuse – similar to the ISPF:
"CREATE" and "COPY" command line commands
▪ Create a paragraph, computation, complex conditional – that can
be re-purposed in other programs
▪ Provide a library "standard" routines – using your shop's coding
conventions
▪ Provide a library of syntactically-correct and infrequently
used/high-value statements:
 Job Cards
 Database routines
 Complex COBOL code: UNSTRING etc.

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

On the right are a group of custom Snippets that we have created.


You will see a subset of these in your workspace.

Individual Snippets are contained in "drawers" which are the


accordion menus that collapse/expand on-click.

Snippets can be Exported and Imported (for sharing)


120
 Optional Workshop - Using Code Snippets (ISPF "COPY" command)
To use an existing code Snippet follow the steps below:
1. Place your cursor at
the exact focal point
(position in the source)
where you want a
code snippet inserted

2. Find your Code


Snippet in the snippet
drawers

3. Double-Click the
Snippet

4. If there are variables


in the snippet, you
can:
 Accept the defaults
 Over-ride the values
before the code is
inserted

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…

Note that you can also


Import existing
Snippets & Categories

IDz/ADFz/IDz Snippet Samples – Download and Import


122
 Optional Workshop - Snippets for ISPF "CREATE" command line command – 2 of 2
4. Rename the Snippet and give it a Description
5. Optionally add Variables to be filled in by Snippet users (or they can accept the defaults)
6. During an edit session, find the Snippet within the Snippets drawer and Double-click into the code

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

To use the Job Card Snippet


▪ Open a piece of JCL that does not currently have a Job Card, and set your cursor focus to line 1/byte 1
▪ From the Snippets view, Expand the JCL category. Find and double-click your JOB Card Snippet
▪ At the prompt, enter a new JobName and a new MsgClass value and click OK and verify your work
▪ Verify your work
▪ Submit the job

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>.

▪ Test your work out in one of the


sample programs, like: PATLIST.cbl

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

 From File, New > Other…


…in the Wizards panel,
- Type: cobol
- Select COBOL Program
- Click Next >

…in the COBOL Program panel,


- Name the Program
- Click Next >

▪ Finally you specify which folder to create the program:


 Select the cobol folder
 Click Next >

Note – You can create new programs

128
 Optional Workshop – Create New
Programs From Templates – continued
You can add CICS or DB2 template
sample code to your new program:

Check the features you'd like


Click Finish

▪ A few things happen:


Your new program is created ➔
The Snippets view is opened
▪ Snippets information can be found
in Appendix B of these slides

 Note that you can customize the


templates used to create new programs
From Window, Preferences, select:
COBOL
– Code Templates
– Features
129
Optional TOPIC – Create New Program in a z/OS LPAR
▪ You can create new programs using the New COBOL Program wizard,
provided you are connected to a z/OS LPAR, and that you have created a
z/OS Project/MVS Subproject (see Location: in the screen capture below).

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)

▪ You can insert


Variables that
are filled in
when new
"templatized"
programs are
created
131
Optional Topic: Customize the New Program Templates – Program Code
And you can add
your own entries,
common files,
databases,
variables, routines
etc. to either:
▪ An entire program
▪ Separate program
divisions

When a new
program is created
using the
templates all of the
custom comments
and code are
inserted.

132
®

IBM Software Group

Module 3 –
Analyzing COBOL Programs
Program Analysis Topic Video
Source Analysis Videos: ISPF Command Line Search Video

DevOps

© 2019 IBM Corporation


 Workshop – Establishing the SYSLIB Search Path for Copybooks & Includes

4. Right-Click on MVS Files

2. Enter the DSNs for your Copybook & Include libraries


– Each DSN separated by a space

3. Press Ctrl+S (Save) your Property Group edits

5. Select Property Group >


Associate Property Group…

Check the  Property Group name


▪ In order for IDz to find the
correct Copybook & Include 1. From Property Group Manager - Right-Click on your Connection and select
files for your edit sessions New Property Group…
you will create a SYSLIB
concatenated search path
to your Copy libraries
134
Review – Find/Replace Dialog
Besides the ISPF Find/Change
command, there are other
ways to search and replace
text within a file

From anywhere inside your


source, press:
Ctrl+F …or… Ctrl+f

Brings up the following dialog


with find options ➔

1. Enter Find and/or Find option checkboxes:


Replace value
▪ Case sensitive – case sensitive search
2. Check one or more ▪ Whole word – finds your text delimited by spaces or dashes
search refinement ▪ Regular expression – powerful search meta-language – for complex find
options ➔ operations
▪ Wrap – if starting mid-way through source, continue find from the top
3. Press a Find button ▪ Peek: Shows specified number of lines of source after the found element
(covered on the next slide) ▪ Restrict search to columns – search between start and end columns only

Ctrl+F Search Within Edit Video


135
 Workshop – Find/Replace Dialog
Load SANDBOX.cbl into the editor
▪ Press Ctrl+F
 Search for All 01
 Note that this found a bunch of comment lines. Why?

▪ Restrict the column search to between 8 and 20


▪ Find All: 01 (again)

▪ Expand some of the plus-signs


▪ With your mouse-focus in the code, press: Ctrl+W
… What does Ctrl+W do?
136
 Workshop - Find/Replace Dialog – continued
▪ With SANDBOX.cbl still in the editor, experiment with the Find/Replace options and option
buttons covered on the previous Find/Replace Dialog slides. After each search press Ctrl/W.
Here are some suggested steps:
 Use Find All to search for the following from the Find/Replace dialog
▪ date
– Check  Case sensitive – and rerun this search.
– Then un-check Case sensitive
▪ code Check  Whole word and rerun this search. Then un-check  Whole word and note the different results
▪ Experiment with your own searches, using these Find/Replace options:
 Case sensitive
 Whole word
 Select found text
 Replace
 Replace All
 Previous
 Next
 Next (combined with)
▪ Replace
(This is like PF5/PF6)

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

▪ Check  Regular expression

▪ Enter the following find expression:


row-sub|records-written
▪ Click: All

Note that the single pipe separator | is a logical "OR" operator

▪ 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

▪ Find all numeric variables in a COBOL program: PIC .9|PIC 9\(


▪ Find all lines that reference any of three wildcard strings:
pat-records*|records-writ*|error-fo*

▪ (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]

Note – the COBOL Editor


(see Appendix B) can be
use to effectively search
for specific Hex (binary)
values in EBCDIC.

The LPEX editor's regular


expression search is for
ASCII hex characters 141
Review – Regular Expressions used to Support ISPF Find "Picture Strings"
ISPF Editor LPEX Editor . Dot, any single
Simple String Y character
Previous String Find Previous / F5
Delimited String Y
^ logical NOT \ special Expression
Text string Y
Picture Strings – special characters Y – with regular expressions
\x Hexadecimal
P'=' – any character Ctlr+F,  Regular Expression, .
P'-' – any non-blank character Ctlr+F,  Regular Expression, [^\x20]
P'.' – any non-displayable character Ctlr+F,  Regular Expression, [^\x20-\x7E]
P'#' – any numeric character Ctlr+F,  Regular Expression, [0-9]
P'-' – any non-numeric character Ctlr+F,  Regular Expression, [^0-9\x20]
P'@' – any alphabetic character Ctlr+F,  Regular Expression, [A-Za-z]
P'<' – any lower-case character Ctlr+F,  Regular Expression, [a-z]
P'>' any upper-case alphabetic character Ctlr+F,  Regular Expression, [A-Z]
P'$' – any special character (not alphanumeric) Ctlr+F,  Regular Expression, [^A-Za-z0-9]
Ctrl+F

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

Note that IDz implements


"Java" regular expressions
143
 Optional Workshop – Find Binary
(Hex) characters within a source file
Problem – Find non-display (Hex) characters
inside of a program source file

Steps:
Open With – the COBOL Editor ➔
Ctrl+F
In the Find box type \x then your EBCDIC hex character

Content Assist (Ctrl+Spacebar)


will show you the Find options
_________________________
1. Left-click the down arrow
2. Press Ctrl+Spacebar

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

Open CBLEX.cbl and filter Embedded SQL/CICS/DLI


Ctrl-W re-displays filtered source lines

 Filtering selected text


 Open TEST1.cbl
 Double-click & select a variable
 Right-click, and from Selected >
choose Filter selection
 Examples:
▪ Reserved words: WRITE, IF, MOVE
▪ Variables: CTR-COURSES, SR-NAME
▪ Literals (with single quotes): 'Y'
▪ Paragraph: 230-READ-A-RECORD

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

Control Flow Diagram Video


Control Flow Diagram and Perform Hierarchy Video
149
Review - IDz's Code Execution Flow Tools
Often you will need to discover a program's control flow (business logic) by tracing
through a PERFORM chain, following GO TO statements or tracing program
CALLs, in order to understand the code, track down the cause of an ABEND, etc.
You have two choices for logic flow analysis tooling (note that you can use both
together to obtain maximum logic coverage)
1. The Program Control Flow diagram – covered in an earlier module in this course
2. The Perform Hierarchy
Which of these two you choose depends on what you're trying to do:
Control Flow Perform Hierarchy
Diagram
Illustrate PERFORM chain X X
Illustrate GO TO statements X X
Illustrate Fall-Thru potential Y – Does not Y – Highlights potential
highlight Fall-Thru Fall-Thru
Include CALL statements in control flow display N Y
Show when logic branches occur in N Y
conditional expressions
Externalize (save) logic flow diagramming Y N
result
Synchronize with source code in the editor Y Y

Show iterative paragraph and Section loops N Y


150
 Workshop – Program Control Flow
Edit WARDRPT.cbl
From the Context Menu click: Show In ➔ Program Control Flow – then do the following:
▪ Go to full screen on the Control Flow diagram and click Zoom to fit
▪ Left-click any paragraph in the Control Flow diagram
▪ Move the source code window outside of IDz
▪ Right-click on 200-NEW-WARD and select: Show Program Control Flow From Here. Zoom to fit
▪ Right-Click/Show All.
▪ Use Show Program Control Flow From Here on 200-NEW-WARD and 300-NEW-ROOM
▪ Show Program Control Flow To Here on: 700-WRITE-PAGE-HDR then on 850-CLOSE-FILES

Control Flow Diagram Video 151


 Optional Workshop: Program Control Flow - Walk-thru
1. Open TRMTRDZ.cbl in the editor
2. From the Outline view, click on the 100-MAINLINE paragraph
3. Double-click on the 100-MAINLINE paragraph name in the editor
4. Right-click and select: Open Perform Hierarchy
5. Expand all paragraphs displayed in the Perform Hierarchy
6. Scroll up to the top of the Perform Hierarchy Paragraph Names List
7. Double-click five or six of the paragraph names in the Perform Hierarchy –
and note how the editor window code synchronizes with the paragraph
name reference in the Perform Hierarchy view
8. To view the source-level declaration for one of your selected paragraphs
(From the Perform Hierarchy):
▪ Double-click (to select) a paragraph name - (From in the source editor):
Press F3 –or use the Context menu to navigate to the paragraph
9. Optional - To return to your place in the Perform Hierarchy and analyze
more of the program's procedural flow, double-click another paragraph
name entry in the Perform Hierarchy Paragraph Name list

Combined Control Flow Diagram & Perform Hierarchy Video


152
 Optional Workshop – Program Control Flow on a complex program
Experiment with walking thru NACT01.cbl using the toolbar
and Context Menus. Also make use of the source view
 IDzClass
➔ other language files and examples
➔ CICS application ➔
➔ cobol ➔ NACT01.cbl.

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

In IDz v14.0 Show In


➔ Data Flow is not
available for CICS or
DB2 programs.
Data Flow became
available for CICS &
DB2 programs in 14.1
156
 Workshop – If you are using IDz v14 or later
Show In ➔ Data Flow for TEMP-INDEX in GAM0VMI.cbl.
▪ Click different variables in the graphic
▪ Experiment with the Toolbar
▪ Move the program source outside of the workbench
▪ Mouse-over the lines between the nodes to view the statement
▪ Show Data Flow for: 01 SELECTIONNUMBER (the workshop continues on the next slide)

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

Data Flow for SELECTIONNUMBER


in GAM0VMI.cbl

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

Occurrences in Compilation Video


159
 Workshop – Data Flow Analysis – continued
4. Double-click each line in the Search View – the source code will synchronize in the Editor

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

3. Click the icon on the far-right: Pin the Search View


• This will "persist" this view – so that you can continue to use its search results
while opening additional Search views against other variables

4. Double-click the last entry in the search list (line 5731)

5. From the statement in line 5731 Left-click your mouse in FE-SUBSC


(the subscript)

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

8. From the FE-SUBSC Search view:


• Click several hyper-links – and scroll within the window – and click hyper-links…
• As you did previously for the other Search view: Pin this Search view
9. From the next to last entry in the FE-SUBSC Search view (line 11866):
• Open another Occurrences in Compilation Unit on: FE-CAL-CODE
10. Left-click on the FE-CAL-CODE Search view tab. Hold, Drag & Drop
the view to the right of the COLR-DIV-CLI-3 Search view
Occurrences in Compilation Unit used with Paragraphs and Sections
6. Do an Occurrences in Compilation Unit search on the following:
• 8650-REPORT-O6
• 9000-DATE-PROCESSING
• 800-WRITE-WREHOUSE-MASTER

Close all of the Search views when you are finished


164
 Optional Workshop – Setup and use a Data Flow Analysis "Dashboard"

• Occurrences in Compilation Unit


• Used to research variable and paragraph usage throughout a program
• The search result windows may be manipulated inside & outside of
the Workbench to provide a Data Flow Analysis dashboard

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

“Identify Unreachable Code”


166
Download or Preview video
 Workshop – Identify Unused Variables (“Dead Data”)
Open TRMTRDZ.cbl – and from the Context Menu:
 Refactor ➔ Identify Unused Variables ➔ Highlight Unused Variables

▪ Use markers in the right-hand editor border to navigate to the unused ➔


variable declarations
▪ Experiment with: Remove Unused Variables

“Identify Dead Data “


Download or Preview video 167
 Workshop – Scan For Compatibility
▪ Scan for Compatibility detects when a calling program is passing incompatible arguments to
a called program. For example, one COBOL program might call another program using a
100-byte argument while the program expects a 200-byte argument.

From \IDzClass\cobol, select: TRTMNT, DTEVAL, STRLTH


Note: Hold down the Ctrl key while you Left-click to select the files
▪ With all three files selected, Right-click over any one
of the programs and select: Scan for Compatibility
If there are errors, they will display in the
Error List View
Double-click an Error
Read the messages
Note that the error could be either in the called/calling program.
Your application specs tells you what needs to be changed

(Time Permitting) - Experiment with EBUD01, EBUDE02 & EBUDE03.


Modify the Calling Parms

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

This will launch a search for WS-PHARMACY-CHARGES


throughout your program, and save the search results
in a new persistent view

3. From the Search View, click: Pin the Search View – This keeps the view intact, when you
launch additional searches

Search ➔ Text ➔ File provides hyper-linked, pinned results


based on text patterns
170
and incomplete variable names
 Optional Workshop – Data Flow Analysis using Search/Text/File - 2 of 3
4. Double-click each line in the Search View – the source code will synchronize in the Editor

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

Click this Red X to delete the


results (and associated
source tags)

▪ 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

This runs Code Review

▪ Expand and Double-click any of


the Performance or Program
Structures points-of-interest
▪ Have a look at the COBOL
Software Metrics

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

▪ Expand COBOL Code Review


▪ Check a few of the available default rules in
the three ruleset categories:
1. Naming Convention rules
2. COBOL performance and run-time efficiency rules
3. Code maintainability ("Program Structures") rules

▪ Click Close and Yes – to the


"Save changes?" prompt

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

When the analysis process finishes:


• Browse several of the results
• Expand the categories
• Double-click a broken analysis rule –
What does this do?

Do not delete the result

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

▪ Note what happens:


 Any statement that "breaks"
a rule is:
▪ Flagged
▪ Hyperlinked

▪ Navigate around in the results


a bit until you get the idea behind
Code Review

▪ Click the Red X icon in the view,


to delete the Code Review
analysis

179
 Optional Workshop – Software Analyzer (Custom Rules and Categories) – 1 of 4

From Window > Preferences >


Software Analyzer > Custom Rules and Categories

• Either Add a Custom Category

• Or Add a Custom Rule

• Select the Category (Ruleset) for your new Custom Rule


• Click Next >

Note that if you define a Custom Category it will appear in


this list
180
 Optional Workshop – Software Analyzer (Custom Rules and Categories) – 2 of 4
• Select the Custom Rule and click Next >

• Specify the: input factor for the Custom Rule


• The level of importance (severity) of the rule

• 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…

You will see your new Custom Rule


(and Categories) in the Rules tab ➔

182
 Optional Workshop – Software Analyzer (Custom Rules and Categories) – 4 of 4
A few of the other
Custom Rules definitions

SQL statement types that


require a WHERE clause

88-levels must follow


this naming convention

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
®

IBM Software Group

Module 4 –
Remote Systems: Connect, Navigate & Search

Module 4 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


(Review) How do I Use Remote Systems to Access and Edit Source?

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

Successful Connection Result

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

 Workshop – Using the dataset


characteristics of an existing COBOL PDS Allocate
Like ... two new libraries:
- <HLQ>.TEST.COBOL
- <HLQ>.TEST.COPYLIB

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

 Repeat the above steps to transfer


all of the copybooks from the  copy
directory in the IDzClass project to
your new COPYLIB PDS on the mainframe

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

▪ When you are finished expand your mainframe PDS datasets,


check to see that the files were successfully copied up to
the mainframe
 And double-click to open a file from each library

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…

2. Name your Dataset – click Next >

4. Specify:
Space Units: TRACKS
Primary Quantity: 30
Secondary Quantity: 20
Directory Blocks: 30
3. Select:
Category: SOURCE
Type: COBOL

Click Next >

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

• Press Ctrl+S To save your Property Group edits


197
 Workshop – Configure SYSLIB
for Program Copybooks – 2 of 2
Once your Property Group has been
edited, you need to assign (Associate)
it to MVS Files in Remote Systems

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

Test your work:


 Open <USERID>.TEST.COBOL(TRTMNT)
 Find and Open a Copy file
 Check variable references:
▪ Scroll to find some variable defined in a
copybook
– PATIENT-ID, VALID-BILLABLE-TYPES
▪ Right-click over the variable name and
select Open Declaration
198
 Workshop – Configure the Property Group JCL Job Card – 1 of 2
You will also need to provide a valid Job Card to run any JCL that IDz submits
for you on your LPAR
Step #1 – Copy a working JOB Card
▪ Expand MVS Files
▪ Find and open one of your existing JCL files
From within the open JCL file:
 Select your Job Card
▪ All parts of it: //JOBLIB, etc.
 Right-click and copy the selected text into the Windows paste-buffer

199
 Workshop – Configure the Property Group JCL Job Card – 2 of 2
Step #2 – Paste the Job Card text into your Property Group

Copy a Job Card that works on your LPAR to here

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)

1. Click the JCL tab

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

From within your expanded source library:


▪ Select a program
▪ Right-click over the program (member) name and look over
the Context menu options
▪ Do the same for a JCL file in your JCL library
 Note the differences in the JCL
Context menu options

▪ Experiment with: Locate…


 Right-click on any library
 Select Locate…
 Type in a few letters
Don’t use asterisks – just letters/numbers

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?)

 Right-click again over TEST.COPYLIB and select Locate…


 Open the drop-down box and re-select: DFH
▪ Press Enter

Return to Window > Preferences > Remote Systems > z/OS > MVS Files
and set your Default Page Expansion size to: 500

Using Locate in a Large PDS Video


202
 Optional Workshop – Open the Remote Edit History View
Remote Edit History is like “most recently used files” from the Files menu.
But it includes:
Location
Last Mod
LPAR

From the Window menu


1. Open the view
2. Save your Perspective

• Double-Click to open a file


• Right-Click (Context Menu) has additional actions
203
 Optional Workshop – Locating members in large libraries
▪ Right-click on MVS Files and select Retrieve Data Set...
▪ Type: DDS0001.BASTAGE1.SRCE
• Press Enter then OK
1.
▪ Expand Retrieved Data Sets
▪ Right-click on DD0001.BASTAGE1.SRCE and press Locate...
▪ Type TR in the Member name and press OK
What happened?

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

Videos on Remote Search


Remote Search video
Using Search to Subset Member Lists of a Large Library video
Replace Contents of PDS Members using IDz Search video
Display PDS Members by Last Modified Date – Download or use Preview
206
Review: Remote z/OS Search – Options in the search Dialog
▪ Hyper-text linked Search Results
▪ Hover/Peek into Search Results Type of Dataset ➔
▪ Search specifically for: Member name pattern ➔
 Text patterns within libraries Search for text pattern ➔
 Text patterns within sequential datasets
 EBCDIC (hex) values
 Specific library members
 Specific data sets:
▪ QSAM (Sequential) Files
– File Manager can be used to search
in VSAM files & DL/I Databases
What DSN or what selected
▪ PDS members with a wildcard DSNs to search ➔
name pattern
▪ Can Filter result set lines
▪ Buffer search results view build-out
▪ Search using Regular expressions
▪ Change "search for" criteria on-the-fly
▪ Cancel long-running searches
▪ Save Search results Search Dialog Options
▪ Save combine with update for
Search/Replace
▪ Leverage the name and Results view
for functionality
207
 Workshop – Customize Search Preferences
Before you begin the Search workshop, customize your
Search dialog preferences:
1. Right-click over any dataset, and select Search…
2. From the Search menu, click Customize
3. From: Search Page Selection – select only:
 Remote z/OS Search,  File Search,
 Remote z/OS File Search,  Endevor Search
Click OK
4. Shrink the Search window to a reasonable size/proportion 1.

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

• Right-click on a source library and select Search...


• Enter diag in Content strings: and press Search
When the search finishes:
– Expand one of he result-files
– Double-click a statement in the expanded list
– Enter move in the Filter:
– Expand the list, double-click a line

• Search against one or several of the


other libraries on your ID:
<HLQ>.TEST.COBOL
<HLQ>.TEST.ASM
<HLQ>.TEST.JCL As an alternative workshop,
<HLQ>.TEST.COPYLIB Search one of your TSO libraries.
<HLQ>.TEST.BMS
Note that these should be small-
When each search finishes: ish libraries (less than 1,000 total
• Expand a result file PDS members)
• Double-click a line
• Filter the list
209
 Workshop – Preview/Peek Results Lines
After completing a successful search. Expand a file in the Search results and
Hover over a line…

210
 Workshop – Saved Search Query
▪ From Remote Systems:
 Select and Search… for: *AMOUNT* in:
▪ <HLQ>.TEST.ASM
▪ <HLQ>.TEST.BMS
▪ <HLQ>.TEST.COBOL

▪ Search and Save Search Query:


 Select and Search… for: *PHARM* in:
▪ <HLQ>.TEST.BMS
▪ <HLQ>.TEST.COBOL
▪ <HLQ>.TEST.COPYLIB
▪ <HLQ>.TEST.ASM
 Save this search

 From Remote Systems Explorer,


Re-run (Double-click) your saved Search Query

 211
 Workshop – Remote z/OS File Search
From the Search menu select: Remote z/OS File Search

▪ Enter a Search string


using any combination of:
 Plain-text
 Hex search
 Column-based searches

▪ 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)

▪ Expand several files


▪ Hover over the individual
lines (points of interest) in
the file
▪ Double-click to load the file
into the editor and position
the cursor on a specific line
▪ Re-sort Search results by
columns (Last Modified…)

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)

 Reset the Search options:


• Increase the results limit to 10,000
• Run the previous slide’s workshop
• Check Case sensitive ... and ...
• Experiment with case-sensitive searches

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

2. Using Search and Regular Expressions, find


out what COBOL programs in a library would
be affected by a change to one or more
copybook members ➔

3. Using Search and Regular Expressions, find


out what batch JCL jobs in the JCL library
would be affected by a change to datasets
(you can search on the DD name of any part
of the qualified DSN) ➔

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.*)

Note: Regular expression member name searches are CASE SENSITIVE

Right-click over any of your Datasets and


select Search
▪ Specify:
With name: C*
Content strings: DISP=OLD

 Other contexts: SYS1.PROCLIB


217
 Optional Workshops – More Searching with Regular Expressions
• Search for all lines in COBOL programs in <HLQ>.TEST.COBOL that contain the content
strings: MOVE and RECORD-TYPE:
MOVE.*RECORD-TYPE
Add COMPUTE statements into the above
Regular Expression search

If you are using zserveros


• Search for the Regular Expression
Content string in a Load Library:
- use DDS0001.TEST1.LOAD

• Search for all libraries whose name


ends with: BNCHMARK.COBOL
- Select MVS Files
- Search as follows ➔

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

You may have some 3rd Party


product – or ISPF Dialog
Manager search panel that
allows you to search
through datasets within
columns

IDz supports Column-wise


searches using the Remote
z/OS File Search option ➔

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
®

IBM Software Group

Module 5 –
Remote Systems Dataset Access & Organization

Module 5 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


 Workshop: Create a Custom MVS File Filter – 1 of 2
1. In the Remote Systems view, under the connection name, right click MVS Files and
click New > Filter…

2. In the Filter string field of the New Filter window, type an uppercase filter string 1.

RTPOT40.COBOL.*

MVS File Filters create persistent organizers


for z/OS files with Data Set names that
match a wildcard pattern: xxx.*.xxx*yy

2. RTPOT40.COBOL.*

Filter that will show all of


user: RTPOT40’s
COBOL datasets

Click Next >

Create MVS File Filters Video 223


 Workshop: Create a Custom MVS File Filter – 2 of 2
3. In the Filter name field, type a name
for your filter and click: Finish

4. Expand the filter. You have access to


all Datasets appearing in the filter
that you have RACF-permission for 3.

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.

 From Remote System Explorer:


1. Select the MVS File Filter you wish to extend
2. Right-click and select Properties
3. From the Properties for … dialog:
▪ Select Filter Strings
▪ Click: New filter string and type in additional filter string
wildcard text:
– Adhere to the Filter String coding rules described on the previous slide

▪ 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

You can save Regex Searches:

Save the Search Query

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

Note that this search does not


hit z/OS. It utilizes locally-
cached member names to
229
return search results
Review – Retrieve Data Set…
Similar to ISPF 3.4, Retrieve Data Set… creates a
list of accessible Dataset names
Unlike 3.4, the DSN list produced by the Retrieve
Data Set search persists
You create the list using either DSNs or DSNs
mixed with the asterisk (*) wildcard character

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.*

Retrieve Data Set Video 231


 Workshops – Retrieve Data Set… 2 of 2
From Remote Systems:
▪ Repeat the previous steps to add other DSNs to
the Retrieved Data Sets Filter – for example:
SYS1.P*
▪ Check “Add these matches to a new filter”
▪ Find your new SYS1.P* Filter in Remote
Systems Explorer, and verify search results

Retrieved Data Sets Filter


▪ From the Retrieved Data Sets filter in RSE:
Expand a PDS that was returned from the
search
Open (edit) a PDS member
Right-click over Retrieved Data Sets and
select: Show in Table

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

2. Fully-qualified member name use case:


 Right-click over MVS Files and select Find Member
 Specify the pattern: <HLQ>.TEST.COBOL(TEST1)
and press  Enter
 Double-click the member name

3. Create new member use case:


 Right-click over MVS Files and select Find Member
 Specify the pattern: <HLQ>.TEST.COBOL(NEWPROG)
 Click Open
 Click Yes – at the prompt

234
 Optional Workshop – Dataset Mapping
Do this workshop only if you are using
RDz v9.5 or IDz v14.1 **

From Remote Systems ➔


Map a PDS (Library)
• Select a file
• Right-click
• Select Properties
• Select Mapping
• Click OK
• Verify the mapping by
opening a PDS member

Map a PDS Member


• Expand a PDS
• Select a member
• Right-click
• Select Properties
• Select Mapping
• Map the PDS member
• Click OK
• Verify the mapping by opening the mapped file

** If you are using IDz v14.1.2 or later, the


product automatically Maps files upon open
235
 Optional Workshop – z/OS File System Mapping
From Remote Systems Explorer:
Right-Click over your <HLQ>.TEST.COBOL Dataset and using Allocate Like… allocate a
new Dataset named: <HLQ>.TEST.SRCELIB
Copy several of the COBOL programs from <HLQ>.TEST.COBOL to <HLQ>.TEST.SRCELIB
Copy one of the Assembler programs from <HLQ>.TEST.ASM to <HLQ>.TEST.SRCELIB
Open/Edit one or two of the programs in <HLQ>.TEST.SRCELIB – notice anything?
▪ Following the steps in the previous slides create z/OS File System Mappings for:
▪ DDS0001.TEST.SRCELIB ➔ cbl
▪ When you are finished creating the File System Mapping,
double-click(to open) one of the COBOL programs you copied in.
▪ Then double-click the Assembler program – (Hmm… notice anything?)
▪ Right-click over the Assembler program and from Properties, specify:
– Extension: asm
– Transfer: text

▪ Open the Assembler program again. (Better?)

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

If you’ve already defined SYSLIB for your Property


Group you can skip this exercise/slider

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.

From your Property Groups - From the JCL tab


1. Customize the JCL job card
2. Add a Data set (library) for generated JCL
3. Enter the DSNs for a concatenated PROCLIB search path

1. If you are using your


shop’s mainframe you
will need a valid Job Card

2. Enter the DSN of one


<USERID>.TEST.JCL
of your JCL libraries. ➔
This is used when
generating Build and
zUnit JCL
3. Enter the DSNs of your
 MVS PROCLIBs
239
 Workshop – Assign a Property Group to MVS Files in Remote Systems
After you’ve specified SYSLIB for COBOL and PL/I Copybooks, Includes and DCLGEN libraries, and customized
the JCL tab (previous slide) you need to assign or “Associate” your Property Group with MVS Files.
An important point – Different Property Groups can be assigned to different PDS Members, PDS
Libraries and MVS File according to the specific requirements/needs of the source files.

To assign a Property Group as the default for your


connection:
1. Right-click over MVS Files
2. Select Property Group ➔ Associate Property Group...
3. Check the box next to the Property Group name you want
4. Click OK

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

From Remote Systems:


▪ Double-click and open a COBOL program with Copy file references
TRTMNT.cbl, PARTSUPP.cbl, etc.
▪ From Edit, right-click and select: Filter view ➔ Copy Statements
Copy files that are not found in the SYSLIB search path will have error messages

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

1. Open Copy Member


▪ From within edit on a program:
Select (double-click) a Copy or
Include statement
From the Context Menu select
Open Copy Member ➔

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

▪ From the PROC find a DSN with a Symbolic


▪ Select the DSN and Open Declaration

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.)

Select (swipe) the fully-qualified DSN

Right-Click & select Open Member

Go to Full-Screen mode

Stack the views side-by-side

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

• Test your work by opening a program that has static or


dynamic Call statements:
• TRTMNT.cbl
• Find a CALL statement
• Select the called program name
1.
• Right-click and select Open Program “…”

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)

Remote Syntax Check


▪ DDS0001.TEST.COBOL(IDAT1)
▪ 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…

Individual program Search


▪ DDS0001.TEST.COBOL(BNCHS602) use Regular expression: (MOVE.*PATIENT-ID)
– Find all lines with MOVE and PATIENT-ID on them

249
®

IBM Software Group

Module 6 Remote Systems


ISPF 3.x – Batch Jobs – Host Emulation

Module 6 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


 Workshop – Dataset management operations: 1 of 2
Select (single-left-click) a few z/OS files and
note their Properties. Do this for:
 A PDS (library)
 A single PDS member
 A QSAM data file and/or a VSAM file
Edit a PDS member and from the Properties view, note the Lock owner

▪ Allocate two new z/OS datasets:


 A new sequential dataset – your choice of LRECL
 A new COBOL or Assembler PDS. Use Allocate Like from Properties View
an existing library (name this new PDS anything you want)
▪ Copy or Drag & Drop at least 4 PDS members from existing
libraries to your new PDS
▪ Create a new PDS member in your new PDS - two different ways:
1. Use Create new member
2. Copy/Paste/Rename an existing member into the same library
▪ Select multiple members in your new PDS (hold down the Ctrl key) and:
 Open the selected members – then close them
 Rename the selected members
 Delete the selected members

The Properties View Recording – Download or use Preview


251
 Workshops – Dataset management operations: 2 of 2
▪ Drag & Drop (or select, copy and paste) several COBOL programs
from IDzClass – to your new library
▪ Drag & Drop one or two COBOL programs from your new
library down to the \cobol\ folder in your z/OS Projects view
▪ Drag & Drop your <HLQ>.TEST.ASM library to a folder under
IDzClass
▪ Rename your new PDS – then Delete your new PDS
▪ Allocate a new GDG Model
▪ (GDG Models are Allocated from MVS Files)
▪ Create two new Datasets inside the GDG

ISPF 3.2 Functionality Recording – Download or use Preview


252
 Optional Workshops – Dataset management operations: 2 of 2
▪ Navigate to one of your .OBJ or .LOAD PDS libraries and compress it
 Without Backup
 Using Backup
▪ Delete the Backup file after compress finishes
▪ Allocate new Load library using
 Category: Others
 Type: LOADMOD
 Copy one of your load modules from an existing Load Library to your
new library
▪ Allocate a new VSAM file
 Specify file attributes as you see fit
▪ Using the Local filter ➔
 Drag & Drop a file from your z/OS connection to your PC
 Drag & Drop a small PDS down to your PC
 Drag & Drop a file from your PC to a host-based PDS
 Drag & Drop a file from your PC to an MVS File Filter
When you copy a file within an LPAR everything happens on the mainframe
(Using either IEBCOPY or a proprietary IBM mainframe copy utility written in C)
253
 Optional Workshop – Combined Dataset Management Techniques – 1 of 2
Note that you will
Allocate a new PDS named: <HLQ>.TEST.SRCE need SYSLIB setup in
your Property Group –
as well as your
From <HLQ>.TEST.COBOL copy the program MSTFILUP into Property Group
<HLQ>.TEST.SRCE associated with MVS
Files prior to this Lab
Open <HLQ>.TEST.SRCE(MSTFILUP) in the editor.
Why no COBOL colorization…no Outline View...sparse Context Menu, etc.?
(Right) we need to z/OS File Map the program to a Workstation File Extension of: .cbl

Close the program in the editor


Right click over the program from RSE, and select Properties
Map the file to a type of: cbl
Once again open <HLQ>.TEST.SRCE(MSTFILUP). Better?
▪ Right-click on MSTFILUP in the editor
▪ From the Context menu select Remote Syntax Check
▪ Open the Remote Error List view – and note the results
Just a couple of syntax warnings right??

▪ Using the Outline view, select the 200-PROCESS paragraph

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

Submit batch (JCL) jobs a number of different ways:


1. From within Edit on a file mapped to .jcl
▪ Context Menu
▪ Type: sub on the command line (if editing with LPEX)
2. From Remote Systems explorer:
 Expand a JCL library
 Right-click over the .jcl member
 Select Submit
 Or use the Hot-key combination
▪ After submitting the JCL
 You will be prompted for access to the job

▪ Locate Job finds your job in JES ➔ Retrieved Job


▪ Notify acts like TSO Notify. However in IDz v14 it
combines with Locate Job for ease of use
256
 Workshop – Submitting and opening batch jobs

From Remote Systems:


Open a JCL library
▪ The PDS must be mapped to the Workstation File Extension of .jcl
Right-click a JCL member in the PDS: Submit a Job, then select Locate Job
Open the Job (expand the entry in JES)
Double-click to open a specific Spool file
Repeat these steps – but instead of Clicking Open, click: OK
▪ Right-click and Refresh your JES batch jobs list
▪ Find and open your batch job
From the Retrieve Jobs window type a wildcard Job Name
specification that matches your TSO ID (and Job name suffix)
▪ Press  Enter

Retrieved Jobs Filter


▪ Select a Job from the list
▪ Press  Enter (or click OK)
257
 Workshop – Managing Batch Jobs
In-the-box IDz batch job management tools:
▪ Expand JES. Select a job and:
Open the job
Show JCL
Resubmit the job
Refresh JES
Show a single job in a table
Show all jobs in a table
(see next slide for details)
Purge the job
▪ If you use ADFz or own the PD Tools –
you can:
Integrate the Fault Analyzer ABEND
analysis facilities with IDz’s Remote
Systems/JES functionality
Lookup abend codes
…
Using IDz’s Menu Manager you can integrate with z/OS SDSF actions:
(XDC, Change Job Class/Priority, etc.)
Ask your instructor about Menu Manager if you’d like to add this functionality
to your Workbench
258
 Workshop – Show Jobs in a Table
▪ Right-click over My Jobs and select: Show in Table
▪ From Remote System Details:
Click one or more of the columns to re-sort the table
Right-click over a Job and select:
▪ Purge
▪ Show JCL(SJ)
Right-click over a Job and select Go Into
Click the Left-arrow to "Move to the previous…"
Double-click a Spool resource to open the file

Show in Table allows you to sort your jobs on the


column criteria (Return Codes, Job Name, etc.)


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

Note: If you have (potentially)


hundreds or thousands of Active
jobs, consider qualifying Job
owner or Job name prefix

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"

My "DDS" team's jobs – 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.

You can not access IBM’s


zserveros LPAR using Host
Connection Emulation

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

▪ Log out – and re-enter HCE


Access either CICS or IMS TM – or some other VTAM application

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

This is the slide from Module 6 on how


to work with keystroke macros
268
 Optional Workshop – Host Connection Emulation – Remap CTRL Keys
▪ From Window ➔ Preferences ➔ General ➔ Keys
Remap both the left and right Control keys
▪ Open emulation and test out Ctrl

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

Terminate and close the Command Shell


270
 Workshop - Using TSO Commands – 2 of 2 (Working with REXX scripts)
▪ Select one of your <HLQ>.TEST.<sourcePDS> datasets
(TEST.JCL, etc.) – and:
 Right-Click and select: Allocate Like…
 Select your ID, name the Dataset: <HLQ>.TEST.REXX and click Finish
 From your z/OS Projects view, copy and paste (or drag & drop) the three .rex files to your
TSO account

▪ Test out the scripts:


 Open TellTime.rex in the Editor
 Open a new TSO Command Processor ➔
 Run TellTime by entering the following command in the shell:
Exec '<HLQ>.TEST.REXX(TELLTIME)'
– Where: HLQ is your high-level qualifier
– Don't code the less-than or greater-than characters < >
– Don't forget the apostrophes around the fully-qualified dataset name
 Open Looping.rex in the editor
 Run the Rexx exec ➔
 Change the max variable from 12 to 18
 Save your changes
 In the Command line, press the up arrow
 Run Looping.rex again
271
 Workshop – Windows & UNIX Command Shells

Command Shell functionality for running:


UNIX commands and Shell Scripts ➔

Windows command and .BAT files ➔

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

▪ Right-click over MVS Files, select: Retrieve Dataset


▪ Data set name pattern: DDS0001.TEST1.SAMFILE

▪ From Retrieved Datasets, Right-click the name and Browse: DDS0001.TEST1.SAMFILE


▪ Try some of the techniques shown in the previous slides:
 Maximize your editing view (top right-hand icon)
 Turn Hex on/off
 Jump to:
▪ Bottom of file
▪ Top of file
▪ A specific record in the file
 Turn the single mode on/off

▪ 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

If time permits and


you can connect to
your own mainframe,
try editing one of your
own Load Modules
275
Optional Topic & Workshop – Copy Load Module
▪ IDz allows you to copy Load Modules from one
Load Library to another – within the same physical
LPAR
You Cannot copy Load Modules across LPARs

 To try this out:


Expand a Load Library and select
(hold down the Ctrl key between mouse clicks)
several load modules
Right-click and from the Context menu Select Copy
Right-click over a 2nd Load Library and select: Paste
▪ The dataset has to be a true MVS load library
– Check the DCB info in the Properties view if you're not sure

Note that you can also select, Drag & Drop


between load libraries

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"

ex '<Your TSOID>.test.rexx(runmvs)' 'd asm‘

Experiment with other commands:


ex ‘<Your TSOID>.test.rexx(console)' 'd iplinfo‘
ex 'user170.test.rexx(console)' 'd prod,registered’
ex 'user170.test.rexx(console)' 'd smf,o‘
ex 'user170.test.rexx(console)' 'd symbols‘

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

▪ Specify (using list-boxes):


Binding:
▪ Just press the key(s) you want to use – the Keys function will enter your hot keys
When:
▪ Select from the Combo-box
▪ Click OK
279
 Optional Workshop – Map Erase EOF to the End Key on your PC
▪ Many emulators map the End key to EOF. To do this with IDz:

▪ 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

▪ Click Apply then


click OK - and test
with a file in the LPEX
editor

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:

From Preferences >


▪ General
 Keys >
▪ Enter: copy to filter the mappings
▪ Select the Copy for LPEX/emacs
▪ Place your mouse in the Binding
edit box and press: Ctrl+C
▪ Select LPEX/ispf from the
When: box

▪ Click Apply then click OK - and


test copy/paste with text in a file inside
the LPEX editor

282
®

IBM Software Group

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…

3. Name the z/OS Project


and MVS Subproject

4. Check the Property-Group


you wish to associate
with the Subproject

5. Click Finish – and cancel


out of the ensuing “Add
Resources to Subproject”
dialog

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.

When finished, your MVS Subproject should be


populated with fully-qualified DSNs ➔

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)

When you've created the new MVS Subprojects,


populate each of them with a few DSNs

 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
®

IBM Software Group

Module 8 Workshops –
Using the Data Source Explorer (DB2/SQL)

Module 8 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


 Workshop – If you’re using IBM’s zserveros…
Connecting to z/OS-DB2 requires the TCP-IP Location & Port# of a DB2
instance. If you’re using IBM’s zserveros for the labs:
Select: DB2 for z/OS as the database manager
Location: EOSDB205
Host: zserveros.centers.ihost.com
Port: 5443
Check: Single sign-on
Select your Remote system

Default schema: DDS0001

Click Next > 288


 Workshop – If you’re using Your Company’s z/OS DB2…
If you are connecting to DB2 on your own LPAR, with the help of your DBA and/or
Systems Programming staff do the following from the Data Source Explorer:
1. Connect to your z/OS DB2 database

Your Location
Your z/OS LPAR Hostname
Your DB2 System’s Port#

Your z/OS LPAR Hostname

The Primary Schema you use

2. Use the slides that follow - as examples to learn the techniques


demonstrated in Module 8 – Using the Data Explorer
You will have to substitute the names of your own tables/views
for the ones referenced in the slides
289
 Workshop – Filtering Schemas in a Connection
▪ z/OS DB2 databases could
easily contain:
Tens of thousands of tables
Thousands of Schemas
▪ To simplify working on your
projects filter the available
DB2 objects

Note that you will need to specify


your application’s SCHEMA when
▪ Un-check: □ Disable Filter you use your own DB2 system
▪ Enter: DDS0001
In: ◙ Expression name

▪ Click Finish

See next slide for an alternative to


290
using Expressions to Filter Schemas
 Workshop – Filtering Schemas in a Connection (Alternative)
▪ You can also manually select the schemas you want to add to your
Data Explorer View
▪ Instead of using  Expression click Selection and check the Schema names

▪ 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

▪ Right-click over:  Tables


▪ Select Filter…
▪ Uncheck: Disable Filter
▪ Check: Selection

Decide which tables you want in your


connection

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

 Explore and with the DB2 objects:


▪ Expand RESULTS
– Look at the various elements

293
 Workshop – Data (Row Content) Analysis
• Select a column in a table
• Right-click and select: Data ➔ Sample Contents

SELECT DISTINCT "WORKDEPT" , COUNT(*) AS OCCURRENCE


FROM DDS0001.IBM_EMP
GROUP BY "WORKDEPT"
ORDER BY "WORKDEPT"
294
 Workshop – Data (Entity/Relationship) Analysis
Next try the "Overview Diagram"
 Select one or more tables
 Right click and select: Add to Overview Diagram
 Click OK
▪ This opens an Entity/Relationship analysis view

You can also work with a Table, View or Synonym's DDL:


▪ Try the following with the CUST table:
1. Extract table data to a comma delimited file on your workstation
2. Generate the DDL for your table
 Be sure to:
 Browse and select one of your chapter folders
 Check the option to  Open the DDL file for editing

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

 This is the Data


Studio Browse results

296
 Workshop – Read/Only View of a Table's Row Values: Non Data Studio Install

View your DB2 table data in read-only mode:


▪ Select the table or view you wish to edit.
▪ Right click and select: Data > Sample Contents

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

This opens the Table Data Filter dialog

Use the dialog to:


 Add > Several columns

 Add Row Selection


 Click Add
 Open the Column
drop-down
 Open the Operator
drop-down
 Specify a search value

299
 Workshop – Testing Interactive SQL Statements: Process
Sample SQL Statements
on the next slide

▪ Click New SQL Script


▪ Connect to a Database then
type in SQL statements ➔
 Use Content Assist
(Ctrl+Spacebar) to build
your SQL
▪ Right-click over the Content
Area and select: Run SQL
and note the SQL Results
▪ The Result1 tab shows
statement results
 You can Export results
 Sort results by clicking a
Column header

▪ In the SQL Results view,


for multiple statements
expand and select one Statement Run Console Data Results
statement at a time
300
 Optional Workshop – Testing Interactive SQL: Example Queries
A large sample of executable SQL statements can be found at:
https://www.ibm.com/developerworks/community/files/app#/file/2daa9cb7-4c74-4127-b75b-0b425bca58ba

Different flavors of:


• Basic SELECT
• Complex Where Clauses
• UNION/UNION ALL
• Sub-Select
• Correlated Sub-Select
• Joins
• Column Statistics
• Row Statistics
• Group By
• Having

All coded using the


DDS0001 Schema

Note that you would


change all to some
other Schema for your
DB2 system
301
 Optional Workshop – Running SQL Statements in SPUFI Files
1. From Remote Systems:
▪ Find and Right-Click on the file containing your SQL, and from Properties, Mapping
make the Extension: sql
2. Edit (open) the file and connect to DB2

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

Follow the remaining workshop steps on the next slide…


303
 Workshop – Running Embedded SQL Statements – Requires IBM Data Studio
From the MVS Subproject, Open a DB2 program and find an Embedded SQL statement
• Select and Run the SQL statement:
Just swipe a little bit of the code with
your mouse, starting from EXEC SQL ➔

• Verify the SQL results


• Add a WHERE
• ORDER BY clause:
AND DEPT = :DEPT
• Re-run the statement

• Refresh SQL in Outline view and from the SQL Outline


view:
• Expand the Schema
• Select a Table and Find in Data Source Explorer
• Select the table join from CURSRAVG and Show in SQL Editor

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

▪ Try adding an additional where clause predicate


 What happens when you run the query?

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)

▪ Verify your output then re-insert the rows:


 Right-click over the table name
 Select: Data > Load…
 Specify the same Input file
 Verify Load results by Browsing the table

Note that this is a “Load/Replace” operation

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

▪ This should open Excel. If it doesn’t you’ll need to use


Preferences ➔ General ➔ Editors ➔ File Associations
to add a new File Association for *.csv and Associated editor

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

▪ Save your changes


▪ Load the Data back into the table

For Date/Time/Timestamp
you may have to Format the
Cell type

This depends on your Excel


vs. DB2 Date/Time defaults
310
 Workshop - Modifying Extracted DB2 Table Values using ISPF Edit
After you have successfully Extracted DB2 Table values to a *.txt file:
 Find the file in Remote Systems ➔ Local ➔ Local Files
 Open With z Systems LPEX Editor
 Utilize ISPF techniques: Command Line commands (Find, Change, Picture String edit)
Prefix Area Commands: Repeat (to create new test data rows) Delete, eXclude, etc.
▪ Note that you can create new rows by duplicating existing rows, etc.
Prefix Area commands

• Save your changes


• Load the DB2 table from the file you’ve just modified
311
®

IBM Software Group

Module 9 –
Debugging z/OS COBOL
Module 9 Class Recording – Download or use Preview

DevOps

© 2019 IBM Corporation


Debugging Workshops Overview and Prerequisites
▪ Prerequisites:
IBM Debug Tool must be available on your MVS LPAR
You must connected to your LPAR via a real-IP address:
▪ If you are using IBM’s zserveros you will not be able to do these
workshops

▪ 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

▪ At any point, you can terminate your debug session by


clicking the Red icon or pressing Ctrl+2
And you can re-submit the JCL again – to Debug (again)

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

▪ Locate the files:


 COBOL programs:
▪ SAM1
▪ SAM2 SAMFILE properties
 COBOL copybooks:
▪ TRANREC
▪ CUSTCOPY
 JCL:
▪ SAMCMPLK
▪ XSAM
▪ You will need access to a QSAM test data file: SAMFILE <HLQ>.TEST1.SAMFILE
▪ This file is in the \data folder of your IDzClass.zip file – that you used to setup for
these workshops. You will need to transfer the file to the mainframe, ensuring its
DSORG/LRECL/BLKSIZE is maintained
316
 Workshop – Allocate Data Sets
You will need the following standard development libraries for
Compile/Link-Edit:
<HLQ>.xxx.COBOL – example: DDS0001.TEST.COBOL
<HLQ>.xxx.COPYLIB – example: DDS0001.TEST.COPYLIB
<HLQ>.xxx.LISTING – example: DDS0001.TEST.LISTING
<HLQ>.xxx.OBJ – example: DDS0001.TEST.OBJ
<HLQ>.xxx.LOAD – example: DDS0001.TEST.LOAD

If you haven't already allocated these libraries, please allocate


them now.

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

▪ Steps (in SAMCMPLK.jcl):


In all four job steps, modify the library
names for:
▪ COBOL compiler library
▪ Your personal datasets
Submit the JCL
Go to the JES queue and check the
return codes for each step
Optionally, expand your load library
and ensure that there are members for
SAM1 and SAM2

▪ Note – this step requires you to have


allocated all of the datasets referenced
in the JCL (see prior slide)

Don't forget the 2nd


LKED step
319
 Workshop – Obtain your I/P Address and Port#
▪ Switch to the Debug perspective

▪ Click on the downward pointing triangle to the right of the little


green listener tool, and:
Note the Port#
Select and copy the I/P address

This is the I/P address you want!

▪ 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

▪ Open XSAM.JCL and modify:


JOB card
▪ You will have to enter your shop's
specific JOB card parameters
Your test dataset names:
▪ Load library
▪ The SAMFILE dataset DSN
//CUSTFILE DD DSN=…

▪ Paste your copied IP address


– between the & and %
▪ Also verify (or change) the Port #
to your IDz client listener
port (recall from previous slide)

▪ Submit the job:


Click Yes to enter the Debug Perspective
321
 Workshop – Debug Techniques – Stepping
▪ Begin using the Debug Tool functions that you learned about in this section:
 Press F5 – or click Step Into a few times – note that the Outline view synchronizes with your source
 Right-click over variable in Variables – and select 2. Automonitor Previous – step a few more times
 Hover over a variable in the PROCEDURE DIVISION
 Try some find commands – in the ISPF command line area of SAM1.cob
 Navigate around the source code using the Outline view
 Press F6 – a few times. It will act the same as F5 until you get to a CALL statement

 Hover over a variable

 Hover over a variable

322
 Workshop – Debug Techniques – Variables
▪ Change some values:
From the Variables tab:
▪ Filter Locals > 0 ALL
– What does this do?

Click inside a variable and change its value


▪ Press  Enter to save your change

Change the representation of several fields to Hexadecimal


▪ Try editing in Hex
– Change a binary numeric field value to negative
– Etc.

323
 Workshop – Debug Techniques – Monitors
▪ From within Variables
Select Monitor Local Variable

▪ Check the Monitors view

▪ Experiment with:
Change representation
Change Value…
Show Type Names
Remove

324
 Workshop – Monitors (more techniques)
▪ From Monitors
Select Detached

▪ Drag the Monitors view around to make the


best use of "screen real estate"

325
 Workshop – Debug Techniques – Breakpoints

▪ Set and use breakpoints


Find the CALL to 'SAM2'
Add a breakpoint by either:
▪ Double-clicking in the prefix area – or:
▪ Right-click over the statement and
select Add Breakpoint
Resume (F8) to the breakpoint
Click into 'SAM2'
▪ IDz will take a few seconds to load SAM2
Debug into the program a few clicks
Press F7 – to return to 'SAM1'
Resume (F8) to the breakpoint
Press F6 – What does this do?
▪ Answer – runs all of the code in SAM2, and
stops at the Next Sequential Instruction after the call
Double-click on TRAN-KEY to select the field
Right-click and select: Add Watch Breakpoint
Resume (F8) until the value in TRAN-KEY changes, and the
breakpoint causes your program to stop
326
 Workshop – Debug Techniques – Breakpoints continued
▪ Terminate your debug session

▪ Submit XSAM JCL again

▪ Remove all Breakpoints

▪ Add a Breakpoint to the PERFORM 720…


statement in 200-PROCESS-UPDATE-TRAN

▪ Edit that Breakpoint, and make it conditional


 At the wizard click Next >
 Specify the following Expression:
 Click Finish

▪ Resume(F8) - you should stop at the conditional Breakpoint on line 404


 Click the Debug Console view – to verify
327
 Workshop – Debug Techniques – Breakpoints continued
▪ Terminate your debug session
▪ Submit XSAM JCL again
▪ Remove all Breakpoints
▪ From the Debug Console
issue the following
Debug Engine Command:
set automonitor on log

▪ Click Animated Step Into


 Follow the trace in the
Debug Console

▪ Click Animated Step Into

▪ 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

Mouse over WS-CUSTFILE-STATUS and note its current value


Double-click WS-CUSTFILE-STATUS and select Monitor Expression
From the Monitors view, change the value of the field to 04
Step through the code, what happens?
▪ Answer #1: Program execution "falls thru" – why?
▪ Answer #2: Jump To Location breaks the logic out of the "Perform chain" (dependent
PERFORM'd paragraphs) routines in your paragraph logic
Return to the EVALUATE statement via Jump To Location
From the Monitors view, change the value of WS-CUSTFILE-STATUS to 09
Step through the code – note the logic flow

▪ Terminate your debug session


329
 Workshop – Experiment !
▪ Time permitting – submit the
JCL again, and try:
Setting conditional breakpoints
Unsetting breakpoints
▪ Uncheck the box
▪ Single
▪ Remove All
Run until SAM2 abends
Click  Examine
Click OK
▪ What does Examine do?

▪ Submit the JCL again, use:


Run to Location
▪ How does this differ from
Jump to Location?

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.

 Add these two statements in 710-READ-TRAN-FILE.

  Save your changes to SAM1.cbl

▪ Submit SAMCMPLK.jcl – check the return codes in JES

▪ Submit XSAM.jcl, and from your Debug session:


 Set a breakpoint at MOVE SPACES TO ABEND-TEST.
 (F8) Resume to the breakpoint. (F5) Step into the ABEND
 Click  Examine

331
®

IBM Software Group

Code Coverage
Code Coverage Video

DevOps

© 2019 IBM Corporation


Review – Code Coverage – Overview 1 of 2
Extension to interactive
Debug Tool functionality:
Tracks lines of code that have been
executed during test
Improves application quality
Focuses testing resource usage
Reports on tested code and trends
Supports: Batch, CICS and IMS TM
Subset of 3270 (green screen)
Debug Tool Code Coverage
▪ Future releases will narrow gaps

Requires Debug Tool v11.1 or


later
333
Review – Code Coverage –
Overview 2 of 2
▪ Process:
 Compile/Link with standard Debug Tool JCL
Parms (TEST…etc.)
 Submit run JCL – passing in a PARM with:
▪ Your I/P address and port# NOTES:
▪ ENVAR(“EQA_STARTUP_KEY=CC") • //STEPLIB reference to Debug Tool runtime is only
required if not installed in Link Pack
 Make sure that the Debug Tool runtime is in • You can also add the ENVAR… parameter into
STEPLIB, JOBLIB or installed into Link Pack //CEEOPTS DD card

 Run your debug session.


▪ Instead of dropping into interactive Debug, your
program will execute
▪ After the job finishes a Code Coverage report
opens in the editor
– (this takes a few seconds)
▪ Double-click a program to view the detailed lines ➔
▪ The report will provide varying levels of Code
Coverage…………………………….

334
Review – Code Coverage – Specifying ENVAR
▪ Specifying the ENVAR parameter
 Batch:
▪ PARM card

▪ //CEEOPTS DD card TEST parameter

 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

▪ Code Coverage Reports present:  Program Entry


 Coverage Totals

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

Compiled Code Coverage Results view allows


you to see previous Code Coverage Reports.
These are stored in your Workspace

 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

Clear the screen and enter the DTCN transaction code to


configure your Debug session

**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

Optional Topics – for product mastery:


▪ Open Ended Workshops
▪ Misc. Workshops for the Remote Systems module

Note that in order to finish these workshops you must have:


- z/OS File Mapped your libraries
- Set up Property Groups for SYSLIB

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

▪ Return from full-screen


to regular view when
you are finished
347
(Optional) Use Case #1 – Program Search and Analysis – 5 of 5
▪ Using the tools in the IDz Context Menu, experiment with:
Hover (over a variable in your code)
Ctrl+F (find) using a Regular expression
Open declaration (of a variable or paragraph)
Use the Outline View – to navigate in the PROCEDURE DIVISION
Show In ➔ Program Control Flow
Split screen (Ctrl+2) – if you’re on 1920X1024 Screen Resolution try splitting screen twice
Other hot-key combinations (Ctrl+Delete as EraseEOF, etc.)
Various ISPF commands (Prefix area, Command line and PF-keys)
Filter (Comments/Code/ and the SQL option – if you’ve opened a DB2 program)
Select a variable and do a: Occurrences in Compilations Unit
From inside a paragraph, try out the Perform Hierarchy
Misspell a variable – and note the annotation for the syntax error
Create a statement using Content Assist (Ctrl+Spacebar)
Optional (time permitting) – experiment with:
Software Analyzer
▪ Create a New Software Analyzer configuration, and review your code for standards
Compare and Local History functions
Open a program with the COBOL Editor and use Source Format
348
(Optional) Use Case #2 – Access and
Organize Datasets
▪ From Remote Systems Explorer
Right-click on MVS Files
Use Retrieve Data Set…
▪ To add one or more DSNs to your Retrieved
Data Sets filter

▪ Create a few new Filters…


For a subset of your datasets
For the SYS1.P* datasets
For your team’s datasets
▪ After creating a single Filter
▪ From the Filter’s Properties add one or more
additional filter strings
Move one of the Filters up and/or
down in your Remote Systems view
349
(Optional) Use Case #3 – ISPF 3.x Utilities
▪ From the Remote Systems view
Select a Dataset and Allocate a new dataset like the
dataset you’ve selected – this will be a ‘sandbox’ PDS
which you will use to practice ISPF 3.x utility
techniques
Select the new dataset and:
▪ If you’ve allocated a new PDS, copy one or more PDS
members from an existing library of the same DCB to
your new PDS
▪ Rename a few PDS members
▪ Delete a few PDS members from your
▪ Rename the dataset
▪ Delete the dataset
Select a PDS (not PDSE) and Compress the dataset

▪ Assuming your Property Group file is defined


correctly for your workspace:
Right-click over a COBOL program and select:
▪ Show Dependencies
▪ Remote Syntax Check
350
(Optional) Use Case #4 – Batch Job Features
▪ From the Remote Systems view
Select a Dataset and Allocate a new dataset like the
dataset you’ve selected – this will be a ‘sandbox’ PDS
which you will use to practice ISPF 3.x utility
techniques
Select the new dataset and:
▪ If you’ve allocated a new PDS, copy one or more PDS
members from an existing library of the same DCB to
your new PDS
▪ Rename a few PDS members
▪ Delete a few PDS members from your
▪ Rename the dataset
▪ Delete the dataset
Select a PDS (not PDSE) and Compress the dataset
Right-click over a JCL file and Submit the job
▪ Ask IDz to locate the job
▪ Assuming your Property Group file is defined
correctly for your workspace:
Right-click over a COBOL program and select:
▪ Show Dependencies
▪ Remote Syntax Check 351
 Optional Workshops – Copy Search Results to Notepad
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

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

Add to / Move to Another Subproject

Search the files in your MVS Subproject

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).

You can move the windows side-by-side

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

2. From Properties, Right-click and Copy the folder’s location

From the Property Group Manager View


3. Expand: LOCAL
4. Double-click: COBOL Sample Property Group

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

Note that you must


have completed the
setup for this on the
prior slide

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"

Recall that using


Version 9 you will
drag multiple
windows outside of
361
the IDz Workbench
 Optional Workshop – Accessing Copybooks
From IDzClass – open TRTMNT.cbl

1. Press Ctrl+F

2. Enter the word copy in


the Find area. Click All

3. (one copybook at a time): Press Ctrl+W to expand


• Double-click a copybook name (to select it) your source after the
• Select Open, Browse or View Copy Member Find command

4. Repeat the above steps using the PARTSUPP.cbl program

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

Recall that using Version 9


you will drag multiple
windows outside of the IDz
363
Workbench
Optional Topics – Setup for Open Called Program
To open Called Programs from a Calling program within edit also requires you to set up a path.
On the host you reference Program Source libraries (PDS datasets). In a Local Workstation Project you’ll point to
the folders that contain program source files.
In our class these files are contained in subfolders of your custom workspace.
To enable this functionality follow these four steps….. Don’t forget to save your Property Group changes

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)

The same thing holds true for opening:


 A dynamically called program – when a variable in Working Storage has a
hard-coded VALUE clause with the program name
 A program referenced in CICS XCTL and LINK commands

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.

Optional: As you might have done for


the copybook workshop, open these
called programs in a multi-windowed
view: Full-screen, drag&drop the tabs, etc.

Note – Exactly how IDz finds called


programs will be explained in the
same upcoming course module:
"IDz Workbench – Using Remote
Systems Explorer"

▪ And again, the actual feature is


called an IDz Property Group
367
 Accessing the IBM Mainframe
▪ Here are the New Connection screen
values you can use to create a new
zserveros connection.
Host name (IP address):
▪ zserveros.centers.ihost.com
Ports for z/OS and MVS Files
▪ 4035

Note that these are all the new connection


wizard defaults

If you are using your own mainframe for


these workshops you will need to ask
your Systems Programming staff for the:
Host name and Port numbers

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

 Allocate a new libraries for the class files:


1. From My Data Sets:
 Right-click over an existing COBOL or JCL library and
select: Allocate Like…
2. From the New Data Set dialog:
Enter the new Data Set name (see below)
– and click Finish
▪ Use Allocate Like… to add five new libraries

- New Data Set: <HLQ>.TEST.COBOL


- New Data Set: <HLQ>.TEST.COPYLIB
- New Data Set: <HLQ>.TEST.ASM

2. - New Data Set: <HLQ>.TEST.BMS


- New Data Set: <HLQ>.TEST.JCL

<HLQ> = your TSO ID

You can select an <HLQ> or you can type


1.
directly into the combo box

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

6. In the Remote Systems view:


- Right-Click over your new COBOL PDS
- Right-click and select: Paste

 Repeat the above steps to transfer


all of the copybooks from the copy
directory in the IDzClass project to
your new COPYLIB PDS.
Do the same for the BMS, ASM, JCL
370
 Workshop – Allocating Adequate DASD Space For the Class Files
The default DASD allocation for libraries uses
BLOCKS – but we have provided quite a bit
of material for use in this course.
If you find that 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…

2. Name your Dataset

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

Change the L-INPUT-


DATE field as shown:
Note that there are no validation
errors 

Use the Local COBOL


compiler to find the
syntax error:
1. Right-click in the code,
2. From the Context Menu, select
Syntax Check ➔ Local
3. From Remote Error double-click
the red syntax error message

Note 1: This option



requires that you have your
“Property Group” file setup
correctly – and for the
source to be opened from
the Remote. If you’re not
ready yet, this Lab can be
run when you’re all Note that you may need
to open the Remote Error
Note 2: There is a Local Syntax view. Do this from:
Check option. This requires you to Window ➔ Show View ➔
have opened the source from (what Remote Error List
is called) an MVS Subproject – a topic
that we’ll cover later in the course
373
 Optional Workshop/Preferences – Select ISPF for your LPEX Editor Profile
Note that ISPF may already be your
▪ From Window LPEX Editor default

Preferences

Click:
▪ LPEX Editor
And in the Editor profile list
– Select: ispf
Click: OK

 Set ispf as your editor profile


374
 Optional Workshop/Preferences
– Command Line Location
You can set your ISPF command to
the top or bottom
▪ From Window
Preferences >
▪ LPEX Editor >
– Controls
Select top or bottom:
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

2. Enable vertical lines in the editor:


From Window, Preferences
▪ LPEX Editor
– System z LPEX Editor
– COBOL Parser
 Check all three options
Press OK

 Set the above two Preferences, then:


▪ Open TRMTRDZ.cbl in the editor
▪ Note the new (cool) vertical lines. Try out the tab stops
376
®

IBM Software Group

Appendix D –
Adding a new File Association

© 2019 IBM Corporation


Steps – Adding a File Association – 1 of 4
▪ You may need to add a new File Association for custom file
extensions added by SCM systems such as Endevor or Serena
▪ Add a new cobdb2 extension
1. From Window > Preferences > General > File Associations
▪ Add your File type:
– *.cobdb2
▪ Add an Associated editor
▪ Click Content Types

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

2. It’s an investment in your career


▪ Eclipse is an industry-standard IDE platform
▪ Every single z/OS software vendor is investing in Eclipse-based (IDz) solutions –
and they’re not investing in ISPF/green-screen tools
– You will eventually have to learn how to use Eclipse-based tools
– So why not start in a domain you’re already comfortable with (z/OS Application Development)
▪ New (modern) application architectures are all based on Eclipse:
– DevOps
– Java (and other contemporary languages)
383

You might also like