®
IBM Software Group
Introduction to Rational Developer for System z
For ISPF Developers
Jon Sayles
RDz Technical Enablement
jsayles@us.ibm.com
© 2010 IBM Corporation
IBM Trademarks and Copyrights
 © Copyright IBM Corporation 2007, 2008, 2009, 2010. All rights reserved.
 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
Course Contributing Authors

Thanks to the following individuals, for assisting with this course:




Craig Branham, IBM / Rational Learning Development
Zvi Weiss, Certified IT Specialist, Rational Software for System z
Kevin McMillin, Dillards
Vijay U Sankar, IBM
3
Table of Contents





Learning from these slides
Course assumptions
RDz Workbench and Graphical Development overview
Editing and Syntax Checking Source Files
Appendices
4
Using this PowerPoint
There are two types of slides in this PowerPoint:
1. Workshop slides – which indicate that you are to "do something" using RDz (instructions
will be on the slide)
The

in the slide heading.
2. All the other slides contain conceptual learning material
Some of the slides in this PowerPoint contain additional explanations and/or
program code that you can use in workshops. To view a PowerPoint slide
note:
1. Move your mouse-pointer over the bottom of the slide border until the cursor becomes a
north-south facing pointer
2. Left-click and holding the left mouse-button down, drag the bottom border of the slide
upwards until you see the text in the note

5
Course Assumptions
 You know ISPF and have used it for at least two years
 You have:
No experience with Eclipse or RDz
Some experience with PC tools
 You have used MS-Windows applications for at least one year
RDz installed and running on your workstation at version 7.6 or later
 Note that all ISPF discussion assumes IBM-installed ISPF
product defaults
6
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
7
Topic objectives
After completing this topic, you should be able to:
Describe the essential RDz terms and vocabulary – as they relate back to ISPF:
 View
 Perspective
 Menus
– Context menu
– Toolbar menus
Work with Views:
 Define "view"
 Maximize/Minimize/Open/Close/resize different workbench views
Work with Perspectives:
 Define "perspective"
 Switch perspectives
 Reset (to their installation defaults)
Work with a graphical mouse
Access the help system
8
Crossing the Chasm – From ISPF to RDz
 On ISPF the development paradigm consists of:
 Typing 
 Familiarity with ISPF:
 Panels
 Commands
9
Crossing the Chasm – From ISPF to RDz

Using RDz the development paradigm changes to:
 Using a Graphical/Windowed IDE
…with cutting-edge tools – that scale to the complexity of your z/OS development
tasks
An RDz Debug session
with:
- Monitored expressions
- Dynamic data update
- Breakpoints
- Access to source tools
- Program analysis
- Flow diagram
- Navigation
- Real-time access to
Edit and Browse:
- DB2 table values
- IMS Database values
- VSAM files
- QSAM files
10
Crossing the Chasm – From ISPF to RDz
 To become productive using RDz you will need to:
1. Get the hang of using a mouse for navigation 
2. Understand the differences in development tool terms and concepts
3. Familiarize yourself with the RDz workbench organization
– Menus, "Views" and "Perspectives"
4. Translate your existing development techniques to use RDz and learn
some new ones
 It is not "rocket science" but it will take practice, and hands-on
experience
 A short-list of RDz benefits include:
 Raised productivity – see IBM IDE Efficiency Benchmarks:

http://www-949.ibm.com/software/rational/cafe/docs/DOC-3420?approved=true
 Lowered development costs through development LPAR workload
reduction
 Addition of new professional skills (Eclipse-based development platform)
 Improved job satisfaction
11
Launching Rational Developer for System z
 When you launch RDz from your desktop it prompts you for a "workspace"
A "workspace" is the highest-level folder on your workstation that contains:
 Files that are in local z/OS projects
 Datasets stored on your PC
 Meta-data ("data about data") – examples:
– Your development preferences and settings
– Your z/OS connection information
Workstation
Hard-drive

D:\RDZProjectNew
12
 ISPF Option 0
The RDz "Workbench" – Graphical IDE Elements – Menus and Views
Scrollbars for navigation
RDz Workbench
Menus and toolbars
Lots of tabbed Views
13
ISPF Menus
Your initial impression of RDz might be that virtually everything is brand-spanking new.
But that's not the case.
For example, in ISPF you
use menus:
- Primary Option Menu
- Individual Panel Menus
 In ISPF you use menus to navigate from option to option, and
from panel to panel
14
RDz Menus
 And in RDz you use menus and toolbars
Standard Menu 
Toolbar 
 A Toolbar is simply
a shortcut to menu
functions enabled by
Left-clicking on an icon
15
RDz Menus – the Context Menu
 RDz also makes use of Context Menus to simplify development tasks
The context-menu is accessed by: 1. Selecting something 2. Pressing the right-mouse button

Right-mouse "Context" menu
 RDz's menus are used to access
development functionality - individual
tools within the workbench
16
RDz Views and Perspectives
The RDz
Workbench is
organized as
tabbed and
COBOL Editor View
resize-able
windows called
“Views”
z/OS
Projects
View
Views
Views display
information or
provide access
to:
- z/OS datasets
- Local projects
- Source editors
- Syntax errors
- Dataset editors
- Analysis tools
- Debug monitors
- DB2 tables
- SQL statement
results
Outline View
17
Remote
Systems
View
RDz Views and Perspectives
Tabbed and
resize-able
Views
COBOL Editor View
z/OS
Projects
View
Remote
Systems
View
Outline View
A Perspective is a "collection of Views related to/organized
around common tasks" – such as z/OS development, Debugging,
DB2/SQL/Stored Procedure development and testing, etc.
18
ISPF Panels as z/OS "Views and Perspectives"
Browse (=1)
a "view"
DSList (=3.4)
a "view"
In a sense, RDz's Views and Perspectives are simply a graphical way
of organizing functionality you've been working with for years
• Think of an ISPF panel as a "View"
• Think of ISPF itself as a "Perspective"
19
Browsing a Dataset – ISPF
Let's see if this analogy holds…
 Fill in the ISPF Library member name:
 Press:  Enter
20
Browsing a Dataset – RDz
COBOL PDS 
 From Remote Systems (which you can think
of as your new =3.4 DSLIST):
Expand a PDS
Right-click the PDS member
 Select Browse
21
Editing a Dataset – ISPF
 Fill in the ISPF Library member name:
 Press:  Enter
22
Editing a Dataset – RDz
 From Remote Systems (aka 3.4):
Expand your PDS
Double-click the PDS member – or Right-click, select Open
Note that opening a dataset for
Edit in RDz looks the same as
Browse. But in fact, when you
elect to Browse a file (previous
slide), the keyboard is locked –
so you cannot even make –
much save source edits.
23
Dataset Management (Utility) Facilities – ISPF
 Assortment of file management functions
 RDz equivalents exist as:
Views
Context menu options
Toolbar menu options
24
ISPF Data Set Management Facilities – in RDz
All the essential Data Set
Management Facilities
are in RDz – and
available without
navigating
=3.12
=3.3
=6
=3.1
=3.1
=3.14
=3.2
25
The Benefits of an Efficient IDE (Workbench)
Instead of maneuvering through panels to access functionality and working
sequentially, in RDz the functionality you need is available in concurrent views
Edit a program
Access
Datasets
+ Dataset
Management
File Compare
Submit a Compile
 File Search
Dataset Statistics
Access Jobs
(Outlist facility)
26
Specifically – RDz and Equivalent ISPF Options
ISPF
Option 3
ISPF Edit or ISPF Browse
(=2 or =1)
ISPF
Option 3
for local
files
for remote
files
ISPF 3.2
Additional ISPF panels as Views
27
More RDz "Workbench" and Equivalent ISPF Panels
JCL Viewed
ISPF 3.8 
ISPF =6
28
Review – Terms and Vocabulary
 On z/OS
TSO or ISPF is equivalent to an RDz "Perspective"
Each ISPF panel or ISPF option is equivalent to an RDz "View"
You use menus and commands to navigate to and from ISPF panels/views
 Using RDz
There are different Perspectives for different kinds of development work:
 Z/OS Project development work (browse/edit/compile) – z/OS Perspective
 Debugging – Debug Perspective
 DB2 and SQL work – Data Perspective
Perspectives contain one-to-many "Views"
Each View is specific to some development function:
 Edit
 Browse
 Analyze
You can:
 Resize, open and close/Maximize and minimize views
RDz menus are primarily used to access development tools and functions
29
Review – ISPF "Views" in RDz
 Which ISPF options correlates to the RDz views shown here?
ISPF = ____
ISPF = ____
ISPF = ____
ISPF = ____
30
Workshop – Becoming Familiar with the RDz Graphical Tools
This short workshop will start you down the road
to RDz proficiency
You will:
Create a new example project (if you already haven't done so)
Using your mouse:






Manipulate tabs
Navigate the workbench
Explore menus
Edit a program
Compile a program
Debug a program
Recall that you will "do" workshops on all slides that
have this symbol  in the slide header
31
Before We Begin…
 In this first introductory tutorial you will learn
how to navigate the RDz Workbench, and edit
source using programs and projects that
reside on your local workstation
 As you move through these tutorials you will
learn how to connect to z/OS and access PDS
members, VSAM and sequential files and
databases
 And possibly – depending on what's available
in the learning environment, access source in
Library Management Systems
32
Before Starting the Workshop – Keyboard vs. Mouse Development
You will use different development techniques with RDz:
 Type statements using the Editor, and sometimes type other short snippets in dialog
panels – like "find text string" operations, etc.
 Navigate through wizards, through your source files, and do other development
activities with your mouse. And sometimes you will mix mouse-operations with typing.
If you’re new to mouse development consider the following:
Left-mouse button
Right-mouse button
Select some thing
- Click – to set focus to or to select a field
- Select a file in the Editor
Opens a “context menu”
- From a program in the Editor Area
- Open a Declaration or Copybook
- Syntax Check
- Rename/factor
- Copy/Paste/Move/Delete code
Scroll-bar manipulation
Double-click a file to open it in the Editor
Open a Workbench menu (at the top)
Select (Left-mouse), hold, drag and drop a resource
Scrolling wheel
– used primarily for:
- Opening Split-Screen views in the editor
- Dragging and dropping files
- CICS/BMS and IMS/MFS screen painting
Used to scroll up/down inside source files
- Fast and convenient
33
 Workshop – Launch RDz
 From your desktop or the Windows start menu launch RDz
 If you are prompted for a Workspace you can either customize/edit the
Drive:\Directory name, or just click OK to accept the default
 Close the Welcome tab
By clicking the X as shown here:
 RDz will open to what is called the: z/OS Projects perspective
We'll explain these terms a bit later
 From now on, the product will open directly here (without the Welcome tab)
 Close the Welcome to z/OS Projects tab
34
 Create a New Example Project
 Note – if you did this in some prior step of your education setup, please
skip this slide
 Left-click the File menu, select:
New
> Example…
 In the Wizards: text box, type: cobol
Select: COBOL Sample 1
Click: Next
 Name the project: chapter1
 Click Finish
 Your z/OS Projects tab window will show your new project:
35
The RDz "Workbench" – Project Organization
 You will work with a variety of COBOL resources: programs, copybooks,
compile listings, executables, data files and so forth
 Using RDz you store, organize and manage the resources associated with
your projects in Projects
 RDz resources are organized into
- Project(s)
- Folders – and sub-folders
- Files
Project
Folders 
Files 
You can think of the RDz resource topology as similar to ISPF libraries:
 RDz Workspace folder
 Project sub-Folder
 cobol Sub-folder – under the Project folder
 File – organized inside the cobol folder, etc.
Note – that this analogy is not perfect, but close.
36
 Navigate in the RDz Graphical Workbench
Double-click StartApp.cbl
and using your mouse:
Up-down slider bar
The COBOL Editor

1. Move the slider bars:


Up and down
Right and left
Left-right slider bar
Get comfortable moving the slider bars to navigate in the source file
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
37
 Resize a Window in the RDz Graphical Workbench
You might wish to see more program source at a glance in the Workbench.
There are many ways to do this, but we'll start with:
- Move your mouse-cursor over the right-hand border of the editor window
It will turn into an East-West facing pointer 
When this happens:
- Left-click, and holding the left-mouse button down, drag to the right or left and
resize the view
You can also select the bottom window border. Left-click and hold + drag to make the
window's height larger
This window resizing technique is similar to setting your host emulator screen size (24X80, 32X80, etc.)
As time permits, spend a few minutes working with mouse scrolling and
window-sizing graphical development techniques
38
Workshop Review
What have you done so far?
1. Launched RDz and closed the Welcome tabs to access the z/OS Projects
perspective
2. Created a new project – populated with example COBOL programs
3. Opened a program into the "COBOL editor"
4. Navigated up & down, right & left using
1. The scroll bars
2. The single-line-at-a-time arrows
5. Resized your editor window by dragging the window frame, making it:
1. Wider (width)
2. Deeper (height)
39
 Workshop Review
Close a view by
clicking the Red X
Practice makes perfect:
 Close the editor on StartApp.cbl
 If you made any changes to StartApp do NOT save them
 Open PrintApp.cbl in the editor
 Use the scroll bars to scroll up and down/right and left
 Use the up and down scrolling arrows
 Resize the editor window, make it:
 Wider
 Deeper (taller)
 Close the editor – and do NOT save changes to PrintApp
40
Manipulating Views – Part II
 It can be very useful to
maximize and restore views for
various development tasks.
 This is very easy:
To maximize a view:
 Double-click in the middle of the
view tab
– Just don't click on the X 
To restore a view back to its
original size:
 Double-click (again) in the
middle of the tab
41
 Manipulating Views – Maximize and Restore
 From your chapter1 project:
1. Double-click StartApp.cbl and load it into the editor
2.
3.
4.
5.
Double-click the editor tab to maximize the editor view
Scroll up and down a few times in the editor
Double-click the editor tab to restore the editor
Close the editor don't save any source changes
(if you happened to make any)
6. Load PrintApp.cbl into the editor
7. Maximize the editor view
8. Scroll up and down a few times
9. Restore the editor view
10.Close the editor - by clicking the X in the tab
42
 Resetting your Perspective

When you're first getting used to a new workbench, it's easy to do things
inadvertently – like close views, or resize them so that they're virtually
unusable 

An easy fix is to restore your workbench is to access the Window menu
and either:
 Reset your perspective to the RDz installation defaults …or…
 Open (Show) views you may have closed accidentally
 Let's try it (do the following):
 Close a few of the views
 Resize the editor or some other view
 Now:
1. Left-click the Window menu
2. Click:
– Reset Perspective
– At the prompt, click OK
 Note that from the Window menu you can also open other perspectives and open
specific workbench views (the Show View option)
43
 Open (Show) a View
Up to now we've used just a few views, but RDz has lots of useful functionality
accessed through views. And even though we're not ready to learn about every
view and what it does, we should know how to open a view when we need to.

Do the following:
 Close the Remote Systems view
 Close the Properties view

Reopen (Show) a view:
1. Left-click the Window menu
2. Click:
 Show View >
Remote Systems
Repeat the above steps to open
the Properties view
44
Viewing More Than One Program at a Time
 It's a common need when you're working with programs that inter-relate (CALL one
another etc.) to want to view multiple sources simultaneously:
In ISPF you press PF2 (Split-Screen) and Browse or Edit or files
Using RDz it's actually simpler to produce independent program edit views
45
 Workshop – Viewing More Than One Program at a Time
From z/OS Projects
1.
2.
Double-click StartApp.cbl – to load it into the editor
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 over the blue scroll-bar it will turn into a
bold-right-facing pointer. Release the mouse button
46
 Workshop Working With More Than One Program at a Time
 Congratulations – you are now in Split-screen edit, on two different programs
 To Restore the editing view to a single screen: Double-click over the tab 
Notes
1. this may have seemed
like a lot of individual steps,
but once you've done it a
few times, the motion will
become quick and efficient
2. These are multiple
"physical" windows –
you have carte' blanche
to work with your source:
- Browse
- Edit
All of RDz's tools
are available in either view
 Practice makes perfect
Please practice opening
both StartApp and PrintApp
Then create a split-screen
view several times.
Also Restore the view to a single edit screen
47

Viewing a Program in Split-Screen
 It's even more common to view the same program in split screen
In ISPF you press PF2 and load the program into Browse or View mode (=1)
In RDz it's much simpler to produce independent edit sessions………..
Edit session 2
Edit session 1
48
 Workshop – Split-Screen Edit
From z/OS Projects:
 Double-click StartApp.cbl – to load it into the editor
 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
Note that unlike ISPF (which only allows you to browse the same source in another splitscreen session) you are in full source edit mode in both views
 To close the view, click the X in the right-hand corner of the split-screen
 Practice makes perfect:
Open StartApp.cbl and split-screen. Close the split-screen. Close StartApp. Repeat with
PrintApp.cbl. Also pract. MaximizReand PrintApp.cbl a few times. Maximize the views, close
the split-screen, etc.
49
Split-Screen Q&A
Q. What about F9 …or… is there a a hot-key combination I can use to swap
between split screens?
A. Most of the time you'll just click your mouse into the "other" split screen to set
focus, however you can press:
Alt+Shift+Right-arrow key
to swap from the left screen to the right – and
Alt+Shift+Left-arrow key
to swap from the right screen to the left
Q. Remind me again – how do I close Split-Screens?
A. If you're editing the same program, click the red-X in the top right hand corner
If you're editing two different programs close the view tab
Q. Can I split screens horizontally?
A. Yes – here's how:
Splitting one program's source horizontally:
1. Press Ctrl+2 to split the source view
2. Right-click inside the program and from the Context Menu
select: Horizontal split
50
Horizontal Split of Two Different Programs
1. Left-click on the view tab. Hold and drag downwards
until the mouse-pointer becomes a south-facing arrow
1.

1.
2.
2. Release the left-mouse button
51
Workshop Review
What have you done so far?
1.
2.
3.
4.
Launched RDz 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
1. The scroll bars
2. The single-line-at-a-time arrows
5. Resized your editor window by dragging the window frame, making it:
1. Wider (width)
2. Deeper (height)
6. Maximized views and Restored them back to normal size in the
Workbench
7. Reset your z/OS Projects perspective to the RDz default
8. Opened views that might have been closed accidentally
9. Split-screen, and edited two programs at once
10. Split-screen, and been in Edit on the same program
52
 GUI-Editing Workshop – 1 of 2
Practice makes perfect:
1. From this PowerPoint's Slide Notes:
Select all (Ctrl+A) then Copy (Ctrl+C) all of the statements in the program
–
If you don't remember how to access Slide Notes return to slide#5 in this PowerPoint
2. From RDz

Right-click over the cobol folder
and select:
– New
– File
>


Name the file: TRMTRDZ.cbl
Click your mouse-pointer into the new file in the top-left hand corner (column 1, row 1) and press
Ctrl+V to paste the program statements you copied in step 1

Save the file (Ctrl+S)
53
 GUI-Editing Workshop – 2 of 2
 Steps:






Use the scroll bars to slide up and down, right and left
Maximize the view of TRMTRDZ
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 to Restore the normal RDz views
 Hey… Let's try a few new things!
 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 COBOL editor, scroll to the bottom of the file and click: 1000-DB2-ERROR-RTN
–
What happened in the Outline view?
54
Section Review
What have you done so far?
 Learned a few of RDz's Workbench terms and concepts – and how they contrast and
compare with ISPF:





Workspace
Perspective
View
Menu
Editor
 Understood the central role of your mouse (both left or "selection" button, and the right or
"context-menu" button in doing RDz development









Launched RDz 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 RDz default
Opened views that might have been closed accidentally
Worked in Split-screen mode
55
®
IBM Software Group
Part II – Editing Your Program Source
© 2009 IBM Corporation
Editing – Agenda
 Selecting an Edit Profile
 Program source Navigation
 Editing programs ala' ISPF
PF Keys
ISPF Line Commands
ISPF Prefix Commands
 Common program editing techniques
Data Flow analysis
Procedural logic (Paragraph Flow) analysis
 Other common ISPF techniques
Find (exclude/not exclude)
Creating new programs scratch
 Working with programs that contain EBCDIC (binary) data embedded in the
source file
 Working with RDz Property Files
57
Selecting an Edit Profile
 The RDz workbench tools provide a number of different edit profiles you can
use for development
An editor profile is basically an emulation of an editor you use or may have used
with different software packages. Examples: ispf, xedit, vi, etc.
 For the purposes of this course consider that you will learn:
lpex




The installation default editor profile
A powerful PC-style editor
Language-sensitive tools and features
Extensible
ispf
 An emulation of the z/OS TSO/ISPF editor
 Close to 85-90% (depending on your shop's ISPF customization) of the same features
 But in a GUI editing workbench – so initially, things will seem quite from the mainframe
58
 Changing You Editor Profile
 From Window
Preferences
Click:
 LPEX Editor
And in the Editor profile list
– Select: ispf
Click: OK
 Set ispf as your editor profile
59
 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.
60
Try out the tab stops
(Optional Customized Preferences) Changing Colors to Green Screen
 You might also wish to customize your editor view colors – to closely match those you use on
ISPF. This is easy to do, and the steps are shown on the next slide.
 Note that the screen captures throughout the rest of this course are RDz default, not customized
61
 (Optional Workshop) Changing Editor Colors
 First – open any file in the editor (StartApp.cbl will do)
 Next, from: Window > Preferences
LPEX Editor Appearance
Set customized attributes. After each operation, click: Apply and look at your
editor view
 Palette: Black
 Current Line – click: Foreground, and from the Color Palette, select aqua (or green),
then click: OK on the Color Palette
 prefixArea – click: Foreground, and from the Color Palette, select aqua (or green),
then click: OK on the Color Palette
 selection – click: Foreground, and from the Color Palette, select Black. Click
Background and from the Color Palette select: Gray then click OK on the Color Palette
62
 (Optional Workshop) Changing Editor Colors
 Next, from: LPEX Editor Parsers Parser Style
Set some more customized attributes.
After each operation, click: Apply and look at your editor view
 Ensure that Document parser is set to: cobolZosSqlCics
 Set the following Style attributes (Foreground) to aqua (or green)
–
–
–
–
–
–
–
–
User defined word
Reserved word
Function
Picture string
Non-numeric literal
Comment
Numeric literal
Sequence number
 Click OK 
 If you don't like your changes, there's a
"Restore Defaults" button
you can click that returns the editor to the install colors
Under: Preferences, LPEX Editor, Parsers, Parser Style and LPEX Editor, Appearance
Note also that, if you would like to customize the above COBOL program elements to different colors
(instead of all aqua or green) feel free to return to the Parser Style attributes, and experiment with different
Foreground colors for User defined word (variables and paragraph names), etc.
63
The RDz Editor – Using the ISPF Profile
 The RDz editor view changes, when you use the ISPF profile:
New function keys are enabled, the "prefix area" appears, etc.
 Note – same:
Scrollbars
Status line – showing:
Status line
 Current line
 Columns
Vertical
Scroll
Bar
Command line
Colorized source
 New:
Prefix area - for
ISPF prefix commands
Prefix
Area
PF-key assignment
 The command line now
works with some
ISPF commands
Command line
 Note: ISPF command line commands are NOT case sensitive
64
 ISPF PF-Keys and Navigation Options Top, Bottom ISPF commands





F1 – Help
F5 – Repeat Find
F6 – Repeat Change
F7 – Page Up
F8 – Page Down
 With TRMTRDz.cbl loaded into the editor, do the following:
 Press F1 – Note that this opens RDz Help in a separate view, and the first time you do this it will take a
few seconds
 Press F8 – several times to page down in the source file
 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
 On the command line, type the ISPF command shown. Press <Enter> after each command:




Top
Bottom
Top
Bottom
 Note: 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
65
 "No L" Locate – More Navigation Options
 Using ISPF you locate a given line by typing Locate, Loc or: L <Line#>
 Using RDz (from the command line):
Type (only) the line number
Press <Enter>
 Locate the following lines in TRMTRDZ.cbl
22
333
444
999 – Note that the program is only 949 lines long
143
1
66
Summary – Options for Navigating Through Your Program Source







Top of file: Top
Bottom of file: Bottom
Page down: F8
Page up: F7
Page down: PgDn key
Page up: PgUp key
Click inside the scrolling area – on either side of the scroll bar
to Page up or Page down

 Locate any line of source by typing the Line# in the command area
 Scroll up/down right/left using the:
Scroll bars
Line-at-a-time up/down – click the arrow
Your mouse scroll-wheel
 Fast and convenient for positioning/centering code on-screen
67
 Open-ended Review and Workshop – Navigation Options
Progress your RDz 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 RDz 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
68
 One line up
Dragging
 scroll bar
 More ISPF Commands – Find/Repeat Find
You can do the essential ISPF find commands and its variations.
Let's try out a few familiar commands and options:
 With TRMTRDz.cbl loaded into the editor, do the following:
- On the command line, type an ISPF command
Press <Enter> after each command:
Hint: Don't forget that – with mouse focus in the
Command line, you can press the Up arrow key to
retrieve the previous command


top
F WS-T

Press F5 several times










Bottom
F WS-T
F WS-T
Top
F WS-T
F WS-T
Bottom
F WS-T
F WS-T
F WS-T

Press F5 several times



Top ; F WS-T all
x all ; f ws-t all
RES
first
last
12 20
first 12 20
Note – Because ISPF command-line
commands are not case sensitive both of
these examples work
12 20 first
last
Prev
– To reset your source view
Note – You can "stack' ISPF line commands by separating
with a semi-colon. But – you also need to type a space
(a blank) between the operands and the semi-colon.
69
 More ISPF Commands – Change and Repeat Change
You can do the essential ISPF change commands and its variations.
 With TRMTRDz.cbl loaded into the editor, do the following:
- On the command line, type an ISPF command Press <Enter> after each command:
Try a few more Find / Change command
 top
combinations:
 C row-sub row-idx













undo
C row-sub row-idx all
undo 12
C all row-sub row-idx
undo 12
C row-sub row-idx first
undo
C row-sub row-idx last
undo
F "Y" all
F '"Y"' all
Press F5
F '01' all 8 12
 X all; f '01' all
 RES
 top ; c row-sub row-idx 12 40
 Press F5 then Press F6
 Continue pressing F5 and F6
for "discretionary find/change"
 undo 12
 bottom






X all; f '01' all 8 12
RES
X all ; f row-sub all
c * row-idx
Press F6 a few times
Bounds 20 40
–
Then try a few Find/Change commands again
Take another 5-10 minutes and use F with
the following Find operands: char,
suffix, prefix, word, char,
RFIND
70
ISPF Commands continued – COBOL Source Numbering
 RDz's statement numbering is slightly different than ISPF
 The default source mode is without COBOL numbers
 You can display your code with the following options:
 Num on – like ISPF – turns the Prefix area into 6 digit sequential line numbers,
incremented by 100
 Num cobol – turns columns 73-80 into COBOL line numbers
 Num off – returns the Prefix area to line numbers incremented by 1
 Unnum – turns off the line numbers in columns 73-80
Cols
73----80
COBOL
Line
Numbers
 Note that for both Num off and Unnum you must be in Num On mode (like ISPF)
71
 Workshop – ISPF Commands – COBOL Source Numbering
Let's work with the COBOL number commands a little – do the following – and note the
effect of the source numbering commands:
 Load StartApp.cbl into the editor
 Type this series of commands on the command line (press <Enter> after each command):
 num on
 num off
 num cobol
 unnum
 Close StartApp.cbl – and do NOT save your changes
 Again Load StartApp.cbl into the editor – and type this series of commands on the
command line (press <Enter> after each command):
 num cobol
 Num on
 Num off
 Close StartApp.cbl – and SAVE your changes
 Again Load StartApp.cbl into the editor – and note:
 The COBOL sequence numbers were saved
 The initial message displayed reveals this
72
Preference to Save Sequence Numbers
 Note that, if you have enabled
sequence numbers, then any
COBOL numbering will be
saved from session to session
in your source file.
 Enabling sequence numbers
is done from:
Window
Preferences
LPEX Editor
System z LPEX Editor
Sequence Numbers 
73
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
74
ISPF Prefix 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
 Prefix Area Commands Workshop – New Program File
Steps:
 From this PowerPoint's Slide Notes:

Select all (Ctrl+A) then Copy (Ctrl+C) all of the statements in the program
– If you don't remember how to access Slide Notes return to slide#5 in this PowerPoint
 From z/OS Projects

Right-click over the cobol folder
and select:
– New
>
File
– Name the file: SANDBOX.cbl


Click your mouse-pointer into the new file in the top-left hand corner (column 1, row 1)
and press Ctrl+V to paste the program statements you copied in step 1
Save the file (Ctrl+S)
76
 Prefix Area Commands Workshop
 Using your ISPF skills, issue the
following ISPF commands by entering
values in the Prefix area and
pressing <Enter> after each edit
operation
ISPF Prefix area
commands
 Note: The editor line numbers will change and update as you finish each workshop step.
Keep in mind that you're practicing ISPF Prefix Area commands in RDz – not programming
 With the SANDBOX.cbl program
loaded in the editor:
 Repeat lines 9 and 21
 Block repeat lines 9  23
 Block delete lines 23  25
 Copy line 11 after line 19
 Block copy lines 23  36 after line 48
 Delete lines 50 and 56  58
 Block move lines 37  38 after line 46
 Block shift lines 101  105 left 4
 Block shift lines 160  164 right 6
 Scroll to the bottom of the file (Ctrl+End). Block repeat the 1000-ABEND-RTN paragraph, and rename
the paragraph: 1001-ABEND-RTN
 Insert 20 new lines at the end of the file
77
 Prefix Area Commands Workshop - continued
 Continue editing SANDBOX.cbl Reminder: do not to worry if your line #s are not exactly in
synch with these workshop tasks. Just do the ISPF functions described
 Scroll to the top-of-file, and Insert a new blank line after line 13
Block Exclude
 Block exclude lines 30  35
 Click the collapse/expand icon
 From the command line, type: RES
 On line 1, exclude 9999 lines 
 Click the collapse/expand icon
 From the command line, type: RES
 In one operation, perform the ISPF prefix commands shown here 
Please spend another 5 minutes practicing with ISPF prefix area commands
and combinations that you're familiar with from the mainframe
 Close your edit session and do NOT save your changes to SANDBOX.cbl
78
ISPF Prefix Area Commands – Example with Excludes/Expand up or Down
 A common ISPF Prefix command technique is to:
Exclude a number of lines (Xn (where n – is a number), or XX….XX)
Show a number of the excluded lines – with an "F" or "L" prefix command
 With RDz you might use this less, as you get expand/collapse functionality
(plus signs). But if you need this technique, it's supported:
 Optional Workshop
 To show n excluded lines within an excluded block:
Excludes lines, then position your cursor on the excluded marker
Type:
 F n … or… L n
- in the prefix area
– Where n is a number of lines to show
F – shows the first n excluded lines
L – shows the last n excluded lines
79
(OPTIONAL) Try: LC and UC
(lower-case/uppper-case prefix
area commands) – in any
COBOL program
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
80
Keyboard Editing versus Mouse-based
You're probably getting the picture that there are two distinct editing "modes"
using a graphical workbench like RDz:
1. Using your mouse for:
 Navigation
 Highlighting
 Selection
 Accessing RDz tools 
and your keyboard for content editing
2. Using the keyboard for:







Navigation
Highlighting
Selection
Accessing RDz tools
Content editing
Most developers feel as though it's worth going through the skills-transition, to
master mouse-oriented development – as this pays dividends for z/OS and moderndevelopment workflow (Services, contemporary U.I. work, etc.)
But, on the next few slides we present Hot-Key combinations available in the RDz
editor for those that are ISPF power-typists, who want to ease into things gradually
81
Common ISPF Key Editing Techniques
Split and Join lines:
1. Split lines:
Position Cursor
Press Alt+S
…or…
Press: Ctrl+Enter
2. Join lines:
 Position Cursor
 Press Alt/J
Leading blanks can cause line joining to shift to the right (sometimes past column 80).
A better solution for joining lines is to

Select and cut the text to join 
Paste the text
82
Common ISPF Key Editing Techniques - continued
You're probably used to the Erase (EOF) key.
Using RDz you substitute Ctrl+Delete
Ctrl+Delete
Other useful PC-key combos
1. Select to the end-of-line
Shift+End
2. Move your cursor to the end and beginning of a statement
Position your cursor inside a statement 
Press
 End
 Home
83
 Workshop - Common ISPF Key Editing Techniques
From z/OS Projects
 Open the SANDBOX.cbl program in the editor
 Using the Outline view, find the beginning of the PROCEDURE DIVISION
 Find the MOVE "000-HOUSEKEEPING" TO PARA-NAME. Statement
 Using Ctrl+Enter, split the line before the TO
 Using the mouse Cut & Paste technique, rejoin the lines
 Under the * DATE VALUES comment line, split the next four MOVE statements after the TO
operand
 Scroll to the top of file and
using Ctrl+Delete erase to
end
of line five of the comments
 Using the Outline view, return to the 000-HOUSEKEEPING paragraph, and re-join two of the
MOVE statement lines you split in the above steps (again use the Cut & Paste technique)
 Using the command line, Find the first occurrence of : INPATIENT-TREATMENT-REC-DATA in
the source
 Place your cursor on that line at column 22
 Press the Home and End keys a few times
 Press Shift+Home and Shift+End
 Scroll down to the PROCEDURE DIVISION and practice/experiment using:
Ctrl+Enter, Joining Lines, Ctrl+Delete, Shift+End, Home and End for five minutes
 Close the editor and do NOT save your changes
84

Hot-Key Combinations
The ISPF editor actually supports an extensive
collection of Hot-Key combinations:
You can see the complete list of Hot-Keys at any time
during your edit session by pressing: Ctrl+Shift+L 
 Black entries are activated
 Gray entries are unavailable in the current editing context
Hot-Keys are case-IN-sensitive
 Alt+C  Alt+c
 We will cover the essential Hot-Keys starting on
the next slide:
Navigation
Select Text
Copy/Paste Text
Line Options
Miscellaneous
Ctrl + Shift + L
85
 Hot-Key Combinations – Source Navigation + Miscellaneous Keys
RDz 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 (zero)
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 –
Right/Left Arrows
Scroll one character at a time through your source:
Up/Down – Right/Left
Up/Down/Right/Left Arrows
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
Escape
Cursor jumps to the command line
N/A
86
Workshop – Source File Navigation and Hot-Key Combinations
Load TRMTRDZ.cbl into the editor. Press the following Hot-Key combinations.
(Optional) Type or write down what happens after you press the Hot-Key combination
 Ctrl+L - Type: 77 and Press: Enter ________________________________________
 Ctrl+T ________________________________________
 Ctrl+2 ________________________________________
 Ctrl+0 ________________________________________
 Ctrl+0 ________________________________________
 Ctrl+End ________________________________________
 Ctrl+Home ________________________________________
 Ctrl+Shift+L ________________________________________
 PF8 ________________________________________
 PF7 ________________________________________
 PgDn ________________________________________
 PgUp ________________________________________
 Ctrl+PgUp ________________________________________
 Ctrl+PgDn ________________________________________
 Ctrl+G ________________________________________
 Ctrl+W ________________________________________
 Ctrl+F10 ________________________________________
 Ctrl+P- You can decide if you want to print the file ________________________
 Down Arrow - Continually press the down arrow ______________________
 Up Arrow - Continually press the up arrow ___________________________
87
 Hot-Key Combinations – Line and Statement Editing Options
RDz 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 current 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
Open same program in split-screen view
PF2 + navigate to source member
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
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
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
F2
Delete COBOL word to the right of the cursor position
N/A
88
Workshop – Line and Statement Editing Hot-Key Combinations
Load TRMTRDZ.cbl into the editor. Press the following Hot-Key combinations.
(Optional) Type or write down what happens after you press the Hot-Key combination
 Ctrl+A ________________________________________
 Alt+U ________________________________________
 Ctrl+Backspace ________________________________________
 Ctrl+Z ________________________________________
 Ctrl+Y ________________________________________
 Ctrl+D ________________________________________
 Shift+Right arrow ________________________________________ (Repeat with Shift+Left Arrow)
 Shift+Down arrow ________________________________________ (Repeat with Shift+Up Arrow)
 (With your mouse cursor at the beginning of a line) Shift+End _______________________________
 (With your mouse cursor at the END of a line) Shift+Home _______________________________
 Ctrl+X ________________________________________
 Ctrl+Home ________________________________________
 Ctrl+V ________________________________________
 Ctrl+End ________________________________________
 Ctrl+J ________________________________________
 (With your mouse cursor in the middle of a line) Ctrl+Delete _______________________________
 (Multiple times) Ctrl+Shift+Right arrow _______________________________
 (Holding these keys down) Ctrl+Right arrow _______________________________
 (Holding these keys down) Ctrl+Left arrow _______________________________
If time permits, spend some time working with the combination of the
Navigation and Line and Statement Editing Hot-Keys
89
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
90
Find/Replace Dialog – 1 of 2
Besides the ISPF Find/Change
command, there are other
ways to search and replace
text
Standard find:
From anywhere inside your
source, press:
Ctrl+F …or… Ctrl+f
Brings up the following dialog
with find options 
1. Enter Find and/or
Replace value
2. Check one or more
search refinement
options 
3. Press a Find button
(covered on the next slide)
Find option checkboxes:







Case sensitive – case sensitive search
Whole word – finds your text delimited by spaces or dashes
Regular expression – powerful search meta-language – for complex search
Wrap – if starting mid-way through source, continue find from the top
Select found text – shows and selects found element
Peek: Shows specified number of lines of source after the found element
Restrict search to columns – search between start and end columns only
91
See Notes
Find/Replace Dialog – 2 of 2
Find option buttons:
 Next
– Find forward in the source
– Does not find text inside copy or include files
– Ctrl+n – finds next
 Previous
– Find upwards (back) in the source from your current cursor position
 All
– Finds all lines within the source
– Acts to exclude or filter source
– Press Ctrl+W to "show all" excluded lines …and/or to close the find dialog box
– Clicking anywhere in the main body of your source file also closes the Find dialog
– Click the pluses in the left-hand border as well – show filtered source
 Replace
– Adheres to COBOL columns
– If replace would push text past column 73 you will receive a warning
 Replace all
– Changes "found" to replacement values throughout the file
92
 Workshop Find/Replace Dialog
Load SANDBOX.cbl into the editor
 Do a Ctrl+F
 Search for All 01
 Note that this found
bunch of comment
lines. Why?




a
Restrict the column search to between 8 and 20
Find All: 01 (again)
Expand some of the plus-signs and un-filter the code
Press: Ctrl+W … What does that do?
Customizing Search
From Window, Preferences
Scroll down and select:
- LPEX Editor
- Find Text
Check:
 Select found text
 Incremental find dialog
Click OK
Re-run the above Searches
93
 Workshop Find/Replace Dialog – continued
 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 suggestions…
 Find All
 date
–
Check  Case sensitive – and rerun this search
 811
 perform
–
Check  Whole word – and rerun this search
 Try experimenting 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
94
Find All (Exclude) Search Within File
Common ISPF editing technique:
- Exclude various source lines
- find (within) excluded lines
- Used extensively on giant
production source files
Command ====> F (or C) 'xxx' X
To perform this using RDz
use the same command
line syntax format:
1. Exclude lines
2. Then type: F <xxxx> ALL X
This will limit the scope of the
search to only the excluded
source lines
Note that ALL operand is not required
95
Find All (Not Exclude) Search
Another common ISPF technique
- Exclude various source lines
- Find within (not) excluded lines
Command ====> F (or C) 'xxx' NX
To perform this using RDz use the same
command line syntax format:
1. Exclude lines
2. Then type: F <xxxx> ALL NX
This will limit the scope of the search to only
the NOT excluded source lines
Note that the ALL operand is not required
96
 Workshop – Find Exclude/Not Exclude
From z/OS Projects
 Open the SANDBOX.cbl program in the editor
 Using the Outline view, find the beginning of the PROCEDURE DIVISION
 Find the MOVE "000-HOUSEKEEPING" TO PARA-NAME. Statement
 Using Ctrl+Enter, split the line before the TO
 Using the mouse Cut & Paste technique, rejoin the lines
 Under the * DATE VALUES comment line, split the next four MOVE statements after the TO
operand
 Scroll to the top of file and
using Ctrl+Delete erase to
end
of line five of the comments
 Using the Outline view, return to the 000-HOUSEKEEPING paragraph, and re-join two of the
MOVE statement lines you split in the above steps (again use the Cut & Paste technique)
 Using the Outline view, go to the: DATA DIVISION, FILE SECTION, TRMTDATA, and
INPATIENT-TREATMENT-REC-DATA line in the source
 Place your cursor on that line at column 22
 Press the Home and End keys a few times
 Scroll down to the PROCEDURE DIVISION and practice/experiment using:
Ctrl+Enter, Joining Lines, Ctrl+Delete, Home and End for five minutes
 Close the editor and do NOT save your changes
97
UNIT
RDz for ISPF Developers
Topics:






•
•
•
•
The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
98
 Creating New Programs Using Templates


To create new programs from scratch, you've been creating a new file and
saving it with a .cbl suffix
This works, but the "Best Practice" method is to use 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 in
 Select the cobol folder
 Click Next >
99
 Creating 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
 We will discuss Snippets soon
 Note that you can customize the
templates used to create new programs
From Window, Preferences, select:
COBOL
– Code Templates
– Features
100
Creating New Programs Using Copy/Paste
Instead of using pre-defined templates, you may be used to "cannibalizing" preexisting programs, by creating a new PDS member from an existing program, then
editing OUT the code you don't need for your new development work.
+ Pluses:
+ Fast
– Minuses:
- Must clean-up PDS member fragments
- More difficult with SCM (instead of PDS)
- Most useful if copying either the entire program or one long contiguous
block of code
There are two development patterns that you will want to employ to do this with RDz
1. Create a new empty file – saved as <newFileName>.cbl
2. Open a second (existing) COBOL program and
3. Copy all of the existing program into the new file.cbl
…or…
1. Create a new empty file – saved as <newFileName>.cbl
2. Open a second (existing) COBOL program and
3. Copy/Paste only specific portions of the existing program into the new file.cbl
Both have their uses, so let's have a look at how to proceed with them
101
 Creating New Programs Using Copy/Paste – Copy Entire Program
This you've done already, using code embedded in the slide notes:
1. Open an existing program source in the editor: StartApp.cbl
- Select all (Ctrl+A) then Copy (Ctrl+C) all of the statements in the program
2. Right-click over the cobol folder in z/OS Projects and select:
– New > File
– Name your new file: Start2.cbl
3. Click your mouse-pointer into the new file in the top-left hand corner (column 1,
row 1) and press Ctrl+V to paste the program statements you copied in step 1
4. Save the file (Ctrl+S)
5. Close both programs
 Repeat the above process:
- PrintApp.cbl – copy the entire program to: Print2.cbl
- TRMTRDZ.cbl – copy the entire program to: TRMT2.cbl
102
Creating New Programs Using Copy/Paste Code Blocks
Often it's easier to create new programs from non-contiguous blocks of code,
cannibalized from an existing program.
 Example – grab specific SELECT/ASSIGNS, Useful WORKING-STORAGE fields not
part of COPY or INCLUDE, a (couple of) paragraphs or a lengthy computation, etc.
This is easily done combining mouse-based copy/paste with the previous new
program technique or (even better) starting from a Template:
1.
2.
3.
4.
5.
6.
Open an existing to-be-copied program in the editor (we'll call this: From-Program)
Start from a program template, or create a new empty program as before (we'll call this: To-Program)
Maximize your Editors
Find and Select copy source within: From-Program
Paste the copied source into the appropriate area of: To-Program
Scroll down and find the next piece of code to copy in From-Program – repeat steps 5 & 6
103
 New Program File for Workshops
Steps:
 From this PowerPoint's Slide Notes:

Select all (Ctrl+A) then Copy (Ctrl+C) all of the statements in the program
– If you don't remember how to access Slide Notes return to slide#5 in this PowerPoint
 From z/OS Projects

Right-click over the cobol folder
and select:
– New
>
File
– Name the file: DFLOWRDZ.cbl


Click your mouse-pointer into the new file in the top-left hand corner (column 1, row 1)
and press Ctrl+V to paste the program statements you copied in step 1
Save the file (Ctrl+S)
104
 Workshop - Creating New Programs using Copy/Paste Code
With DFLOWRDZ.cbl open in the editor
1. Right-click over the cobol folder in z/OS Projects and select:
– New > File
– Name your new file: DFLOW2.cbl
2. Maximize your Editors (Double-click the tab)
3. (Using your mouse you will do the following):
3a. Select and (Right-click to) copy source from DFLOWRDZ
3b. (Right-click to) Paste the copied source into DFLOW2
3c. Scroll down in DFLOWRDZ and find the next piece of code to copy.
Repeat 3a, 3b and 3c - to copy from DFLOWRDZ to DFLOW2 as follows:
- The TRMTDATA and PATMSTR:
SELECT/ASSIGN
FDs and WORKING-STORAGE structures:
- INPATIENT-TREATMENT-REC, PATIENT-MASTER-REC
READ INTO Paragraphs (Paragraphs 900-READ-TRMTDATA and 500-CROSS-FILE-EDITS)
- Two or more non-adjacent:
WORKING-STORAGE 01 structures
If time permits, repeat this
Paragraphs – including the READ
workshop using sections of
SANDBOX to create another
new program
Save DFLOW2.cbl when finished
105
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
106
Working With Source Code Containing Hexadecimal Values

Many mainframe application programs, especially online IMS and CICS programs
that interact with screens contain EBCDIC binary or Hex values embedded in the
source
 Most often in copybooks
 Although not limited to copybooks.




Example: MOVE '.' TO WS-OUT-FIELD-NO-TRANS-IND.
On the mainframe – the character-set is EBCDIC – ergo, no issue
On workstations – because RDz's ISPF and LPEX editors expect ASCII source the
file transfer technology must translate EBCDIC to ASCII – which most of the time is
no problem except for in the case of source containing Hexadecimal values
What's the solution?
RDz "wraps" or encloses the EBCDIC hex characters on the way down from z/OS
– and displays them as empty squares in the editor

Current state:
 RDz version 7.6 and above – supports all hex values except : X'0D' X'0A'

If your file contains X'0D' or '0A' the file will be opened in read-only mode (which is
common for copybook use) – and the 0D/0A gets temporarily converted to '3F' in ASCII
 Embedded HEX characters do not affect any fields surrounding them in source
files
 You can edit hex values by entering Hex edit mode (next slide)
107
Working With Source Code Containing
Hex Values – continued
To view source lines that contain
embedded Hex characters:
 Select the source line
 Right-click and select:
 Source > Hex edit line
This Hex line view shows the text, and different source encodings
(essentially, ASCII vs. EBCDIC character set)
The bottom line (Source encoding Cp037) shows EBCDIC values
 To edit an EBCDIC hex value (like the 3F shown in the screen capture):
 Make your change in HEX (overtype the value)
 Press <Enter> before clicking your mouse out of the Hex line editor
108
Real-Time Syntax Validation
Validation Markers
 When the COBOL Validator does not understand
what you've coded, a yellow warning triangle
appears in the prefix column on the far left of the
editor
 If you mouse over the column you can get
context-specific language coding "hints"
You can enable/disable Validation from the
Preferences menu
Windows >
Preferences >
LPEX Editor >
System z LPEX Editor >
COBOL LPEX Editor
110
See Slide Notes
 Open-Ended Workshop
1. From the Slide Notes copy the code for test1
•
Use: Ctrl+A to select all lines, then press: Ctrl+C
2. From RDz – Create a new file in the chapter1 \cobol\ folder - named: test1.cbl
3. Paste the source you copied into the new file: Ctrl+V
4. 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.cbl code within the editor and
note the effect on the Outline View
5. Experiment with several of the ISPF editing options:
•
PF7/PF8
•
Prefix area
•
Find / Change commands
6. Experiment with hover
7. Experiment with validations (by editing in some COBOL syntax errors)
Press Ctrl+Z to undo the errors
8. Experiment with several of the RDz Hot-Key combinations
9. Press Ctrl+F and use the Find/Replace Dialog
10. From inside the source file:
- Scroll to the find the 200-PROCESS-RECORDS paragraph
- Click your mouse inside the paragraph
- Right-click and select: Open Perform Hierarchy
- Expand the entries – and consider how the Perform Hierarchy is different from the Outline View
11. Practice with any other techniques you've learned so far, then close the editor
111
Workshop – Syntax Validation
 Optional workshop:
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
If time permits find out what else
validation works for:
• Misspell variable name references
inside the Procedure Division
• (in test1.cbl) misspell paragraph names
in PERFORM statements
Do not save your changes
112
Different Content Assist options
Content Assist (Ctrl+Spacebar)
Content Assist allows you to code statements
by selecting values from a list after typing
partial text and pressing: Ctrl+Spacebar
The process:
 Partially type a:
 COBOL keyword
 Variable (including 88-level)
 Paragraph name
 Move your cursor immediately at the end of the
text you wish to use Content Assist to complete
"immediately" = the very next byte after the text
 Press Ctrl + Spacebar
 Select the completion identifier from the list –
which is sorted alphabetically within type
Benefits:
 Improves productivity
 Reduces typos and syntax errors
 Particularly helpful with lengthy COBOL identifiers
113
Workshop – Content Assist
Refactor the 300-WRAP-UP paragraph in
test1.cbl using Content Assist – and
move the file close statement into a new
Performed paragraph.
1.
2.
3.
4.
5.
6.
7.
Type in a new Paragraph name at the end of the
program
Enter a new blank line below the paragraph name
Type: cl and press Ctrl+Spacebar
 Select CLOSE
Use content assist to select both file names
(one at a time)
Add a period at the end of the CLOSE statement
Enter a blank line in place of the current CLOSE
statement in 300-WRAP-UP
Use Content Assist to select:
7a. PERFORM
7b. Your new paragraph name
3.
4.
7a.
7b.
When finished:
Save your changes and using the Context Menu do a Local
Syntax Check. Remove any syntax errors
114
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
115
Paragraph Control Flow Analysis
1.
Often you will need to discover a program's control flow
by tracing through a PERFORM chain or following
some GO TO statements
This is a straightforward process with RDz
1. Select (double-click) your starting paragraph name
Perform Hierarchy Paragraph Name List
2. Right-click and select: Open Perform Hierarchy
2.
 Paragraph relationships (nested PERFORM chain)
shown through indentation
116
Paragraph Control Flow Analysis – continued
If you wish to navigate to the paragraphs declaration in the source:
1. Double-click (to select) the paragraph in editor
2. Press F3 – or use the Context menu to Open Declaration
You can return to your original source position in the paragraph
control flow analysis by:
• Clicking a paragraph in the Perform Hierarchy …or…
Perform Hierarchy Paragraph Name List
• Pressing: Alt+Left arrow
• Expand the Hierarchy Name List - to see the nesting of the
PERFORM chain paragraph relationships (GO TO as well)
• Click a Paragraph name in the Perform Hierarchy view to navigate to that line within the source (Editor View)
117
 Workshop – Paragraph Flow Analysis
1.
2.
3.
4.
5.
Open TRMTRDZ.cbl in the editor
From the Outline view, click on the 100-MAINLINE paragraph
Double-click on the 100-MAINLINE paragraph name in the editor
Right-click and select: Perform Hierarchy
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
In the source editor:


Double-click (to select) a paragraph name
Press F3 – or use the Context menu and Open Declaration
9. 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
Alternatively, you can trace backwards/forwards through your code by pressing:


Alt-Left - to go back up through previously selected source lines
Alt-Right – to go forward through selected lines
118
Data Flow Analysis – Technique


Data Flow analysis is an iterative complex process, that involves
expanding the scope of searching, as new variables in the data flow are
discovered
On the mainframe, you either:
 Utilize listing files/SX-REF 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 in split-screen, etc.

Using RDz you:



This is:



Find your starting Search variable
Pin the Search View and double-click each found-reference
Not typing-intensive
Less error-prone
With RDz, all Search results are:


Fixed
Hyperlinked
119
Data Flow Analysis – RDz
Using RDz you will do the following:
 From your starting variable:
1. Select the field and search (using a menu) for all occurrences
2. "Pin" the search results
3. Double-click each result line – which co-locates the line in the editor
4. Analyze the statements operation
5. If another variable is indicated as being part of the Data Flow, return
to Step 1 and search on the next variable
We'll do a workshop on this, using a new program…
120
 Workshop – Data Analysis
Open DFLOWRDZ.cbl in the editor

1.
2.
From the command line, type: F WS-PHARM and press <Enter>
In the Editor source, Double-click (to select) WS-PHARMACY-CHARGES
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
121
 Workshop – Data Analysis – continued
4.
Double-click each line in the Search View
5.
Analyze each COBOL statement. If the operation would alter the value of some other variable
– the source code will synchronize in the Editor
(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
122
 Workshop – Data 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 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
123
Data Flow Analysis – Review

Data Flow analysis is an iterative complex process, that involves
expanding the scope of searching, as new variables in the data flow are
discovered

On the mainframe, you either:
 Utilize listing files/SX-REF 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 and error-prone
With lots of time spent loading programs into the editor in split-screen, etc.
Using RDz you:
1. Find your starting Search variable
2. Pin the Search View and double-click each reference
 There are static analysis tools from IBM that are dedicated to providing this
information, through ultra-quick and simple techniques (ask about Rational
Asset Analyzer)
124
UNIT
RDz for ISPF Developers
Topics:










The RDz Workbench – Terms and Concepts
Editing COBOL Programs
ISPF Prefix Area Commands
Editing With Keystroke Shortcuts
Find and Replace Dialog
Creating New Programs From Scratch
Miscellaneous Features – Hex edit, Content Assist
Paragraph (control flow) and Data Flow Analysis
Working with Copybooks and Property Files
Appendix – ISPF / LPEX Editor Comparison
125
Working With Copybooks - 1 of 2
Your programs most likely contain copybook or
Include files. To open them using RDz:
Set your mouse-focus inside the variable
 Right-Click
 Select: Open Copy Member
126
Other Copybook Development Facilities –
Show Dependencies - 2 of 2
Besides opening copybook/include files, it can be
useful to understand the "build dependencies"
necessary for your COBOL program to compile
successfully
From z/OS Project
 Right-Click over the file you want to run the report
against
 Select: Show Dependencies…
127
Enabling Your Project for Copybooks
Copybook and Include files are found by RDz searching in a SYSLIB property – a
project attribute set by doing the following:
 From the Window menu:
Show View > z/OS Project Views > Property Group Manager
 From the Property Group Manager View
1. Expand LOCAL
2. Right-click COBOL Sample Property Group, select: Edit…
 In the SYSLIB setting, enter the
fully-qualified directory structure
of where you will store your
project's copybooks



The SYSLIB directory must be within your project
The SYSLIB setting is case-sensitive to directory and folder names
In this example:
 d: - drive
 RDZProjectNew – my workspace folder
 chapter1 – my project folder in the workspace
 copy – a folder inside of the chapter1 project
128
 Workshop – Enabling Your Project for Copybooks (Part 1 of 2)
1. From the z/OS Projects explorer, create a new folder named
copy, in the chapter1 project
2. Following the five steps (on this and the previous slide) enable your
chapter1 project for copybooks by setting the SYSLIB property
to your copy folder, under chapter1 (remember, that SYSLIB is casesensitive)
3. Create the copybook source file in your SYSLIB directory
• Select and copy (Ctrl+C) all of the COBOL 01-record statement
declaration code in the Slide Notes
• Right-click over your new copy folder in your chapter1 project, and
select: New > File
A. Name your new file: cobtable.cpy
B. Paste (Ctrl+V) the copied source code into your new file
C. Save (Ctrl+S) the file
129
Slide Notes
 Workshop – Enabling Your Project for Copybooks (Part 2 of 2)
3. From the slide notes – select all (Ctrl+A) then copy (Ctrl+C) the large COBOL program source file
4. From Project Explorer – Create a new file under the \cobol\ folder, named: cntrlbrk.cbl
5. Paste the copied source code into this new file – starting at line1/position 1
6. Save (Ctrl+S) your new COBOL program
7. Experiment with all of the Copybook development techniques discussed – starting from five slides prior in this
unit:
 With cntrlbrk.cbl loaded into the editor: find the copy statement in the program source
 Press: Ctrl+F

Type copy in the find area and press <Enter>
 Double-click (to select) cobtable
 Right-click and from the Context Menu, select the options to:
 Browse Copy Member
 Open Copy Member
 Close the copybook
 Find a copybook variable in the Procedure Division:
 Ctrl+F


Type CUSTOMER-NAME in the find area and press <Enter>
Double-click to select CUSTOMER-NAME

Right-click and from the Context Menu select: Open Declaration
 Close the copybook
 From z/OS Project Explorer:
 Right-click over cntrlbrk.cbl

Select: Show Dependencies…
130
Program Code
in Slide Notes
Review – Benefits of Windowed Workbench Development
 Productivity
Parallel work
(Far) better use of screen "real estate"
(Far) less manual typing
 For navigation
 For development tasks
– This is primarily due to RDz "tooling"
Consistent quick, responsive PC performance
 CPU Resources
Most of what you do everyday can be done locally
 Conserves MIPS on development LPAR
131
®
IBM Software Group
Part III – Local Projects and Local Debug
© 2009 IBM Corporation
The RDz Workbench – Local Projects
 A Workspace
with a
number of
local z/OS
Projects
Drive\:Workspace
Note – all local
files reside on
your PC or on
a network
server

133
The RDz "Workbench" – Workspace and Project Organization
 You will work with a variety of COBOL resources: programs, copybooks, compile
listings, executables, data files and so forth
 Using RDz you store, organize and manage the resources associated with your
projects in a Workspace.
 After you launch RDz and select a Workspace (3 slides back), you have access to all the
files and folders inside the Workspace – typically organized in one or more projects.
 Workspace resources are organized into
- Project(s)
- Folders
Workspace
- Files
Projects
Folders 
Files

Mainframe note. Think of a Workspace as the equivalent of your
TSO account (without any accounting charge-backs)
134
What is a Project (and what's in a Project?)
Workspace projects organize and manage related application resources.
And projects within a workspace can be organized by:
 Batch application .. vs.. Online applications
 Lines of business/departmental applications: Accounts Payable, Inventory,
Claims, Manufacturing Part Assembly, etc.
 Common – or shared projects, which might consist of data and record
definitions that are used across multiple projects
 There are also a number of specific RDz project types that we will learn
about as we go through the course, such as z/OS Local Projects,
MVS Subprojects, etc.
 Projects also contain and are governed by build configuration files,
known as property files** which specify generation options for your project
components
 Projects may be further divided into folders
 z/OS COBOL Projects typically contain the following high-level folders:
BuildOutput, cobol, copy
Compile
Results
files
COBOL
Copybook
Source
 Note that you
can name the cobol
and copy folders
anything
you’d like (and
they're caseINsensitive.
 Distributed dev-note. Think of a build file as the equivalent of the build XML in a Java “ant”
file.
.NET developers – this is like your “build” file and build process
 Mainframe note. Think of a build file as the equivalent z/OS JCL or your SCM, in that entries and property
settings within a build file are used by the compiler to customize the resultant executables
135
What is in the \cobol\ folder?
\cobol\ is the default folder that is the highest level folder within a given project in your
workspace, under which COBOL program resources are organized.
These COBOL resources include:
 Sub-Folders – in case you'd like to further refine and break-down the organization of large
projects
cobol
 Note: The folder name
batch
\cobol\ is not required nor
program1.cbl
enforced
program2.cbl
…
online
program3.cbl
…
 Or in our case, just all COBOL files:
cobol
program1.cbl
program2.cbl
…
 By default, COBOL files should end with one of the following file-name extensions:
.cbl, .cob, .cobol
136
See Notes
What is in \BuildOutput\ ?
\BuildOutput\ is the default folder that is the highest level folder under which all of
your compiled COBOL resources are stored inside a project.
 These resources include:
 .OBJ – object modules
 .exe – COBOL executables – suitable for running or debugging
 .adt – an internal-system file used by RDz when you do source-level debugging produced by
a Compiler Directive)
 .lst – listing file 
- Shows highest error condition
- Sorted XRef of COBOL variables
- Other program info
See Notes
137
Paper/Pencil Review Questions
Where (under what folder and/or sub-folder) in your project would you look for
the following files?
StartApp.OBJ
_______________
StartApp.cbl
_______________
StartApp.exe
_______________
myCopy.cpy
_______________
StartApp.lst
_______________
True/False – all COBOL source files (each and every one) will:
a. End with an extension of .COBOL
b. Be organized and exist under the \COBOL\ folder – or a sub-folder under the
\cobol\ folder in your project
 Note – if you do not know what these file types are, do not worry, we will
be covering them and their use a bit later in the course.
138
See Notes
UNIT
The RDz Workbench
Topics:
 The RDz Workbench – Terms and Concepts
 Editing COBOL Programs
 Debugging COBOL Programs
 Appendices - ISPF / LPEX Comparison
139
Topic objectives
After completing this topic, you should be able to:
Describe the configuration model for running and/or debugging local COBOL
applications
Create a Launch Configuration – for running and/or debugging local COBOL
application
Define COBOL ENVIRONMENT DIVISION entries compatible with Windows PC
COBOL work
Run local COBOL applications – that respond to ACCEPT/DISPLAY UI
Debug local COBOL applications and use the majority of the RDz COBOL source
debugging features successfully
 Workshops
–
As mentioned previously, note that for most (at least
where marked on the slide with the:  symbol ) of the slides in this
topic, you should experiment with the editing technique shown.
The COBOL source in the Slide Notes might not always match the screen
capture, but should be usable for the technique.
140
Local COBOL Application Executable Resource Model
 You can run and/or debug your COBOL applications as standalone Windows
executables.
 To do this, you will need the following:
 Clean compile of your entire project (Note – not just the COBOL program you wish to run or
debug, there can be no syntax errors above warning-level in the project)
 A Launch Configuration – which defines parameters, and other settings needed to debug
or run your application as an executable, on Windows
 Your source available
 Your input files and output files specified in PC-COBOL SELECT/ASSIGN syntax
Parms
Launch
Configuration
+
COBOL .exe
Running – or
Debugged
UDB
Local DB2
Database
Sequential
Input/Output
Files
Output
Reports
141
A Tale of Two Perspectives – z/OS Projects Perspective and the Debug Perspective
 "Perspectives" - Recall that a "Perspective" is a
convenient grouping for a collection of views organized around
a given role or task
 So far in this unit you've used the z/OS Projects Perspective – to learn:
 About RDz
 Understand the use of Projects, Views and other eclipse facilities
 How the editor works – features, typical development workflow, etc.
 In this section we will introduce you to the Debug Perspective – which
allows you to do source-code (line-by-line) testing of your COBOL logic
 We will start by showing you how to debug local (Workstation-based) COBOL
programs
 In subsequent units we'll learn how to debug mainframe applications (batch
and online)
 Both local and mainframe debug facilities are almost 100% identical
 Learning how to do local debugging will set you up for learning the mainframe
debugging features
142
Steps in Debugging Local Workstation Projects
You will need the following:
1. A project – that compiles clean
2. One or more COBOL programs to debug
3. A Debug Configuration
Let's start by creating a new project.
But – in order to save time and focus on debugging per se' – we'll use one of the
example projects that ships with RDz
Debug
Configuration
UDB
Local DB2
Database
Sequential
Input/Output
Files
RDz Debug
Perspective
COBOL.exe +
Called
modules
Output
Reports
143
Create a new Workstation COBOL Project
Open the File menu and select:
 New
> Example…


Expand Workstation COBOL
Select COBOL Sample 1 and click: Next

From Example Project
 Name your project, and click:
Finish
144
Load a COBOL Program into the Editor Area (Editor)

From z/OS Projects, Double-click StartApp.cbl (to load the source into the editor)
 Browse (scroll) in the file and view some of the code – note that this is not a mainframe
application. It is a PC-COBOL program to be debugged on your Workstation
 Double-click: PrintApp.cbl and have a look at some of the statements

Note: Please
don't change
any of the
code in the
programs,
yet
145
Prepare Your Application for Debug – Rebuild

From z/OS Projects, Expand the BuildOutput folder
 Note that this example project comes already-compiled. How
can we tell? Because there is a:


BuildOutput folder 
Executable (in this case, StartApp.exe) in BuildOutput
 Sadly, your custom projects will not come ready-made like this,
so we'll have to learn how to create executables
 Note also that icon to the left of StartApp.cbl has a purple
background


This denotes that StartApp is the "entry point" into the application.
Basically StartApp's PROCEDURE DIVISION is where the operating system begins execution
–
If you're an ex-Java or C/C++ developer think of StartApp as "main"
 Build a project
 (optional but a Best Practice) – Select (Right-Click) and delete
the entire BuildOutput folder … really - it's okay - go ahead 



At the warning-confirmation prompt, click: Delete
Note – the reason for doing this, is that you will easily be able to tell if your project build is
successful (if there are compile errors, BuildOutput is not created by the Rebuild step)
Right-Click again over your project, and from the Context Menu, select
Rebuild Project (note that it is at the bottom of the Context Menu options list)

This should re-create the BuildOutput folder including StartApp.exe
146
Create your Debug Configuration

Recall that you will need to define a
configuration file for debugging.
This is a one-time-per-project step,
and is very simple:
 Right-Click over your Project
 From the Context-Menu select:


Debug As >
Debug Configurations…
From the Debug Configurations dialog:
 Double-Click: Compiled Application

This will create a new configuration,
named (appropriately enough):
New_configuration
See Notes

147
Specify the Configuration Properties
1. Name your
configuration
1.
2.
Select the Program name:
2. click the Browse…
button (as shown)
and from the
Open dialog:
-Expand BuildOutput
-Double-Click StartApp
Note that if your
StartApp shows
as: StartApp.exe
– that's the one
you want
3. The Open dialog will close, and from the
Configuration Properties dialog,
click: Debug
148
Debug – Initial Prompts

Two small prompts will popup:
 Click Yes to Confirm Perspective Switch

To enter the Debug Perspective, and use
better views for your work
 A DOS window appears (briefly) and becomes a Windows background task. This DOS
window is still
available from your
PC's toolbar, and in
fact represents the
operator's console
(all COBOL
ACCEPT/DISPLAY
statements pipe
their input/output
to this window)
149
The Debug Perspective – Views and Facilities
Toolbar 

Debugger Breakpoints View
Program Variables View
 Your code
Program Outline View
150
The Debug Perspective – Debug Toolbar Icons


There are a few different ways of
stepping through your code
One of the simplest is to use the icons
on the Debug view toolbar






Resume – Run from break-point to breakpoint in your code, or until your program ends
Suspend – Stop running your code (the Debugger will wait for you to do something)
Terminate – Stop your debug session
Animated step – Debug through your code line-by-line. Stop at breakpoints
Step into – Execute the current instruction (one COBOL statement at a time)
Step over – Execute the current instruction. If the current instruction is a CALL or
PERFORM, resume (run through) all of the statements in the procedure being called and
stop:



On the next sequential instruction
On a break point inside the CALL or PERFORM procedure
If the debug session (or your application Entry Point program) ends
 Step return – (used within a called module or performed paragraph) – resume (run)
through the rest of the statements and stop (debug) on the next sequential instruction after
the CALL or PERFORM statement
 Use Step filters – Filters out Assembly-language instructions - Be sure this icon is clicked
on as shown. If not (if filtering is not clicked on) you will see assembly language code
 Enable/Disable Step by step debug
 Debug daemon – Displays status and properties of the debug listener
151
Debug – Simple Stepping

From the Debug toolbar:
 Click the Step into icon (shown below), or press F5
 Your program will debug line by line
 Note that as variable values change the Variables view display turns bright yellow for
the fields that have been modified by the statement
152
Debug – Console IO

When your code reaches an Accept or Display statement:
 From the toolbar, click the Windows DOS box and answer the prompt


For Accept – type in a value and press  Enter
For Display – you can see what the statement IO does in the DOS box
 In either case, your Debug session goes into a "wait state" until you respond to the
prompt
153
Debug – Variable Values

Can be seen from the:
 Variables view
 Monitor List view


Right-click inside view
Select
–
Add variable to Monitor List
 Hover-help (mouse-over) in the Source code view
154
Change Variable Values Dynamically (on the fly) During Debug

From the Variables view
 Select a variable value
 Over-type the value
 Press Enter

To see the variable value in Hex
 Select the variable
 Right-click
 From the context-menu, select  1 Hexadecimal
155
Additional Features from the Variables (Right-Click) Context Menu

From the Variables view
 Select a variable value
 Right-Click and try:

Find
Filter Find by keying in text

Very useful for large programs
Also Right-Click
 Copy Variables
 Paste to Notepad
156
Debug – Passing Execution from Program to Program

When a call is made to another
program in your application

The called program is dynamically loaded into the debugger
157
Debug – Passing Execution from Program to Program

When the called program's GOBACK instruction is executed:
 The called program is flushed from the Debugger
 Control returns to the calling program

Please finish debugging this application (Note: you will have to enter Q to quit/end)
158
Ending a Debug Session and Starting Over

When your "main" program's
GOBACK or STOP RUN is
executed (or if there's a
program execution failure)
your debug session will
terminate

Click OK and:
 Return to the z/OS Projects perspective – to continue
analyze/edit/compile (top right-hand corner of your workbench)
…or…
 Start another Debug session:


Press F11 …or…
Click the green bug on the toolbar
159
To Set and Debug with Unconditional Breakpoints

From within a Debug Session
 Scroll to the line you wish to
stop at
 Double-click in the
left-hand margin of the
source code area
 Double-click again to unset
a previously-set Breakpoint
 Press F8 or click the
Resume icon to run to
your Breakpoint
160
What Other Kinds of Breakpoints Exist

All of the major types of Breakpoints
are available

Try experimenting with:
 Entry Breakpoint


Zoom through StartApp
Debug through PrintApp
161
What Other Debug Options are Available?

Actually, quite a few

During Debug, Right-click over the left-hand margin
 Add Breakpoint
 Jump to location – Causes immediate unconditional branch to the line your mouse is pointing to

Like a GOTO – and does not alter program storage (variable values)
 Run to location – Executes all code between the current line, and the line your mouse is pointing to

Like a PERFORM – and could alter program storage
 Add Bookmark…
 Add Task…

Animated Debug
 Using default speed
 Altered animation speed 
162
Iterate Over Complex Code (Debug Option)

While in PrintApp.cbl
 Debug to the GOBACK
 Change the value of IN-NAME
 Right-click over the margin
 Jump to line 46
 Debug (step) through code again
163
Absolutely Through Debugging?

Best Practice to remove Debugger
modules from storage
 Right-click over <terminated>
 Select Remove All Terminated
 Return to z/OS Projects
164
 Workshop Debugging – 1 of 6

From the File menu, select:
 New >
 Example…

Expand Workstation COBOL

Select COBOL Sample 1

Click Next >

Name the project:

Click Finish
DebugLab
165
See Notes
 Workshop Debugging – 2 of 6

From z/OS Projects
 Right-click over the project and select:
Rebuild Project
 Expand BuildOutput
 Right-click over StartApp.exe, and
select:
 Debug As >
 Debug Configurations

From Debug Configurations
 Select Compiled Application
 Click the New launch configuration
icon
 Name the Debug Configuration

Instructions continue on the next slide…
166
 Workshop Debugging – 3 of 6

In the Program name: area:
 Click Browse…
 Use the Windows dialog to
find and select the directory
for your Workspace\Project\
BuildOutput folder and
StartApp.exe file
 Note that the icon might
not show the file suffix –
select the run icon as
shown

Click Open
From the Debug Configuration
window click:
 Apply
 Debug
Click "Yes" at the Confirm
Perspective Switch prompt
167
 Workshop Debugging – 4 of 6
Apply the Debugging techniques you
learned in this section:
Breakpoints:
 Entry to PRINTAPP 
 On specific lines
 Remove breakpoints (you've added)
Step into the code
 Use the various step options
Run to your breakpoints
If you run past the breakpoints and would like to start again, use the toolbar to
restart your Debug session:
If you'd like to just stop, hit the Terminate sign, on the toolbar:
168
 Workshop Debugging – 5 of 6
From the Variables and Monitors tabs:
 Modify values on the fly
 Monitor variables
 Detach the Monitored variable list
169
 Workshop Debugging – 6 of 6
Other techniques:
 Mouse-over hover value
 Jump to/Run to Location
 Add Tasks and Bookmarks
 Use the Context Menu
 Terminate and remove all terminated debug
sessions when done
 Return to the z/OS Perspective
170
Enterprise Modernization for IBM System z:
Local IBM z/OS application development with
IBM Rational Developer for System z
Final Workshop – Optional
 In order to pull together all of the edit, compile and debug techniques
described in this section, if time permits at work:
Please go to the Enterprise Modernization Sandbox
 http://www.ibm.com/developerworks/downloads/emsandbox/systemz_applications.html
Select and print out the following PDS
 http://download.boulder.ibm.com/ibmdl/pub/software/dw/rational/emz/Local_IBM_zOS_application_development.pdf
Follow the Sandbox Slides to:
 Register
 Download and install the Citrix client
(first-time only)
 Use the Sandbox
And follow the detailed
Instructions in the
IBM Proof of Technology lab
171
Topic Summary
After having completed this topic, you should now be able to:
Describe the configuration model for running and/or debugging local COBOL
applications
Create a Launch Configuration – for running and/or debugging local COBOL
application
Define COBOL ENVIRONMENT DIVISION entries compatible with Windows PC
COBOL work
Run local COBOL applications – that respond to ACCEPT/DISPLAY UI
Debug local COBOL applications and use the majority of the RDz COBOL source
debugging features successfully
172
®
IBM Software Group
Rational Developer for System z – Introduction
Appendices
UNIT
RDz Introduction
Topics:
• The RDz Workbench – Terms and Concepts
• Editing COBOL Programs
• Debugging COBOL Programs
 Appendix – Additional RDz Knowledge Transfer
 Creating a new Workstation Project
 Appendix – ISPF/LPEX Editor Comparison
174
The IBM Education Assistant
 The Education Assistant has a number of detailed and useful Camtasias that show use cases
for both RDz (standalone) and RDz integrated with other tools (such as Rational Team
Concert)
http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp
175
The RDz Café
 IBM's RDz and COBOL Cafés contain white papers, links to additional learning resources and
Q&A forums. The forums are reviewed by the RDz development team – who send out
responses first-hand to technical questions.
http://www-949.ibm.com/software/rational/cafe/community/cobol/rdz?view=overview
176
UNIT
RDz Introduction
Topics:
• The RDz Workbench – Terms and Concepts
• Editing COBOL Programs
• Debugging COBOL Programs
 Appendix – Creating a New Workstation Project
 Appendix – ISPF/LPEX Editor Comparison
177
 Installation Verification Procedure – 1 of 5

From the File menu, select:
 New >
 Example…

Expand Workstation COBOL

Select COBOL Sample 1

Click Next >

Name the project:

Click Finish
chapter1
178
See Notes
 Installation Verification
Procedure – 2 of 5
From z/OS Projects
 Double-click
StartApp.cbl
 This will load the
program source into the
COBOL editor

Scroll around in the
source file – and have
your first look at a
COBOL program (not so
scary… )
 Don't change any of the
source (yet)
 But you can size the
editor window to see
more source
 Note that in the next course
unit ("RDz Workbench") –
we will cover the tools and
development facilities you're
looking at.
179
 Installation Verification Procedure – 3 of 5

From z/OS Projects
 Expand BuildOutput
 Right-click over StartApp.exe,
and select:
 Run As >
 Run Configurations

Note that if you do not see a
BuildOutput folder:
 Right-click over the chapter1
project
 From the context menu select:
Rebuild Project

From Run Configurations
 Select Compiled Application
 Click the New launch configuration
icon

Instructions continue on the next slide…
180
 Installation Verification Procedure – 4 of 5

In the Project area, type:
chapter1

In the Program name:
area:
 Click Browse…
 Use the Windows dialog
to find and select the
directory for your
Workspace\Project\
BuildOutput folder and
StartApp.exe file
 Note that the icon
might not show the file
suffix – select the run
icon as shown
 Click Open

From the Run
Configuration window
click:
 Apply
 Run
181
 Installation Verification Procedure – 5 of 5
This will launch a DOS application that prompts you for either a name, or a Q (upper or
lower-case) to quit
 Enter a few names – after each name, press the Enter key
 Enter: Q to quit
 Optional:
Browse through the
StartApp and PrintApp
program source. If you're
an experienced COBOL
programmer taking this
course to learn RDz, note
the differences between
these two programs and the
COBOL datasets you typically
work with
182
®
IBM Software Group
Appendix 2 DLI Model Utility Plug-in
© 2009 IBM Corporation
Visualize your IMS Data - The DLIModel Utility
 An RDz "plug-in" that offers a visual representation of IMS PSB and DBDs and
simplifies IMS metadata generation
 Available as a free download
SEGM
NAME=HOSPITAL,
PARENT=0,
BYTES=(16000,12100),
RULES=(LLL,HERE)
FIELD
NAME=(HOSPCODE,SEQ,U),
START=3,
BYTES=12,
TYPE=C
FIELD NAME=(HOSPNAME),
START=15,
BYTES=17,
TYPE=C
184
What Does the DLI Model Utility Do?
 The Utility reads in a number of source
files:
PSB
DBD
COBOL or PL/I copybook(s)
…and creates:
An interactive graphical model of the
database (prior slide)
A text-based database model report
Several Java artifacts for SOA and for
working with Java applications
 We will not focus on these in this section
 You can read about them in the product
doc or online help file
185
What is Needed for the DLIModel Utility – 1 of 10
 Download your source files – including the entire IMS Gen job stream
Note the following:
 (In the current release) that the physical file name must match the DBD or PSB name:
– BMP255.PSB
– DEDBJN21.DBD
 Your DBD and PSB jobs must "gen"
– They must be syntactically accurate
– They must adhere to the DL/I data structure and processing rules
 In our example, we are using the following:
DEDBJN21.DBD
BMP255.PSB
ivpdb1.DBD
ivpdb1i.DBD
186
The source code for these files
can be found in your slide notes
(for this slide)
1. Enter the slide Notes View
2. Copy/Paste the source into
separate files
3. Save these files to your
Workstation
(Optional) Add the IMS Resources to a Local RDz Project – 2 of 10
 After you have your DBD and PSB files downloaded to your workstation,
you will probably want to add these files to a Local RDz Project
 To do this, from the File Menu:
Select Import
File System – as the source:
 Click Next
Browse to the:
 Source Directory
– Where you saved the files
 Into folder:
– An existing project folder
Click Finish
 From your project, Refresh the folder view
187
How to Install the DLIModel Utility – 3 of 10
 Close RDz – if you are currently using the product
 Download the plug-in:
From: http://www-01.ibm.com/software/data/ims/soa-integration-suite/enterprise-suite/dlimodel-utility/
 Scroll to the Download area, and click: IMS DLIModel utility plugin
 You will have to login to DeveloperWorks
 Download the plug-in file to your workstation
 Install the plug-in:
On your workstation
 From your RDz "Shared Packages" directory 
– Open the  plugins directory
– Copy the DLIModel file into it
Note that your directories will most
 Restart RDz
likely not look exactly like these screen
captures
188
How to Create a Model – 4 of 10
 From the IMS Perspective
Switch to the IMS Perspective
 Create a DLIModel Utility Project:
From File
 Select: New > DLIModel Utility Project
Name your Project:
Click: Next >
189
How to Create a Model – 5 of 10
 Import the PSB and DBD
source files you downloaded
to your workstation, and
Imported into a local z/OS
Project
Choose the PSB Source
 From directory:
– Select one or more PSB
source files
Choose the DBD Source
 From directory:
– Select one or more DBD
source files
 Click Finish
190
Your DLI Model – 6 of 10
 When the Utility finishes – assuming there are no generation errors, you should see:
 .mdl file: Graphic depiction of the segments in the hierarchy
 Your project expanded in the Package Explorer
191
Using the DLI Model – Optimizing Your View – 7 of 10
 A few things to note:
If your PSB/DBD view is large, you will probably want to see an Outline view of
the database:
 From Window > Show View…
– Select Outline
– You can use the Outline view to move around inside the model 
Alternatively on the toolbar you can configure the resolution of the graphics
shown in the workbench:
192
Using the DLI Model – What are
you Looking at? – 8 of 10
 Each database PCB in your
PSB is displayed in its own tab
 The lines denote relationships,
established by the:
Segment
Key
Fields
DBD: SEGM/PARENT
PSB: SENSEG/PARENT
 See Slide Notes on Secondary
Index and IMS Logical database
support
 Select any segment in the
hierarchy
Note the Properties view of the
segment
 Expand a segment to see DBD
FIELD definitions
Different icons separate key
fields
Select a segment field and
view Properties
193
The DLI Model Context Menu – 9 of 10
 As of this writing, the Context Menu offers the
following choices:
Edit – which adds an alias into the XML produced for
the database – it does not change the PSB or DBD
source
Import COBOL Fields (next slide)
Add Field – again, adding to the XML produced
Print
Expand/Collapse – are shortcuts to different
database viewing options
Reset Layout – will re-establish the dimensions of
your hierarchy to their initial display defaults, if you've
moved a segment graphic around on-screen
Properties – sets focus to the Properties view
194
Adding COBOL Fields to Your Model – 9 of 10


Often in IMS applications, the DBD/PSB will not specify all of the fields that occupy
bytes in a segment. And it is left up to COBOL and PL/I copybooks to essentially
redefine a large area as specific logical fields.
To superimpose the COBOL fields on your model:
1. Find/Select the COBOL copybook:
 Note – a set of declarations for a single source file (named: patient.cpy) has been added to the
slide notes. Using the techniques shown earlier in this section, create a file and add it to your RDz
workspace
2. From the graphical model:
1. Select the segment
2. Right-click and select: Import COBOL Fields
3. Browse to the directory on your
workstation where your COBOL
copybook can be found.
4. Check the file
5. Ensure that: To segment is correct
6. Click Select
7. If you have no more copybooks to
map, click Finish
195
Adding COBOL Fields to Your Model – 10 of 10

Re-display your view, and note the new COBOL fields – shown with the correct
Byte displacements in your segment's graphic
196
®
IBM Software Group
Appendix 3 ISPF  RDz Editor Cheat Sheets
© 2009 IBM Corporation
RDz – z/OS Comparison Concepts and Products and TSO
TSO/ISPF
RDz – Integrated Development Environment
Mainframe – z/OS
PC – Windows/Linux
JCL
JCL. If doing offloading from z/OS. Shell scripts – on AIX machines
Manually analyze code
RDz (see slides in this PowerPoint), and RAAi - http://www-01.ibm.com/software/awdtools/raa/
Edit Code - ISPF
LPEX editor. Native LPEX or ISPF profile
Compile/Compiler Options
Validation, Syntax Check (Local or Remote) – Compiler options under RDz Property Groups
Submit Job
Edit JCL and submit job, or just use the Context menu and Submit
Unit Test – DISPLAY/READY Trace, Xpeditor
Debug Perspective – for z/OS (batch and online) applications – as well as Local COBOL projects
Integration Test – Xpeditor
IBM Debug Tool Integration
QA – Regression Test - WinRunner
Remote Systems Testing utilizing Rational Function Tester and Rational Performance Tester
ABEND-AID/IBM Fault Analyzer
RDz – Integrated Fault Analyzer from the IBM Problem Determination Tools
File-Aid/IBM File Manager
RDz – Integrated File Manager from the IBM Problem Determination Tools
PDS (library)
Folders - For Remote/SCM-based Projects and Local (z/OS) Projects
JES
Remote Systems View / JES functionality
Endevor/ChangeMan – or Your SCLM
3rd Party SCMs utilize RDz's CARMA feature. RTCz and SCLM utilizing the SCLM provide their
own RDz views. And there is Local History and source compare in native RDz
ISPF Option 0
Window, Preferences
ISPF Option 1 and Option 2
RDz Editor
ISPF Option 3.1 (Library Utilities)
Remote Systems view (Context Menu options)
ISPF Option 3.2 (Dataset Utilities)
Remote Systems view (Context Menu options)
ISPF Option 3.3 (Move and Copy)
Remote Systems view (Context Menu options)
ISPF Option 3.4 (DSList)
Project Explorer and Filters and Context Menu in Remote Systems Explorer and LPEX Editor
ISPF Option 3.8 (Outlist)
Remote Systems View – JES/My Jobs
ISPF Option 3.11  3.15 (Extended Search)
Search menu – covered in another RDz Distance Learning module
ISPF Option 4 (Foreground)
Context Menu, Run
ISPF Option 6
TSO Command Shell – with some functional limitations (e.g. cannot issue Host Execs)
ISHELL
Remote Systems Explorer - USS files/filters + Context menu
OMVS
USS Command Shell
198
RDz – ISPF Comparison Chart – PF-Keys
ISPF Editor
LPEX Editor
PF 1 = Help
F1, Help Menu*** See slide notes
PF 2 = Split: Split the session (lets you use
two functions of TSO at the same time.)
Ctrl/2 or Context Menu – Open New View. Note that you can open
an unlimited number of views
PF 3 = End
Ctrl+F4, Ctrl + 0, or close the Content Area
PF 4 = Return
Ctrl+F4, or close the Content Area
PF 5 = RFind (repeat last find )
F5 or Ctrl/F – and /<text> from LPEX command
PF = 6 RChange (repeat lst change)
F6 or Ctrl/N
PF = 7 Page Backward
F7 or PgUp key – or slider in window
PF = 8 Page forward
F8 or PgDn key – or slider in window
PF = 9 Switch between screens during a split
session; goes with PF 2
Mouse – or Alt + Shift + Right/Left arrows
PF = 10 Page left
Ctrl+PgUp or, the Home key, or slider in window
PF = 11 Page right
Ctrl+PgDn or, the End key, or slider in Window
PF 12 Retrieve
For LPEX commands, the Up Arrow
Use ISPF Option 0 to customize PF-Keys
Use Preferences to customize and extend Function key behavior
The LPEX Context Menu can be accessed from the Right-mouse button – and from the Windows Menu key (on the keyboard
between the right Alt & Ctrl keys)
It should be noted that with the LPEX editor, it is not necessary for most of the above functions to actually press Ctrl/Key
combinations, as the functionality is available from a context menu (right-mouse)
199
RDz – ISPF Comparison Chart – Primary Edit Commands
ISPF Editor
LPEX Editor
Home key – Jump to the Command Line
Escape key – jumps to the LPEX command line
AUTOSAVE/REC
Prompt for Save on exit, and Autosave (Preferences), and the asterisk – next to unsaved file
names
BOTtom
LPEX command: bottom / Ctrl+End
CANcel
Close Content Area w/Save no (Ctrl
CHANGE – All – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST,
WORD, PREV, [col-1] [col-2]
Supported using Change All, Next, PREV, Prefix and Suffix (with wildcards), Prev, Word, [col1][col-2], …or… Find/Replace menu (Ctrl+F), ISPF or the Search/Replace dialog:
Copy Member Name
LPEX command: Get filename
CREATE
Save file as…, or use Snippets View
FIND – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, WORD,
PREV, [col-1] [col-2]
http://www.felgall.com/tso2.htm
Supported using findText, Ctrl+F, or the Search window: Find All, Next, PREV, Prefix and Suffix
(with wildcards), Prev, Word, [col-1][col-2], P
Not supported: First, Last
HEX – Displays all lines in Hexadecimal
Display one individual lines in Hex
ISPF Macros
Not available – but can be re-written using Java for LPEX. Also, note that with the LPEX
functionality some of the Macro functionality may not be necessary
LOCATE
Ctrl+L, or use the Outline View
MODEL
Snippets and Templates (both options)
MOVE Member Name
LPEX Get command, in a different way, the Snippets View
NUMBER
LPEX command: number std (columns 7380), or number cob
PRINT – from ISPF 3.4
LPEX command: print, or Ctrl+P
PROFILE – are the changes made to your profile
Preferences
Replace Member Name
Snippets functionality
RESet
RES command, or: Ctrl+W, or expandAll, or: action showAll
Save
Ctrl/S or LPEX: save command
Sort
LPEX command: sort
STATS – updates statistics
Windows updates file statisticsautomatically
SUBmit
LPEX command: Submit, or edit JCL/Context Menu/Submit, or use Context Menu/Submit option
TABS
Set margins in Preferences, LPEX Editor, Tabs
TOP
LPEX command: top / Ctrl+Home
TSO SUB
LPEX command: submit, and edit JCL/Context Menu/Submit, or use Context Menu/Submit option
UNNUM
LPEX command:
200 unnum
RDz – ISPF Comparison Chart – Find Commands – Picture Strings
ISPF Editor
LPEX Editor
Simple String
Y
Previous String
Find Previous / F5
Delimited String
Y
Text string
Y
Picture Strings – special characters
Y – with regular expressions
P'=' – any character
Ctlr+F,  Regular Expression,
P'-' – any non-blank character
Ctlr+F,  Regular Expression,
P'.' – any non-displayable character
Ctlr+F,  Regular Expression,
P'#' – any numeric character
Ctlr+F,  Regular Expression,
P'-' – any non-numeric character
Ctlr+F,  Regular Expression,
P'@' – any alphabetic character
Ctlr+F,  Regular Expression,
P'<' – any lower-case character
Ctlr+F,  Regular Expression,
P'>' any upper-case alphabetic character
Ctlr+F,  Regular Expression,
P'$' – any special character (not alphanumeric)
Ctlr+F,  Regular Expression,
^
.
Dot, any single
character
\
logical NOT
.
\x
Hexadecimal
[^\s]
[^\x20-\x7E]
[0-9]
[^0-9\x20]
[A-Za-z]
[a-z]
[A-Z]
[^A-Za-z0-9]
Ctrl+F
Note: for more Regular expression searches: http://en.wikipedia.org/wiki/Regular_expression
201
special Expression
RDz – ISPF Comparison Chart – Prefix Area Commands
ISPF Editor
LPEX Editor – ISPF Mode
LPEX Editor – lpex Mode
A, An – After
A, An
Context menu
B, Bn – Before
B, Bn
Context menu
COLS – show columns
Columns always shown
Columns always shown
C, Cn, CC – Copy
C, Cn, CC
Context menu
D, Dn, DD
D, Dn, DD
Context menu or Ctrl+Backspace
F, Fn – First (used with eXclude)
F, Fn (used with eXclude)
N - Find excludes lines of code
I, In – Insert lines
I, In
Press <Enter>, or
LPEX command: insert
LPEX command: add
L, Ln – Last (used with eXclude)
N - Find excludes lines of code
N - Find excludes lines of code
M, Mn, MM – Move
M, Mn, MM-Move, and Context menu
Context menu
R, Rn, RR, RRn – Repeat lines
R, Rn, RR, RRn, and Context menu, Ctrl+D
Context menu – or Ctrl+D
S, Sn – Show (used with eXclude)
S, Sn – Show (used with eXclude) and Filter
Filter
TABS – used with TAB On
Set with Preferences
Set with Preferences
X, Xn, XX eXclude
X, Xn, XX
Filter
O, On, OO – Overlay
O, On, OO
Use Rectangle Copy/Paste
LC, UC – Lower-case/Upper-case
LC, UC
Use the Context menu
TS, TSn – Text Split
Ctrl+<Enter>
<Enter>
<, <n, <<N Shift Data Left
<, <n, <<n
Use Rectangle Select – shift
>, >n, >>n Shift Data right
>, >n, >>n
Use Rectangle Select – shift
(, (n, ((, ((N – columns left – Used
with COBOL
(, (n, ((n
Use Rectangle Select – shift
), )n, )), ))n – Columns Right
), )n, ))n
Use Rectangle Select – shift
202
RDz – ISPF Comparison Chart – LPEX Editing Operations – 1 of 2
LPEX Editor
ISPF Editor
Refactor – Remove Noise Words: - IS, THEN, PROCEED TO
N/A
Multiple Line Comment/Uncomment
N/A
Virtual margins – in the editor
N/A
Code completion (Content Assist)
N/A
Open Copybook
N/A
Open Declaration – of variable or PERFORM'd paragraph from anywhere in the
Procedure Division
N/A
Perform Hierarchy
N/A
Refactor – wizard for intelligent variable name changes
N/A
Outline View
N/A
Filter View – Show only Divisions, SQL,CICS,DL/I, Code (no comments), etc.
N/A
COBOL, PL/I and HLASM keyword / language help
N/A
Show lines that have been changed during edit (before save)
N/A
Find and Change against multiple file types
N/A
Block Marking (Ctrl+Down, Ctrl+Up, Ctrl+Home, Ctrl+End)
N/A
Virtual 'A' and 'B' Column lines in the source code
N/A
Allocate Like
N/A
Remote System Filters
N/A
Side-by-side Compare and/or Restore from Local History
N/A
Close all split screens in one operation (context menu)
N/A
See file attributes and statistics at all times (in a View)
N/A
203
RDz – ISPF Comparison Chart – LPEX Editing Operations
LPEX Editor
ISPF Editor
See file attributes and statistics at all times (in a View)
N/A
Wizard-driven approach to creating Web Services (WSDL files) from: CICS and IMS TM
applications
N/A
Wizard-driven approach to creating, testing and deploying DB2 Stored Procedures
N/A
Copy files from one LPAR to another
N/A
Edit/Compile/Unit Test if the mainframe is offline
N/A
Syntax error – automatically select line with problem
N/A
See 46  76 lines of source at once
N/A
Templatized program development
N/A
Regular expression searches – including across Filtered files of different file types
N/A
Keystroke recorder (useful for repetitive tasks and online testing)
N/A
Bookmark and Tasks (both lines of source and filtered views)
N/A
Find "Last Changed" line of source code / Ctrl+J
N/A
Mark lines – including individual names
N/A
Find Marked Lines / Find named Marked Lines
N/A
Syntax errors as you type
N/A
Syntax check in the editor
N/A
204
The COBOL Café and Rational - z/OS Product Training from IBM
http://www-949.ibm.com/software/rational/cafe/community/cobol
 To become more innovative and more competitive, companies know that
education – in all forms is necessary - today more than ever.
 To help, IBM has implemented solutions that feature community-based
knowledge sharing - that give your developers instant, secure access to
shared content, and expertise in:
 COBOL / IMS / CICS / DB2 and z/OS Technologies
 Rational Developer for System z (RDz)
 Rational Application Analyzer (RAA)
 Check out the COBOL Café
http://www-949.ibm.com/software/rational/cafe/community/cobol
 And check out upcoming free, self-paced IBM training in:
 RDz / RAA / COBOL / IMS / CICS / DB2
205
© Copyright IBM Corporation 2009. All rights reserved. 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. 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, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are 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.
206