Top Banner
® IBM Software Group © January 1 st , 2013 IBM Corporation Jon Sayles Jon Sayles RDz Technical Enablement RDz Technical Enablement [email protected] Introduction to Rational Developer for System Introduction to Rational Developer for System z z For ISPF Developers – For ISPF Developers – PL/I PL/I
238

® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement [email protected] Introduction to Rational Developer for.

Dec 27, 2015

Download

Documents

Christine Wood
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

®

IBM Software Group

© January 1st, 2013IBM Corporation

Jon SaylesJon Sayles

RDz Technical EnablementRDz Technical Enablement

[email protected]

Introduction to Rational Developer for System z Introduction to Rational Developer for System z For ISPF Developers – For ISPF Developers – PL/IPL/I

Page 2: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

2

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.

Page 3: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

3

Course Topics

Course Name: Rational Developer for System z

Course Description: Learn how to use Rational Developer for System z to do z/OS traditional development, maintenance, support and for Enterprise Modernization of z/OS applications

Pre-requisites: Some experience developing PL/I applications using z/OS is expected. A working knowledge of SQL is also recommended.

Course Length: ~5days depending on topics selected

Topics (Agenda) Getting Started - installing and configuring RDz - and the course materials, and using Eclipse The RDz Workbench and introduction to Eclipse

– Code analysis tools– Editing

The Data Perspective:– Working with relational data sources– Modifying test data– Editing and testing SQL statements

Working with remote system resources:– Connecting to a mainframe– Data management – Accessing and editing files– Remote program Assembling

z/OS Application Development– Creating MVS Subprojects– Creating and customizing project properties

Debugging z/OS Applications– Debugging Batch Applications– Setting Debug Tool for Online Applications

Working with File Manager– Creating test data– Editing complex file-types

Working with mainframe ABENDs using Fault Analyzer– Creating Fault History views– Analyzing and solving mainframe ABENDs

Creating and modifying BMS Maps using the BMS Map Editor Optional session on using RDz for Web Service creation and consumption

Page 4: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

4

Course Contributing Authors

Thanks to the following individuals, for assisting with this course: Tim Grose/IBM

Page 5: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

5

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

Page 6: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

6

Course Assumptions

You know ISPF and have used it for at least two years

You have:No experience with Eclipse or RDzSome experience with PC tools

You have used MS-Windows applications for at least one yearRDz installed and running on your workstation at version 8.0.3 or later

Note that all ISPF discussion assumes IBM-installed ISPF product defaults for functionalityAnd does not include panel or command customization

Page 7: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

7

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and ConceptsThe RDz Workbench – Terms and Concepts Editing PL/I Programs Editing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Execution (control flow) and Data Flow Analysis Working with includes and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 8: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

8

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 mouseAccess the help system

Page 9: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

9

MVS ResourcesMVS Resources

• z/OS Datasetsz/OS Datasets• JESJES• TSOTSO• CICS RegionCICS Region• IMS RegionIMS Region• SCMSCM• CLISTs/REXXCLISTs/REXX

What is Rational Developer for System z (RDz)?

RDz Listener Started Task

Security/AuthorizationSecurity/AuthorizationRACF/ACF-2/Top SecretRACF/ACF-2/Top Secret

RDz interacts with z/OS resources through a host-installed listener

… and interacts through JDBC drivers to data sources

RDz Client Software

Data ResourcesData Resources• DB2 Data ObjectsDB2 Data Objects• IMS DatabasesIMS Databases

JDBC

RDz also interacts with data sources (DB2 tables/views, IMS database segments)

through efficient JDBC access

Eclipse-based IDE that breaks the barriers of the green-screen platform Runs on Windows and Linux Integration point for z/OS Application Development tools

See Slide notes on SSL/Encryption and Linux client support

Page 10: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

10

Why use RDz For Traditional TSO/ISPF Development?

Developer ProductivityDeveloper Productivity RDz has an enormous assortment of tools that:

Emulate the functionality of ISPF – for fast on-ramping of veteran TSO developers Complement the functionality of ISPF – to automate, streamline and simplify the

tasks of everyday z/OS maintenance, production support and development Integrate with tools within and outside of the IBM solution set – which allow

you to tap into your site-specific trusted and mature development processes, and access high-end functionality from IBM and OEM solution providers running on Eclipse

Code QualityCode Quality RDz also has tools that improve:

Code maintainability Production application run-time efficiency

Development Environment ModernizationDevelopment Environment Modernization RDz has technology that appeals to both veteran TSO programmers and -

especially to the next-generation of z/OS developers, who are used to modern development tools

RDz is the new 3270 – and a single platform for: z/OS traditional development Java/J2EE and C++ development z/OS application modernization

Page 11: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

1111

z/OS Development, Maintenance and Production Application Support

Access Datasets/Source Files

Program Analysis

EnterpriseModernization

Source Development

CICSWeb Services

IMS SoapIMS Web 2.0

Source Navigation• Windows (Standard) Navigation• ISPF PF-keys + extensible Hot-keys• Outline View• Hover• Open Declaration / Arrow keys• Open includes

• Windows metaphor• Edit/Browse/View• “Favorites” – “Most recently used”

ISPF and RDz Source Editing• PF-Keys• Hexedit• Prefix Area Commands• Command Line Commands• Colorized statement support• Local History• PC Source editing functionality• Code refactoring• Wizard-driven DB2 Stored Procedure generation• Comment/Un-comment multiple lines• Access to 3270 Emulation within Eclipse• All development options “preference-enabled”

Generate:• WSDL• WSBIND file• XSD files• Deployment manifest• Stub modules• Test and Deploy WSDL• Use Cases:• Bottom Up• Top Down• Meet in the middle

Generate • XML/WSDL• PL/I/PLI converters• Manifest filesUse Cases:• Bottom Up• Top down (PL/I only)• Meet in the middle

SCM:• IBM: Team Concert, SCLM, ClearCase• CA: Endevor, Panvalet, Librarian,• Serena: Changeman• ISPW

RDz Functional Taxonomy – a Partial ListRDz Functional Taxonomy – a Partial List

Submitting/Managing Jobs• Submit and Locate Job• Integration with JES• Job Organization options (Filters)• Show JCL• Cancel/Purge

Windows Screen Real Estate• Size-able views• Multi-window development• Source Filters• Collapse/Expand Procedures

• SCM functional integration• PDS Support• Migrate/Recall Support• Local and Remote file support• Tooling support in single or across multiple LPARs

• Source and PDS Search• QSAM Data File Search• Browse Load Module• Search Load Library• Use of Regular Expressions

Program Logic tools • Control Flow Analysis• Data Flow Analysis• Where used/Where Referenced

Content Assist• PL/I, PL/I, PL/I• SQL: Embedded, Interactive• CICS statements

Dataset Management CICSService Flows• 3270 "screen scraping"• Aggregate transactions• Automate processes• Expose as web services

Syntax Check and Build• Real-time validation• Local and Remote Syntax Checking• Integration with z/OS Build Process

Test and Debug• Integration with PD Tools/Debug Tool• Integration with Xpeditor and CA-Intertest

Editing Data Sources• QSAM File Editor• DB2 Table Editor• IMS Segment Editor• VSAM File Editing with File Manager• Integration with File-Aid Plug-ins

• Allocate/ Rename/Delete• Create GDG Model• Create VSAM Dataset• Search• Compress

Code Quality• Code Review• Source Format• File Compare• All of the above functionality

Copy Files• Within an LPAR• Across LPARs• LPAR PC

Functional Integration with z/OS REXX/CLIST/3rd Party Tools:• Menu Manager• HATS• Eclipse Plug-in Integration RDz Product Integration

Languages• PL/I, PL/I, PL/I, Java, C/C++• JCL/CLIST/REXX• SQL• BMS/MFS• WSDL, HTML, XML• 4GLs supported with Eclipse Tooling

Page 12: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

12

Crossing the Chasm – From ISPFISPF to RDz

On ISPF the development paradigm consists of: Typing Familiarity with ISPF:

Panels Commands

Page 13: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

13

Crossing the Chasm – From ISPFISPF to RDzRDz 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

Page 14: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

14

Crossing the Chasm – From ISPF to RDzRDz 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

RDz is notnot "rocket science" but mastering it takes practice, and hands-on application

A short list of RDz benefits includes: Improved productivity – see IBM IDE Efficiency Benchmarks:

http://www-949.ibm.com/software/rational/cafe/docs/DOC-3420?approved=true

Lowered development costs through LPAR workload reduction Addition of new professional skills (Web Service development, Eclipse-based

IDE experience, model-driven development, JCA development, etc.) Better job satisfaction

Page 15: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

15

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

Meta-data ("data about data") – examples:– Your development preferences and settings

– Your z/OS connection information

C:\rdzwksp5C:\rdzwksp5

WorkstationWorkstationHard-drive Hard-drive

ISPF Option 0

Datasets stored on your PC

C:\rdzwksp5

Page 16: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

16

The RDz "Workbench" – Graphical IDE Elements – Menus and ViewsR

Dz

Work

ben

ch

Lots of tabbed Views

Menus and toolbars

Scro

llbars fo

r navig

atio

n

Page 17: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

17

ISPF Menus

- Primary Option Menu

- Individual Panel Menus

In ISPF you use menus to navigate from option to option, and from panel to panel

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:

Page 18: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

18

RDz Menus

And in RDz you use menus and toolbars

A Toolbar is simply a shortcut to menu functions enabled by Left-clicking on an icon

Standard Menu

Toolbar

Page 19: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

19

RDz Menus – the Context Menu

RDz also makes use of Context Menus to simplify development tasksThe context-menu is accessed by: 1. Selecting something 2. Pressing the right-mouse button

Right-mouse "Context" menu

As opposed to primarily navigation, RDz's menus provide direct access to development functionality and individual tools in the workbench

Page 20: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

20

RDz ViewsViews and PerspectivesRDz is organized as a collection of tabbedtabbed and resize-able resize-able windows called “Views”“Views”

ViewsViews 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 ViewOutline View

PL/I Editor ViewPL/I Editor View

RemoteRemoteSystemsSystems

ViewView

z/OS z/OS ProjectsProjects

ViewViewViewsViews

Page 21: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

21

RDz Views and PerspectivesPerspectivesTabbedTabbed and resize-able resize-able ViewsViews

Outline ViewOutline View

PL/I Editor ViewPL/I Editor View

RemoteRemoteSystemsSystems

ViewView

z/OS z/OS ProjectsProjects

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.

ProgramProgramOutlineOutline

ViewView

Page 22: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

22

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"

Page 23: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

23

Review – Terms and Vocabulary

On z/OSOn z/OS TSO or ISPF is equivalent to an RDz "Perspective" Each ISPF panel or ISPF option/dialog is equivalent to an RDz "View"

You can also think of a perspective as an ISPF menu panel such as =3 (Utilities) You use menus and commands to navigate to and from ISPF panels/views

Using RDzUsing 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 one specific function:

Edit Properties Access to z/OS

Views can be: Opened/closed/resized/maximized and minimized

RDz menus are primarily used to access development tools and functions

Page 24: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

24

Primer – Keyboard vs. Mouse DevelopmentKeyboard vs. Mouse DevelopmentYou will use different development techniques with RDz:

Type statements using the Editor,

Navigate through wizards, through your source files, and do other development activities with your mouse.

If you’re new to mouse development consider the following:

Left-mouse buttonSelect some thing - Click – to set focus to or to select a field - Select a file in the Editor

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 – used primarily for: - Opening Split-Screen views in the editor - Dragging and dropping files - CICS/BMS and IMS/MFS screen painting

Right-mouse buttonOpens a “context menucontext menu” - From a program in the Editor Area - Open a Declaration or Copybook - Syntax Check - Rename/factor - Copy/Paste/Move/Delete code

Scrolling wheelUsed to scroll up/down inside source files - Fast and convenient

Page 25: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

25

Workshop – Becoming Familiar with the RDz Graphical Tools

This workshop will start you down the road to RDz mastery – in the areas of GUI editing, Workbench navigation, and Eclipse tooling.

You will: Explore graphical PL/I development techniques:

Manipulate tabs Navigate the workbench Explore menus Edit a program Syntax check a program

Recall that you will "do" or perform the tasks in the workshops on all slides that have

this symbol in the slide header

Before starting, you must have the

sample workspace unzipped onto your C:\ root drive

Version 8.5 Custom

Workspace

Page 26: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

26

Before We BeginBefore We Begin – Product Functionality and Source Code Location

In this first introductory tutorial you will learn how to navigate the RDz Workbench, analyze and edit source using programs

The program source you work on could reside on: Your PC – in a "Local Project" An IBM mainframe – in libraries or sequential datasets Your mainframe – in libraries or managed by your SCM

It does not matter where your source code is It does not matter where your source code is stored, the RDz features, functions and stored, the RDz features, functions and techniques you will learn work the same waytechniques you will learn work the same way

Eventually you will work exclusively with program source that resides on your mainframe.

However, in this class you may use program source code that resides on your local workstation, or on a mainframe.

LocalFilesAnd

Datasets

Wheredoesmy

sourcelive?

Page 27: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

27

Workshops For This Section

Time to try out the techniques shown using RDz and sample programs

You will need to have downloaded and unzipped the Custom Workspace onto your C:\ drive

This workspace contains:All of the sample programs, includes, JCL, etc.Starter Property Group files – for doing certain development techniquesConnections to the IBM mainframe for:

MVS Files DB2

A sample Filter and Saved Search QuerySample Snippets – for code reuse

Page 28: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

28

Workshop – Launch RDz and Select the Custom Workspace

From your desktop or the Windows startstart menu launch RDz When you are prompted for a Workspace use the Browse… function to find either:

C:\rdzwksp85 or C:\rdzwksp8.0.3 (depending on which release you are using)

RDz v8.5 users

RDz v8.0.3 users

Page 29: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

29

Workshop – Launch RDz and Select the Custom Workspace

RDz opens in what is called the: z/OS Projectsz/OS Projects Perspective

If after RDz opens, you notice a "Welcome Screen", most you likely did not unzip the custom workspace correctly. To correct this: 1. Close RDz. 2. Unzip your custom workspace directly onto the c:\ root drive. 3. Re-open RDz

Page 30: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

30

Workshop – Launch RDz and Select the Custom Workspace – RDz Enterprise – v8.5.1

If you are using RDz Enterprise – which was delivered on or after version 8.5.1 – you will see an Enterprise Projects view and an Enterprise Development perspective

This course material is based on "z/OS Projects" – and so, if you are using RDz Enterprise, please

translate all content that references: z/OS Projects to Enterprise Projects throughout the course - in all workshops and in the Powerpoint slide materials

The "Enterprise Projects" view is functionally equivalent to the "z/OS Projects" view.

And the "Enterprise Development" perspective is the same as the "z/OS Projects" perspective.

Page 31: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

31

The RDz "Workbench" – Project Organization

You will work with a variety of PL/I resources: programs, includes, compile listings, executables, data files and so forth. Using RDz you store, organize and manage the resources associated with your projects in Projects

RDzRDz resources are organized into - Project(s)

- Folders – and sub-folders

- Files

You can think of the RDz resource topology as similarsimilar to ISPF libraries:

Note – that this analogy is not perfect, just close enough for now

Projects

Folders

Files RDz Workspace folder

Project sub-Folder PL/I Sub-folder – under the Project folder File – organized inside the PL/I folder, etc.

Page 32: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

32

Left-right slider bar

Navigate in the RDz Graphical Workbench

Double-click EBUDP1.pliEBUDP1.pli and using your mouse:

- Move the slider bars: Up and down Right and left

Get comfortable moving the slider bars to navigate in the source file

- Left-click the up and down scrolling arrows: To scroll one line at a time through the source file

The PL/I Editor

These scrolling techniques are similar to pressing PF8/PF7/PF10/PF11 in ISPF

Up-d

ow

n s

lider

bar

Page 33: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

33

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 viewresize the view

You can also select the bottom window border. Left-click and hold + drag to make the window's height larger

Resize a Window in the RDz Graphical Workbench

As time permits, spend a few minutes working with mouse scrolling and As time permits, spend a few minutes working with mouse scrolling and window-sizing graphical development techniqueswindow-sizing graphical development techniques

As time permits, spend a few minutes working with mouse scrolling and As time permits, spend a few minutes working with mouse scrolling and window-sizing graphical development techniqueswindow-sizing graphical development techniques

This window resizing technique is similar to setting your host emulator screen size (24X80, 32X80, etc.)

Page 34: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

34

Workshop Review

What have you done so far?1. (Before starting the workshops) – Unzipped a file onto your PC, that

contained a custom workspace. 2. Launched RDz3. Opened a program into the "PL/I editor"4. Navigated up & down, right & left using

1. The scroll bars

2. The single-line-at-a-time arrows5. Resized your editor window by dragging the window frame, making it:

1. Wider (width)

2. Deeper (height)

Page 35: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

35

Workshop Review

Practice makes perfect: Close the editor on EBUDP1.pli

If you made any changes do NOTNOT save them

Open EPSBDP1.pliOpen EPSBDP1.pli 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 NOTNOT save changes

Close a view by clicking the Red X

Page 36: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

36

Manipulating Views – Part II

It's often useful to maximize and restore views for various development tasks.

Steps: To maximize a view:

Double-click in the middle of the view tab

You can also click the Maximize icon in the top-right hand corner of the view

To restore a view back to its original size: Double-click (again) in the middle of the

tab

Or click Restore– Small icon in the right-hand corner of

the editor

Page 37: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

37

Manipulating Views – Maximize and Restore

From RDzClass:1. Double-click EBUDP2.pliEBUDP2.pli and load it into the editor2. Double-click the editor tab to maximize the editor view3. Scroll up and down a few times in the editor4. Double-click the editor tab to restore the editor5. Close the editor don't save any source changes

(if you happened to make any)6. Load EBUDP3.pliEBUDP3.pli into the editor7. Maximize the editor view8. Scroll up and down a few times9. Restore the editor view10.Close the editor - by clicking the X in the tab

Page 38: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

38

Optional Workshop – Eclipse Edit Navigation With Your Own Code

If you can connect to your own mainframe and can access your source code; Open a file, Navigate, Go full-screen, Restore the editor and Close.

If you can't connect to your own mainframe, and time permits try the following:

Repeat the workshops on navigation and view manipulation from this section but using the TMPLT00.pli program

Note: Source colorization Check out the Outline view by clicking a label in the Outline view and

seeing what happens in the source editor

Page 39: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

39

Workshop - Resetting your Perspective

When you're first getting used to a new toolset, it's easy to do things inadvertently. For instance, you could close views, or resize them – making the views too small or too big

An easy fix to restore your workbench to the installation defaults is to access the WindowWindow menu and either: ResetReset your perspective to the RDz installation defaults …or… Open (ShowShow) views you may have closed accidentally

Let's try it (do the following):

Close a few of the views Now:

1. Click the WindowWindow menu

2. Click:

– Reset Perspective…– At the prompt, click OKOK

Note that from the Window menu you can also open other perspectives and open specific workbench views (the Show ViewShow View option)

Page 40: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

40

Workshop – Practice Opening/Closing Views

Up to now we've used just a few views, but RDz has lots of useful functionality – all of it accessed through views. And even though we're not going to learn about every available view, we should know how to open a specific view if we need to.

Do the following:Do the following: Close the Remote Systems view

Close the Properties view

Reopen Reopen (Show) (Show) a view:a view:1. Left-click the Window menu2. Click:

Show View >

Remote Systems

Repeat the above steps to re-open the Properties view

Page 41: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

41

From RDzClass and the asm directory:1. Double-click EBUDP1.pli – to load it into the editor 2. Double-click EBUDP2.pli – to load it into the editor

3. Double-click the EBUDP1.pli tabtab – to maximize the editor

With both programs open in maximized view:4. Left-click and hold the left mouse buttonLeft-click and hold the left mouse button down over the EBUDP2.pli 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

Workshop – Working With More Than One Program at a Time

Page 42: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

42

Workshop - Working With More Than One Program at a Time

You should now be in multi-screen edit on two different programs To Restore the editing view to a normal frame view: Double-click over the tab again

Notes 1. this may have seemed like a lot of individual steps, but once you've done it a few times, it will be easy

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 open both PSAM1 and PSAM2.

Create a split-screen view. Restore the view to a single edit screen

Note – by "Normal frame view we mean including the other RDz Workbench views

Page 43: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

43

Split-Screen

It's also common to work with a single program in split screen modeIn ISPF you split screen and load the same program into Browse or View mode (=1)

In RDz it's simple to work in independent edit sessions on the same file – Press: Ctrl+2Ctrl+2

Edit session 1 – on EBUDP1Edit session 1 – on EBUDP1 Split-screen Edit – on EBUDP1Split-screen Edit – on EBUDP1

Page 44: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

44

Split-Screen

From z/OS Projects:From z/OS Projects: Double-click EBUDP1.pliDouble-click EBUDP1.pli – to load it into the editor Press Ctrl+2Ctrl+2 (Hold down the Ctrl key and simultaneously 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 a split-screen session) using RDz you are in full edit mode

To close the view, click the X in the right-hand corner of the split-screen

Practice makes perfect:

Open PSAM1.pli and split-screen. Close the split-screen. Close the file. Repeat with TMPLT00.pli. Split screen, Maximize/Restore the views, close the split-screen, etc

Page 45: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

45

Horizontal Split of Two Different Programs

Using the Context (Right-Mouse) menu, you can edit in horizontal split screen

Horizontal Split Screen can be Horizontal Split Screen can be more useful for editing listing more useful for editing listing

and data filesand data files

Page 46: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

46

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 view2. Right-click inside the program and from the Context Menu

select: Horizontal split

Page 47: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

47

Open Declaration (F3)

RDz provides a quick navigation technique called "Open Declaration"

To use this technique: Click your mouse into the variable

name Either:

Press F3 …or… Right-click and select Open

Declaration

Considerations: This technique works for PL/I,

COBOL and Assembler You can open a variable or label or

Macro declaration If the declaration is in a include,

RDz will open the include (providing the workspace's SYSLIB Property Group value is correct. We will be covering how to setup Property Groups in a subsequent module).

Page 48: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

48

Workshop Review

What have you done so far?1. Launched RDz and closed the Welcome tabs to access the z/OS Projects perspective2. Created a new project – populated with example PL/I programs3. Opened a program into the "PL/I editor"4. Navigated up & down, right & left using

1. The scroll bars

2. The single-line-at-a-time arrows5. 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

11. Used Open Declaration to navigate to a variable, label or include

Page 49: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

49

GUI-Navigation Workshop – 1 of 3

From RDzClass – open EPSBDP1.pli

Navigate through the program by clicking various labels and macros in the Outline view

From the Outline view:

Click your mouse inside the source and press Ctrl+W(what did that do)?

Try this technique – of Filtering from the Outline view on a few other labels

Ctrl+W shows (expands) all of the code in the file

Close EPSBDP1

Page 50: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

50

GUI-Navigation Workshop – 2 of 3

Outline view and Open Declaration Open PSAM1A.pli From the Outline view:

Click on each of the includes Click on several:

Variables Procedures Formats

Expand a structure and click one more variables Scroll down in the Outline view and click on a Procedure Click the procedure: TRANABN

From the editor: Click your cursor (set cursor focus) in RESULT Press F3 – or Right-click and select Open Declaration From the toolbar, click the left-point arrow

to return to your starting point in the source code What happened (in the editor and Outline view)

With your cursor focused in the source code (from the editor) press and hold the down & up arrow keys and note the effect on the Outline view as your cursor goes down and up through the source

Page 51: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

51

GUI-Navigation Workshop – 3 of 3

With PSAM1A still open in the editor: Press Ctrl+End

What does that do? Click your mouse into the SYSPRINT variable and press F3

or use the Context Menu to Open Declaration Click the left-pointing yellow arrow to return to your last edit position Press Ctrl+Home

What does that do? Drag the Windows scroll bar down to the end of the file

In the next course section you will learn how to navigate using PF keys (like ISPF) Find and hover over SQLCODE

Click inside SQLCODE and press F3 or use the Context Menu to Open Declaration What happened?

Kind 'a cool, huh? Close SQLCA.inc

If time remains experiment with the Outline view, Open Declaration, Multi-window views, or any other GUI editing techniques covered so far

Page 52: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

52

Real-time Syntax Checking

The PL/I editor will detect language statements with invalid PL/I syntax

Reserved words

References to Procedures

References to Variables

We will discuss RDz's Real-time validation later in this course

Page 53: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

53

Workshop - Real-time Syntax Checking

Open EPSBDP1.pli Edit the source code and experiment with Real-time validation by creating

various typos and PL/I syntax errors Misspell a few:

Keywords Variable references Procedure references Include file references

Close the program – and do NOT save changes

Page 54: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

54

Open Call Hierarchy – Analysis Tools – RDz Version 8.5

If you are maintaining a program that either, you didn't code, or you coded it so long ago you no longer understand its structure, you'll like the Call Hierarchy view

From the editor: Select a Procedure Right-click and from

the Context Menu select Open Call Hierarchy

Double-click a Procedure name and the editor will synchronize with the hierarchical view of your Procedures

Giving you the:- Top-down view- Bottom-up (code) view Note:Note:

Indentation shows Indentation shows Call Procedure Call Procedure nestingnesting

Page 55: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

55

Besides showing the Procedure-based "structure" of your program, you can also use the Call Hierarchy view to show how control is passed to a selected Procedure – or to answer the question, "How did I get here?"

After displaying a Call Hierarchy view, click the Show Caller Hierarchy icon

Call Hierarchy (v8.5) – Show Caller Hierarchy

Show Caller Hierarchy displays how control is

passed from calling procedures into

PRTHDG3

Page 56: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

56

Additional Call Hierarchy Options

Additional program "semantics" displayed:

Calls to built-in functions

Calls within iterative logic

Can hide calls to built-in functions from a drop-down menu

Call to Procedure

Iterative Call

Call to Built-in Function

Page 57: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

57

Workshop –Workshop – Program Control Flow ViewFrom RDzClass - open PSAM1A.pli Click your mouse in the PSAM1A Procedure and from the

Context Menu Open Call Hierarchy

From the Call Hierarchy view: Expand the hierarchical list

What does this list represent? Double-click some Procedures

What happens? Double-click the reference to PRTHDG3 (inside of PRTHDG3)

What does the circular icon represent? Click the small down-ward pointing triangle, select Hide built in functions

What happened

From inside of the Editor, click your mouse inside of PRTHDG3, and from the Context Menu (again) select: Open Call Hierarchy With PRTHDG3 selected, switch Called to Caller modes

Expand the list of procedures What does the Caller Hierarchy diagram represent?

Switch back to the Callee Hierarchy, and spend a few minutes experimenting with this important RDz tool

Page 58: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

58

If you are analyzing, researching a data problem – like verifying Data Flow or doing Impact Analysis, or if you just need to quickly lookup the occurrences of a variable within your program you can:

1. Select the variable2. Right-click and select: Occurrences in Compilation Unit This opens a Search view with all occurrences of that variable:1. Hyperlinked back to the source line of the reference2. Color-coded – showing the variable reference in statements that - Declare or Modify a variable in gold - And all other variable references in statements in gray

Occurrences in Compilation Unit – Analysis Tools – RDz Version 8.5 – 1 of 3

Page 59: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

59

Occurrences in Compilation Unit – RDz Version 8.5 – 2 of 3

You can use Occurrences in Compilation Unit effectively to investigate data movement, analyze the impact of a change, research the cause of a data-specific ABEND (like an 0C7 or 0C4), etc.

Here's an example showing Search on a variable, with the Search Results view moved, and "pinned" (this is covered in the workshop) and additional searches for Occurrences in Compilation Unit exposed through RDz

Page 60: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

60

Workshop –Workshop – Occurrences in Compilation Unit – RDz 8.5

From RDzClass – open PSAM1A.pli1. Press Ctrl+F (this opens a Find menu). 2. Type: numa_11 and press Next (what happened?)

3. Select (click your mouse inside of) NUMA_11 and from the Context Menu, select: Occurrences in Compilation Unit

• What's the significance of the gold vs. gray/blue coloring of the variable references?4. Double-Click any one of the hyper-links in the Search results view

• What happens?

5. Repeat steps 1 – 4 with a few other variables6. Again, do an Occurrences in Compilation Unit on NUMA_117. This time click: Pin the Search View8. Now search (Ctrl+F) on another variable

• What happens?9. Select / Left-click/ Hold / and Drag one of the Search results tabs somewhere else

inside of your workbench10.Pin this second Search view11.Now search on a third variable (of your choosing)12.As you did before; Select / Left-click / Hold / and Drag one of the Search results

tabs somewhere else inside of your workbench• Note that this technique can be very useful for building out a data analysis

"dashboard"

13.Close the Search results views and experiment with Occurrences in Compilation Unit – and with creating a "data analysis dashboard"

Page 61: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

61

Working With Include FilesWorking With Include FilesYour programs most likely contain Include files.

To open them using RDz: - Double-click to select an Include file name:

Right-ClickRight-Click Select: Open Include FilesOpen Include Files

Page 62: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

62

Working With Includes – Multi-Window Views Working With Includes – Multi-Window Views

You can make seriously good use of RDz's multiple window development paradigm using this technique.

Precisely how RDz locates your includes is a topic that will be covered in the course module: "RDz Workbench – Using Remote Systems Explorer"

The actual feature is called a Property GroupProperty Group

Page 63: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

63

Workshop Workshop –– Accessing Copybooks

From RDzClass open EPSBDP1.pli

1. Press Ctrl+FCtrl+F

2. Enter the word includeinclude in the Find area. Click AllAll

3. (one include at a time):• Double-click an include file name (to select it)• Select Open, Browse or View Include File

4. Repeat the above steps using the PSAM1 program

Optional: Create the Program + includes multi-file view shown on the previous slide by:• Maximizing the screen• Dragging and dropping all of the includes to different areas of the editing frame

Close all files when your are finished

Press Ctrl+W Press Ctrl+W to expand to expand your source after the Find your source after the Find

commandcommand

Page 64: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

64

Open a Program From a Static CALL Statement – RDz Version 8.5

(When your "Property Groups" are setup correctly) You can do the following Select a CALL statement that references an external program Right-click on the program name and Select: Open, View or Browse Program file…

Page 65: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

65

Open a Program From a Dynamic CALL Statement – RDz Version 8.5

The same thing holds true for opening: A dynamically called program – when a variable has a hard-coded VALUE

clause with the program name A program referenced in CICS XCTL XCTL and LINK LINK commands

Page 66: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

66

Workshop (RDz v8.5) Workshop (RDz v8.5) –– Opening Called Programs – 1 of 2From the Property Group Manager view 1. Double-click (to open): PL/I Sample Property Group 2. Select the PL/I tab 3. Select Editor Configurations 4. In Local paths: enter (copy and paste) the following

${project_loc}\RDz Resources\RDz Education\RDzClass\pli

5. Press Ctrl+S (to save your changes to the Property Group)

Note – How RDz finds called programs when you open the source from your mainframe will be explained in the same upcoming course module:

"RDz Workbench – Using Remote Systems Explorer"

3.

4.

1.

2.

Page 67: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

67

Workshop (RDz v8.5) Workshop (RDz v8.5) –– Opening Called Programs – 2 of 2

From RDzClass – open PSAM1.pli 1. Find the CALL and LINK statements

• Press Ctrl+F • Type PSAM2 in the Find area and press All

2. Select and: Open, Browse and/or View the static or dynamically-referenced modules.

3. Repeat the above using:• Program: PSAM1A• Called modules:

• PSAM2• PSAM3• EPSBDP1

Optional: As you might have done for the include workshop, open these called programs in a multi-windowed view: Go to full-screen, drag&drop the tabs, etc.

Note – Exactly how RDz finds called programs will be explained in the same upcoming course module:

"RDz Workbench – Using Remote Systems Explorer"

And again, the actual feature is called an RDz Property Group

Page 68: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

68

Concept – Right-Mouse (Context Menu) as "What's available help"

As you begin your work with RDz, you may wonder how to do something, where to find an option, etc.

By pressing the Right-mouse button, RDz will show you –

in the context of what's selected – what functionality or operations are available

Context Menu options available when you've selected a PDS

Page 69: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

69

The RDz Product Help and Documentation

RDz has a rich and easy-to-use help system, with: A global encyclopedia of topics (Help Contents) Search Index List of hot-keys (Key Assist…) List of web resources Links to product and help

update processes About (shows installed

version and release levels along with information on eclipse plug-ins)

Page 70: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

70

The RDz User Group – an Online Community for RDz Developers

Quarterly web-conferenced meetings No-charge technical 90-minute meetings/sessions/presentations Speakers from:

RDz developer community Business partners IBM

Topics include: New release updates Tips & Techniques Meeting themes:

SOA Business Rules Integration points Advanced analysis Etc

Q&A with IBM

https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=22eac60d-8bab-44e2-a5b8-a4fe1c1aecad

Page 71: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

71

Internet-based Learning – The IBM Education AssistantIBM Education Assistant

Complementing the RDz Distance Learning, you might want to check out the IBM Education Assistant: http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp

From this site you will find annotated learning modules on specific product features

RD

z V

ers

ion-s

peci

fic

Links

Page 72: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

72

Optional Topics and Workshops For This Section If you have time, and are comfortable with the material covered, or if you

are part of an RDz "Tools Team" and need deeper content - please read through the next series of slides – and try out the techniques shown using RDz and sample programs in your RDzClass project.

Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

Page 73: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

73

Source Compare – 1 of 2

It's often necessary to compare two different releases of the same program source. RDz makes this easy to do.

Select two source files: Select the different .pli files – note that they could be in the same or in a different

project Hold the Ctrl key to

click (select) more than one file

Right-click – select: Compare With > Each Other

Notes: You can compare and edit in either file These files can be in the same or in different

libraries. They can be on one or multiple LPARs You can compare files within column

boundaries From Window > Preferences LPEX Editor > Compare Specify:

Column Restricted Search Start and End boundaries

Page 74: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

74

Source Compare – 2 of 2 Results are displayed in side-by-side windows (Maximized for best viewing). Notes:

Lines changed and new lines from either source file shown in different shades Can click on the right-hand column border to navigate – and/or use the toolbar

Delta (source difference) navigation

and Copy toolbar

Page 75: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

75

Workshop – Workshop – Source Compare

From RDzClass:1. Select both: LEESAMP.pli LEESAMP.pli and LEESAMP1.pliLEESAMP1.pli

(use the Ctrl key + left mouse button to do this)

2. Right-click and select: Compare With > Each Other

3. Experiment with the source compare features: Follow the Next and Previous difference icons Note:

– Changed lines– Added/Deleted lines (in either source file)

Try Copy Current Change – from Right to Left and from Left to Right

Close all files

Page 76: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

76

Organizing your tasks – Bookmarks View

What's a Bookmark?What's a Bookmark? Bookmarks are hyperlinked annotations that allow

you to quickly find specific lines in a file Reminders, sort of: electronic sticky pad notes

Create a Bookmark as follows: (From inside an edit session) Double-click, or Right

click over the left-hand border, next to the line you want the Bookmark on

- Select: Add Bookmark…

- (optionally) Overtype the name of the Bookmark

- Click OK– A small vertical book icon appears in the border

(on both the left and right hand borders of the file)

To clear a Bookmark: Right-click over an existing Bookmark Select Remove Bookmark

To see and to use your Bookmarks:

From the Window Menu Select Show View Bookmarks

Five Bookmarks in the Bookmarks viewFive Bookmarks in the Bookmarks view

See Slide NotesSee Slide Notes

Page 77: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

77

Workshop – Bookmarks for Navigation and Annotations

1. Open PSAM1A.pli in the editor

2. Add three Bookmarks – by double-clicking in the left-hand margin You can either over-type the Bookmark text, or leave the original statement

3. Open EBUDP2.pliEBUDP2.pli, and add three or four Bookmarks

4. From the right-hand window frame click one of the green icons What happens?

5. Double-click a Bookmark – to delete it

6. Close both programs

7. From the Window menu, select Show View > Bookmarks

8. From the Bookmarks view: Double-click a Bookmark – what happens? Right-click and Select All Right-click (again) and Copy Open Notepad and Paste the copied Bookmarks into Notepad Look through the pasted text in Notepad, then close Notepad Right-click again in the Bookmarks view and select Delete

Close the Bookmarks view and close the programs

Add a Bookmark

Page 78: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

78

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 includes Although not limited to includes.

Example: MVC '.',OUTNAMMVC '.',OUTNAM 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 8.0.3 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 include 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)

Page 79: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

79

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)

Net: (Source encoding Cp037) shows EBCDICEBCDIC values

To edit an EBCDIC hex value (like the 3F3F 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

Page 80: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

80

Local History – 1 of 3

RDz provides historical versions of your saved source file changes This allows you to:

Return a source file to a previous version

Compare a source file with a previous version

To compare versions: From any file open in the

editor Right-click Select: Compare With Local History…

To replace versions: From any file open in the

editor Right-click Select: Replace With Local History…

Page 81: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

81

Local History – Source Programs – 2 of 3

From the Compare screen Double-click the

Revision time

This is down at the bottom of the screen

This loads the selected version

into a file compare frame

Verify the version's changes

Click Replace… or …Cancel

Page 82: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

82

Local History Preferences – 3 of 3

You can specify how long RDz maintains Local History filesFrom Window > Preferences Expand General Expand Workspace Select Local History

Click OK to save

Page 83: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

83

Workshop - Workshop - Local History

1. Open REVERSEREVERSE.pli2. Add one new statement

3. Modify one existing statement

4. Delete a statement

5. Save your changes and close the file

6. Re-open REVERSEREVERSE.pli

7. Right-click in the editor

Select: Replace With >

Local History…

8. Double-click one of the Revisions

9. Note the file comparison

10. Select Replace

11. Note what happened to your changes

Close all files currently open in the editor

Do not save any changes

Right-click … Close All

Page 84: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

84

Show In > Data Elements – RDz Version 8.5

Along with Occurrences in Compilation Unit, you can get a global list of your variables and Procedures with:

Show In > Data Elements

This creates a sort-able list of all the data elements with several actions against them:

• Hyper-link to any variable declaration

• Re-sort the list by various columns

• Filter the list:• By data element name• Remote Procedure labels

• Remove columns• Open and mark

occurrences throughout the source (prior topic)

Page 85: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

85

Sorting the Data Elements view – RDz Version 8.5

Can sort/re-sort by any column in the view

Useful for:• Categorizing variables sort by Declared In• Organizing by PL/I Group sort by Top-Level Item• Sorting by numeric …vs… character data sort by Declaration• Business Rules candidates sort by References

Page 86: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

86

Filtering the Data Elements view – RDz Version 8.5

Filter view results horizontally

search by data element name or text pattern

Filter out or add back into the view results Procedures and FILLER ("unnamed items")by clicking the small downward-pointing triangle on the far-right corner of the view

Filter out Columns

Acts as an on/off toggleto add/remove columnsfrom view

Page 87: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

87

Open and Mark Occurrences from the Data Elements view – RDz Version 8.5

The Context Menu allows you to open the Occurrences view from any data element

And you can combine techniques to display precise subset and superset lists of data elements, hyperlinked to other elements that relate to your work

Page 88: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

88

Workshop Workshop –– Show In > Data Elements – RDz 8.5

From RDzClass – open PSAM1A.pli1. Select the variable named RESULT.2. Right-click and from the Context Menu select: Show In > Data Elements3. Click the small, downward-pointing triangle on the far right-hand side

of the view, and select:• Filters > Hide program labels

What did that do?

4. Sort (both ascending and descending) by the following criteria:• Name• Level• Declared In - breaks the data item usage by Includes and PL/I "main" program• Item Type• References – useful to view data items that

• Utilized a lot (good candidates for "business rules mining")• Never referenced (only declared – sometimes referred to as "dead code")

5. With whatever time remains in the workshop, try the following techniques:• Right-click over a variable with a high number of references and select:

• Occurrences in Compilation Unit• Open Declaration

Page 89: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

89

Optional Topic Optional Topic – – File Compare (Explanation of Toolbar Functionality)

Besides being able edit in either side of the File Compare window (and save changes) the toolbar provides the following actions

Page 90: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

90

Optional Workshop Optional Workshop – – Check out the RDz product and external help facilities

From the Help menu, try out various options:From Help Contents – check out what's new in the latest releaseFrom About IBM Rational Developer for System z – find out what version

you're runningSearch on a few topics:

Endevor File System Mapping Property Group

Discover Context-Sensitive Help:Click the z/OS File System Mapping viewRight-click inside the entries in the view and select: Add Data Set

MappingClick on the Context Sensitive question mark (lower left-hand corner)

Page 91: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

91

Optional Topic – Another Code Annotation Feature – Tasks

What's a Task? Tasks are annotations like Bookmarks. Except Task carry additional information about what

you're looking to do. Besides merely tagging lines, Tasks allow you to: Set a priority to the annotation Specify whether the task has been completed

Enable as follows (from an edit session)

Right click in the left-hand border, next to the line you want the Task on- Select: Add Task…

- (optionally) Overtype or add text in the Task Description

- Select a task Priority

- Check if the task is complete

See Slide NotesSee Slide Notes

Page 92: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

92

Optional Topic – The Task View

To see your Tasks in the Tasks View Open the Windows Menu Select Show View > Other > (type ) tasks

From this View you can:- Navigate to specific Tasks- Check/un-Check Task completion- Sort your Tasks- Select and work with multiple Tasks

Select two or more Tasks Right-click Context Menu options

SORTSORT

Page 93: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

93

Optional Workshop – the Tasks View

Open three different PL/I programs in the editor and do the following: Set (create) one or two Tasks in each program (overtype the default text on at least

one Task) (While still in edit on one of your programs): Navigate to the different Tasks using the green

rectangle in the right-hand border of the editor Open the Tasks View – and:

Modify the Task Description Set certain Tasks status to complete Navigate to the Task lines Sort the list by Priority Sort the list by Complete/not complete

OPTIONAL – OPTIONAL – If time permits: If you can connect to your mainframe, open a program and set a task in the code Close the program Reopen the program by clicking the Task in the Tasks view Select all of the Task information – Copy the Tasks and paste into rows of an Excel

spreadsheet – also: Delete the Completed tasks Delete the remainder of your Tasks – en masse (using the Context Menu)

Page 94: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

94

Optional Topic – RDz as a "GUI File Transfer" Tool When RDz is installed and working in your shop,

you can drag & drop source datasets and files between: PC and mainframe Mainframe and PC Mainframe and mainframe (from one LPAR to another) PC and PC

Note that by "your PC" we mean "any networked drive"

Optional Workshop – if you have a connection to a mainframe

Steps (assuming the RDz mainframe components have been successfully installed and configured on your host system): Connect to a mainframe (see next section for how to) From your PC drag & drop files to a mainframe source library

(see next section for how to) From the mainframe:

Open a library Select a few PDS members Drag & Drop them to one of your RDzClass folders Select an entire PDS (library) Drag & Drop the library to the RDzClass folder

– What happened?

LocalFilesAnd

Datasets

TransferTransferSourceSourceFilesFiles

Page 95: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

95

Advanced Topic – Getting to other views from Maximize

In Maximized (full-screen) mode, all of the RDz tooling views are available as miniaturized icons in the sidebars Mouse over the icons – to determine the view they

represent Click the icon – and the view "pops-up"

You can use the view while it's visible

Click back in the source – to return to full-screen edit mode and "hide" (minimize) the view

The placement (location) of these minimized icons can change from release to release

In Maximized (full-screen) mode, all of the RDz tooling views are available as miniaturized icons in the sidebars Mouse over the icons – to determine the view they

represent Click the icon – and the view "pops-up"

You can use the view while it's visible

Click back in the source – to return to full-screen edit mode and "hide" (minimize) the view

The placement (location) of these minimized icons can change from release to release

Call Hierarchy

Page 96: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

96

Advanced Workshop – Hover, Hyper-links and the Back Arrow

Open PSAMM1.pli – and press Ctrl+End to scoot down to the end-of-file.

Press and hold down the CtrlCtrl Key

Mouse-over some variables - or label names ... note how they turn into hyper-links - Hmmmmmmmmmm.......... what could this mean

Left-clickLeft-click on a hyper-linked identifier.

Yep - Left-click takes you to the field/label's declaration

Yep - even if that declaration is inside a include or Macro file (provided you've opened the include/macro file from the mainframe)

Experiment with this advanced Eclipse technique using a few other programs.

PROGRAM_STATUSHold down CtrlLeft-mouse click

Return using the yellow left-arrow key

Page 97: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

97

Section Review

What have you done so far? Learned some of the RDz 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 HLASM programs Opened a program into the "HLASM 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 Learned a few other RDz editing techniques, utilizing:

Outline view Bookmarks Task list Local History File Compare

Page 98: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

®

IBM Software Group

© 2012 IBM Corporation

Part II – Editing Your Program SourcePart II – Editing Your Program Source

Page 99: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

99

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I ProgramsEditing PL/I Programs Editing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Execution (control flow) and Data Flow Analysis Working with Copybooks and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 100: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

100

Selecting an Editor

The RDz product installation default editor is the LPEX editor, but there are dedicated PL/I and PL/I language editors that we will discuss later in this course LPEX (LLPEX (Live P Parser EX EXtensible Editor))

A powerful PC-style editor with language-sensitive tools and features Contains ISPF emulation – activated by changing the LPEX editor profile (next slide)

The PL/I language editor has a number of very powerful features They are very eclipse-centric (i.e. they behave like Java-style editors) They also contain a number of useful leading-edge coding features:

Collapsing/Isolating code sections Source Formatting

These editors are well-suited for developers with little-to-no ISPF experience We will cover these editors later in the course But if you wish to experiment with the PL/I editor:

Right-click your source file Select Open With > PL/I Editor

Page 101: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

101

Selecting ISPF as your LPEX Editor Profile

The LPEX editor provides a number of different editor profiles you can use for development An editor profile provides emulation of an editor product you

may have used with different software: ispf, xedit, vi, emacs, etc.

From RDz Preferences can change editor profiles at any time during your work

Like all preferences, your editor profile decision is saved in your Workspace If you create a new, or use a different workspace you will need to return to

Preferences to customize your Editor Profile

A note about RDz's ISPF emulation:A note about RDz's ISPF emulation: The ispf LPEX edit profile provides almost all of the LPEX functionality, plus:

– Emulation of the ISPF ( =2 ) editor– The same ISPF features are available for ( =1 ) browsing datasets

RDz's emulation is very close to z/OS ISPF edit– 85 95% compatibility (depending on your shop's ISPF customization)– But all of this is within a GUI editing workbench – so initially, things will seem different from your

3270 / ISPF development experience– Also – there are a number of RDz editing features that make certain ISPF edit functionality irrelevant

(i.e. COLS is not needed)

Page 102: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

102

Workshop – Workshop – Changing You Editor Profile – to ISPF

From Window Preferences

Click: LPEX EditorLPEX Editor And in the Editor profile list

– Select: ispfispf Click: OKOK

Set ispf as your editor profile

Page 103: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

103

WorkshopWorkshop – – Command Line Location – v 8.5.1

If you are using RDz client v8.5.1v8.5.1 – you can set your command to the top – or bottom

From Window Preferences >

LPEX Editor >

– Controls Select top or bottom: Click: OKOK

- Change the command line to top

- Open a PL/I program from RDzClass

Note Note - in this course the - in this course the command line is screen command line is screen captured at the bottom – captured at the bottom –

but that makes no but that makes no difference to the RDz difference to the RDz functionality or the functionality or the workshop directionsworkshop directions

Page 104: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

104

Workshop – Workshop – Other Preferences to customize your editing sessions

1. Set Tab stops: From Window, Preferences

LPEX Editor

– Tabs Press OKOK

2. Enable vertical lines in the editor: From Window, Preferences

LPEX Editor

– System z LPEX Editor

– PL/I Parser

Check all three options

Press OKOK

Set the above two Preferences, then: Open PSAM1A.pliPSAM1A.pli in the editor Note the new (cool) vertical lines. Try out the tab stops

SeeSeeSlideSlideNotesNotes

Page 105: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

105

Editing Using the ISPF Profile

The RDz editor when you use the ISPF profile: New function keys are enabled and the ISPF "Prefix Area" appears

NoteNote – the same: Scrollbars Status line – showing:

Current line Columns

Command line Colorized source

New:New: Prefix area - for ISPF prefix commands PF-key assignment The command line now works with ISPF commands

Notes:- The Esc (Escape) key on your PC positions your cursor in the command line- The Up arrow key on your PC retrieves the previously executed command line command- ISPFISPF command line commands are NOTNOT case sensitive

X all ; f ws-ph last 20 50

PrefixArea

Command line

Status line

Page 106: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

106

Workshop Workshop – ISPF PF-Keys and Navigation Options: Top, Bottom, ISPF commands– ISPF PF-Keys and Navigation Options: Top, Bottom, ISPF commands

F1 – Help F5 – Repeat Find F6 – Repeat Change F7 – Page Up F8 – Page Down

Open PSAM1A and 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 Press F8 and F7 F7 again Note that the # of lines scrolled has changed, according to your window size Press and hold the F8 key downPress 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: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

Page 107: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

107

Workshop – Workshop – "No L" Locate – Navigate Directly To A Line In Your Program

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 PSAM1A.pli 22333444999 – Note that the program is not 999 lines long

143 1

The Esc (Escape) key on your PC positions your cursor in the command line

Page 108: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

108

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

Page 109: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

109

Workshop – Review of Navigation Options

Practice your RDz navigation skills by trying out the various scrolling and navigation techniques – and make up your own workshop.

Maximize the editor view of PSAM1A.pli and practice the following: Commands:Commands:

Top Bottom <Line#>

HintHint – 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 RetrieveRetrieve command

Practice the ISPF and RDz paging and scrollingPractice 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 Procedures, long statements, recordsPractice centering Procedures, 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

One line upOne line up

Dragging Dragging scroll bar scroll bar

Page 110: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

110

Workshop – ISPF Command Line Commands – Find/Repeat FindWorkshop – ISPF Command Line Commands – Find/Repeat FindRDz supports the ISPF FindFind command and most options and variations. Let's try out a few…

With PSAM1B.pli loaded into the editor, do the following:- On the command line, type the ISPF command shown and press <Enter>

bottom top F PRTHDG3 Press F5 several times

bottom F PRTHDG3 first F PRDHDG3 last top F PRTHDG3 1 10 Press F5 bottom F NUM 12 20 first F NUM last F NUM prev Press F5 several times

top ; F NUM all x all ; f num all res

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

Hint:Hint: Don't forget that – with mouse focus in the Command line, you can press the UpUp arrow key to retrieve the previous command

Command lineCommand line

Page 111: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

111

WorkshopWorkshop – ISPF Command Line Commands – Change, Repeat Find/Repeat Change, Undo, Exclude, Bounds, RES – ISPF Command Line Commands – Change, Repeat Find/Repeat Change, Undo, Exclude, Bounds, RES

RDz supports the ISPF changechange commands and most options and variations. With PSAM1B loaded into the editor, do the following:- On the command line, type ISPF command Press <Enter> after each command:

toptop C NUM IBMC NUM IBM undoundo C result reslt allC result reslt all undo undo C all reslt resultC all reslt result bottombottom C result reslt firstC result reslt first undoundo C result reslt lastC result reslt last undoundo

top ; c 12 40 space spctop ; c 12 40 space spc Press F5 F5 then Press F6 F6 Continue pressing F5F5 and F6F6

for "discretionary find/change"

undo 11undo 11 bottombottom

Try a few more Find / Change command combinations: F "Y" allF "Y" all F '"Y"' allF '"Y"' all Press F5 F5 F DCL 8 12F DCL 8 12 X all ; X all ; f DCL allf DCL all RESRES X all ; X all ; f DCL all 8 12f DCL all 8 12 RESRES X all ; f FILL allX all ; f FILL all c * PHILc * PHIL Press F6 a few times F6 a few times bounds 10 40bounds 10 40

– Then try a few Find/Change commands again

Take another few minutes and use F with the following Find operands: char, suffix, prefix, word, char, RFINDchar, suffix, prefix, word, char, RFIND

Do not save your changes to PSAM1B

Page 112: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

112

ISPF – 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 (Prefix area commands)

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

Page 113: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

113

ISPF – 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

Page 114: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

114

Workshop – ISPF Find Exclude/Not ExcludeFind Exclude/Not ExcludeFrom z/OS Projects, open PSAM1A.pli1. From the ISPF prefix area eXclude 444 lines from view

2. Type the following command: f numa_11 all x

3. Type the following command: f num_11 all nx

4. Reset your edit session

5. Tim permitting, experiment with different find commands combined with X, NX and RES

Close and do not save your changes

Page 115: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

115

ISPF Prefix CommandsISPF Prefix Commands

Most of the ISPF prefix area edit commands are supported with same functionality

For a complete list of supported prefix commands: Place your cursor in the prefix area Press F1 F1

ISPF Prefix area commands

ISPF Prefix area commands

Page 116: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

116

Workshop – Workshop – Prefix Area Commands – Part 1

Using your ISPF skills, issue the following ISPF commands by entering commands in the Prefix area and pressing <Enter> after each edit operation

(From RDzClass), open the PSAMM1B.pli program in the editor – and try out a a variety of ISPF Prefix Area commands: Repeat lines Block repeat lines Block delete lines Copy a line before and after Block copy lines Delete a single and block delete multiple lines Move a single and block move multiple lines Block shift lines Exclude lines and Block Exclude some # of lines Insert lines

Page 117: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

117

Optional Topics and Workshops For This Section

If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.

The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.

Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

Page 118: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

118

Filters in preferences and other places

You can use the filtering areas of many RDz tools to streamline access to target features From Window > Preferences type the following into

the filter area and press Enter editor HLASM Sql

… note the effect these filters have on the Preferences shown

From Window > Show view > Other… type the following into the filter area and press Enter rem ta cics z/

Filter

Page 119: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

119

ISPF Prefix Area Commands – Example with Excludes/Expand up or DownISPF 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 show less, as you get expand/collapse functionality (plus signs). But if you like ISPF show, it is supported:

Optional Optional Workshop To show n excluded lines within an excluded block:

Exclude lines, then position your cursor on the excluded marker

Type: F n … or… LL 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

(OPTIONAL) Try: LC and UC (lower-case/uppper-case prefix area commands) – in any PL/I program

Page 120: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

120

(Optional Workshop) Changing Editor Colors – 1 of 2 First – open any file in the editor (StartApp.pli will do)

Next, from: Window > PreferencesWindow > Preferences LPEX Editor AppearanceAppearance Set customized attributes. After each operation, click: ApplyApply and look at your

editor view Palette: Black

Current Line – click: ForegroundForeground, and from the Color Palette, select aqua (or green),

then click: OKOK on the Color Palette

prefixArea – click: ForegroundForeground, and from the Color Palette, select aqua (or green),

then click: OKOK on the Color Palette

selection – click: ForegroundForeground, and from the Color Palette, select Black. Click Background and from the Color Palette select: Gray then click OKOK on the Color Palette

Page 121: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

121

Optional TopicOptional Topic - Changing Editor 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

Page 122: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

122

From: Window > Preferences > General > Appearance > Colors and Fonts You can override the installation defaults for RDz views, view text, etc. Use this to match your Workbench to corporate color themes/standards, etc.

Note – if your Workbench ends up looking like a Peter Max poster, and you'd like to return to the out-of-the-box colors, use

(Optional Workshop) Changing the RDz Workbench Colors

Page 123: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

123

Optional Workshop – Optional Workshop – Filters in preferences and other places

You can use the filtering areas of many RDz tools to streamline access to target features From Window > Preferences type the following into

the filter area and press Enter editor PL/I Sql

From Window > Show view > Other… type the following into the filter area and press Enter rem ta cics z/

Filter

Page 124: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

124

Source Code Editing – Review and Use Cases

RDz Editing ToolRDz Editing Tool ConsiderationsConsiderationsMake ISPF the default editor From Preferences > LPEX Editor - select ISPF This preference is tied to your workspace

Use ISPF command line commands Same as ISPF – for the supported commands The commands are case-sensitive

Find out what ISPF command line commands are supported?

From the command line, press Ctrl+Spacebar

Use ISPF Prefix area commands Same as ISPF – for the supported commands

Change background color to black From Preferences > LPEX Editor > Appearance > Palette Other source elements can be colorized

Use PL/I numbering Same as ISPF: Num PL/I, Num On, Num Off, etc.

Page 125: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

125

Advanced Topic – Customized Auto Commenting – 1 of 3

Your shop may require you to auto-comment columns 1-6, or 73-80 with information about changes you make to source lines. Typically this would be something like your initials and a date: JS010112 … etc.

Auto Commenting is available in PL/I from the Context Menu Enter the text you want Auto Commenting to add to your source code

Page 126: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

126

Advanced Topic – Modifying the Auto Comment Rule Defaults – 2 of 3 You can modify RDz's defaults for Auto

Commenting PL/I, from: Preferences > Autocomment Select PLI and click: Edit…

Set: Comment format rules Insertion rules Default comments

Page 127: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

127

Advanced Workshop – Auto Commenting Changed Lines – 3 of 3

Open any of the PL/I programs in RDzClass From the Context menu, select: Start Flagging Changed Lines From the Language Profile, select: PLI Type something in the Base Flag (your initials – note that the default PL/I Auto Comment max

is 8 characters – and this includes /* …. */ Click OK and modify a source line Move your cursor to some other line and note the effect

Optional/Advanced WorkshopOptional/Advanced Workshop - If time permits try the following:

From Window > Preferences > Auto Comment Edit the PLI options – Modify the Formation and Insertion rules

See screen captures below for examples Repeat the above Auto Commenting exercise, then check out what your new preferences did

Page 128: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

128

UNIT The "PL/I Editor"The "PL/I Editor"

Page 129: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

129

PL/I and PL/I Language Editors

Starting in version 8.0 IBM introduced a language-specific editor for PL/I developmentThis editor is built entirely from the Eclipse framework, and thus behave

like the Eclipse Java editor used in many colleges and universitiesThe functionality in the editor was limited in the first release, but it has

gradually being built-up over time, and – starting at version 8.0.3 – these editors contend strongly for "editor-of-choice" status with many RDz users – especially those without deep ISPF experience

Pluses:Powerful GUI code development features/functionsHeavy investment by IBM for future enhancements

MinusesThese editors do not contain ISPF editing features (there is no profile,

no command line, no prefix area, no ISPF PF-Key emulation, etc.)

Page 130: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

130

Invoking the PL/I or PL/I Editors

Invoke the editor by right-clicking over a PL/I file, and selecting: Open With > PL/I Editor Note that you will only have to do this one time. RDz will open persist your decision to your workspace Also – in Preferences you can change your default editor to the PL/I editor instead of LPEX

All of the other RDz views work (Overview, Remote Systems Explorer, etc.) work exactly the same with the PL/I and LPEX editors

Page 131: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

131

Menus and Toolbars

Note that the menus and toolbars are different from the LPEX editor Many of the functions are the same as in LPEX

But getting to them may require different keystrokes You will probably use the menu and toolbar with this editor more frequently than

you did with LPEX Also:

Many functions in the PL/I editor are not available in LPEX And many functions in LPEX not available in these editors

Page 132: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

132

Editing Context Menu

Select some source and right-click to find the edit operations available from the PL/I Editor Subset of what is in LPEX Some new functionality and options:

Source - Format your program, etc. Revert File – One click "cancel all changes" (undo) – without leaving edit Quick Fix – Provides mouse-selection option for syntax errors (more on this in a bit) Surround with – Select a statement and surround with an: IF, DO, etc.)

Page 133: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

133

PL/I Editor – Hover Features

Enhanced Hover Variables

Hover over a variable Slide your mouse focus point into the hover rectangle

(or press F2) This opens a graphical area – for viewing the variable/procedure

- with icons for navigating to the declaration All with one-click

Hover over Include files Hover over the filename Slide your mouse into the pop-up area

Click the pencil to open and edit the Include

RDz v8.5.1 Include Hover

Page 134: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

134

Collapsible Sections In the PL/I editor, you can

collapse/expand PL/I procedures

Useful for isolating code … as is "Show only selected source" Next topic…

Page 135: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

135

Toolbar option that allows you to select a procedure and isolate (show only) the statements in that Procedure

Show Source of Selected Element OnlyR

an

ge

in

dic

ato

r

1. Click anywhere inside of a procedure

2. Click "Show Source of Selected Element Only"

3. Click "Show Source of Selected Element Only" again, to toggle back to normal edit mode

Isolates the Procedure for:

Viewing/Editing

Find/Change

Page 136: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

136

Variable Markers In the PL/I Editor, when you select a

variable, the editor marks: The declaration in gold Any statement that modifies the contents

of the variable in gold All other statements in gray

Conditionals DO and iteration Search statements START Assignment statement (sending portion)

Gold & gray variable markers. Note how they "call out" references

to a variable in your source file.

Page 137: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

137

Surround With You can select a set of statements, right-click and ask RDz to surround the

statements with a: Conditional statements: IF, IF – Then - Else DO, DO Until, Do While, etc.

Configure Templates… allows you to add/change/delete the default PL/I statement templates

Page 138: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

138

Quick Fix Provides mouse-based code fixes for:

Keywords PL/I variables

Shown as a small light-bulb in the left-margin next to real-time syntax validations Mouse-over syntax errors to get click-able proposals list

Double-click over an entry in the list to pick up the Quick Fix

Page 139: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

139

Hex Editing A toolbar option in the PL/I Editor that opens up a Hex Edit area for the selected

line Toggle on and Toggle off from the toolbar – or using a Hot-Key (Ctrl+Shift+H) Edit in hexadecimal The editing area persists:

From line-to-line – when you move around in your source file From file-to-file – when you close and open different files From RDz launch-to-launch – when you open and close and reopen RDz

Page 140: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

140

Block Editing A toolbar option, that toggles

between Block editing and basic (line or stream) editing can be used to cut/copy/paste blocks of source code

Steps:

1. Toggle Block Selection Mode on by clicking the icon on the toolbar

2. Use the block cursor to left-click, hold and drag through a rectangular block of text

3. Copy and Paste the text block

When you're finished Toggle Block Selection Mode off

1.

2.

3.

Page 141: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

141

PL/I Sequence Numbers

New to the PL/I Editor: From the Source menu:

Renumber Unnumber

Default puts PL/I numbers in columns 73 80 Can change defaults through Preferences

SequenceNumbers

Page 142: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

142142

PL/I Comment Task Tags

Files opened in the PL/I editor will be scanned for tags in comments.

Tasks will be created for matching patterns in the Tasks View – after after saving your file.saving your file.

Preference pages will allow customization of tag patterns.

Generated Tasks will persist after closing the editor.

To remove these "comment Task Tags" you have to modify the text in the source file – you can't just delete them from a Context menu.

TODO - Comment task tag

Tasks view - Opened from: Window > Show view > Tasks

Page 143: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

143

PL/I Editor Preferences

Window > Preferences > PL/I Editor Real-Time validation Templates

Configure RDz's behavior to your development requirements and tastes

All decisions (configurations) persisted to your Workspace

Page 144: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

144

Find/Replace Dialog

Find/Replace text (Ctrl+F) similar to Windows (and other GUI products) U.I. Useful options include:

Typical find options:

Whole word / Case sensitive / etc.

Incremental find

RDz searches – with each letter typed (like Google)

Regular expressions (covered in an upcoming section)

Selected lines:

Instead of clicking Find, enter the string and click Selected lines

The Find/Replace dialog persists – until you close it by clicking the X in the top right-hand corner

Page 145: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

145

Find EBCDIC Hex Characters – in a File (v8.5)

Find text (Ctrl+F) using the hexadecimal values based on the file's remote codepage

Override the behavior of the existing escape sequence “\xhh” to always be interpreted as being based on the remote codepage values.

This behavior works on both the Find text field and the Replace text field.

Content Assist provided for the Regular Expression (press Ctrl+Spacebar)

Page 146: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

146

Show Matching Parenthesis and Brackets (v8.5)

Can highlight conditional and math parenthesizing of logical expressions

New preference page under PL/I > Editor categories Add preference to set the color used in the matching parenthesis annotation Placing the caret to the right of an open or closed parenthesis will annotate the matching parenthesis

Window > Preferences > PL/I > Editor

Page 147: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

147

Include handling

Ctrl + Mouse hyperlink on PL/I includes

V8.5

V8.5.1

CUST2PLI

Open Copy MemberView Copy MemberBrowse Copy Member

Page 148: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

148

Source Formatting – RDz Version 8.0.3 and Later Source formatting applies rules-based code formatting:

Indents statements Outlines nested IF statements – showing the nested logic visually Modifies statement case (upper/lower/mixed/etc.)

Available under the SourceSource context menu for individual programs opened from Remote Systems or Local Workstation project, using the dedicated language editors:PL/I EditorNot in the LPEX editor

To open a file using the PL/I editorRight-click the fileSelect Open With >

Formatting rules are configurable:Define your own custom rules for source formatting

Page 149: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

149

Source Formatting – Examples

Before

After

Page 150: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

150

Formatting Preferences

Page 151: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

151

“Save Actions” PL/I Editor (v8.5)

Enable actions before and after a file is saved Source files have an option to Format source code, plus a sub-option to only apply the capitalization

When an editor is saved, the save actions will be run in this order: Formatting Identify Preprocessor Statements Remove trailing Whitespace

Page 152: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

152

Workshop – PL/I Editor – 1 of 8

Open each PL/I program with the Pl/I Editor – and do the following:

RDz features that are part of LPEX and the PL/I Editor Open PSAM1 with the PL/I Editor

Double-click (to select) the PSAM1: Procedure name (at the top-of-file) and from the Context (right-mouse) menu

Open the Call Hierarchy

Select: Show In > Data Elements

Other options Press Ctrl+Home (this does what?)

Use the Outline view to navigate inside the source file

Press Ctrl+End

Select the variable CUSTRPT and press F3 (or use the Context Menu to open the declaration)

Open PSAM1B (with the PL/I Editor) – but do not close PSAM1

Go full screen – and create a side-by-side view of both programs

Close PSAM1

Page 153: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

153

Workshop – PL/I Editor – 2 of 8Press Ctrl+F and find NUMA_11 - Press the Find button a few times

1. Select some lines in the source where NUMA_11 does not exist and click: Selected lines

2. Now select lines where NUMA_11 does exist and click: Selected lines

3. Check Regular expressions and search on: NUMA|NUMB|NUMC

Press the Find button to understand what the pipe | separator does

4. With Regular expressions checked, search on: (IF.*NUM) Press the Find button to understand what .* does

5. Uncheck Regular expressions then press Ctrl+Home

6. Check: Incremental find, and search for: N U M A

7. Click Toggle Block Selection Mode

8. Select a rectangle of text

9. Click Selected lines What is the difference between this technique

and #s 1 & 2 above

Close the Find dialog

Search within selected text block

Page 154: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

154

Workshop – PL/I Editor – 3 of 8

1. Open PSAM1BPSAM1B with the PL/I Editor and experiment with Cut/Copy/Paste. When finished, close PSAM1B and do not save your source changes to the program

2. Open PSAM1B again. Press Ctrl+F and find the PRTHDG3: Procedure declaration. Experiment with Collapse/Expand Procedures – in PRTHDG3 and in surrounding procedures.

3. Add the word: TODOTODO to a comment somewhere in PSAM1B. Save your file and open the Tasks view (From the Window menu > Show view > Tasks). Close PSAM1B. Click the persisted Task for your TODO comment. What happened? Repeat this with the word: FIXMEFIXME

4. From the Outline view (in the PSAM1B program) find (Ctrl+F) the UPSKSDS: procedure and click your cursor inside the procedure

Click: Show Source of Selected Element Only for the UPSKSDS: procedure

Toggle out of Show Selected Element Only (click the icon again)

Click your cursor inside of the TRANTOT: procedure

Once again: Show Selected Element Only

Maximize the window

Right-click over the PSAM1B tab and select New Editor

Note that you can have one editing frame in Show Selected Element Only mode – while you have another editing frame that displays the entire program source

Page 155: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

155

Workshop – PL/I Editor – 4 of 8

Open PSAM1BPSAM1B with the PL/I Editor and experiment with Cut/Copy/Paste for a few minutes

Close and do not save your source changes to the program

Press Ctrl+F and find the PRTHDG3: Procedure declaration Experiment with Collapse/Expand Procedures

From the Outline view find the UPSKSDS: procedure Experiment with Show Source of Selected Element Only for UPSKSDS

Find the first occurrence of: NUMA Using Toggle Block Selection – block copy and paste the six PIC 'ZZZ,ZZ9V.99'; to an empty set of six lines in the source file

Note that you will have to insert 6 blank lines before the paste operation)

When you're finished, Toggle Block Selection off

Page 156: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

156

Workshop – PL/I Editor – 5 of 8

Toggle Hex Line Edit on Make a change in Hex

Note that that this is ASCII Hex.

When you open a file from z/OS you will see and can work with EBCDICEBCDIC Hex characters

Save your change and Toggle Hex off (by clicking the icon again)

From the Navigate menu, Go to line… 367 Click on the occurrence of NUMA_11 on line 367

What do the gold and gray/blue colors around the variable mean? Click several other variables

From Window > Preferences > PL/I > Editor – change the "Highlight matching parenthesis" color to red

Still from within PSAM1B – do a Ctrl+F (find) on: Matching Parens Click next to the right-paren on each of the parens in the computation

Page 157: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

157

Workshop – PL/I Editor – 6 of 8

Open EPSBDP1EPSBDP1 with the PL/I Editor

From Outline view find the A600_CALL_DAY_DIFFERENCE: Procedure

Locate and hover over W_EPS02_PROGRAM_RETCODE

Move your mouse into the graphical block

Select Open PL/I Declaration

From the Outline view, find the include file: EPSP1MP

Hover over the include file

If you are using RDz v8.5.0 open the Include file

If you are using RDz v8.5.1:

Scroll up and down

Edit the Include file

Close EPSP1MP

Page 158: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

158

Workshop – PL/I Editor – 7 of 8

Open PSAMB1PSAMB1 with the PL/I Editor

From Outline view find the TRANABN: Procedure

Backspace over WORKNUM_A (to erase the A character)

Double-Click your mouse over the yellow light bulb in the left-hand border (not the triangle … the light bulb)

Double-Click Change to "WORKNUM_A"

Select the PUT FILE and LIST statements, and from the Context menu select: Surround with > IF - then - else

From the Context menu select: Source > Sequence Numbers > Renumber

Page 159: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

159

Workshop – Source Format – 8 of 8

Steps: Open PSAM1B.pli with the PL/I

Editor Using the Find menu locate the text

string: 4mat Stare at this WHEN statement for a

second or two Aren't you glad you don't have to

modify it - in this form?

Using your mouse, select all of the code in the Procedure

Right-click and select: Source > Format Source > Format

Note that the proper formatting is achieved – such that the visual representation of the code matches the procedural semantics IF/END matching Etc.

Page 160: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

160

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I Programs Editing With Keystroke ShortcutsEditing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Execution (control flow) and Data Flow Analysis Working with Copybooks and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 161: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

161

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 modern-development 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

Page 162: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

162

Hot-Key Combinations

The PL/I and ISPF/LPEX editors actually support 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+CC Alt+cc

We will cover the essential Hot-Keys starting on the next slide: NavigationNavigation Select TextSelect Text Copy/Paste TextCopy/Paste Text Line OptionsLine Options MiscellaneousMiscellaneous

Ctrl + Shift + LCtrl + Shift + L

Hot-Key list for LPEX

Page 163: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

163

Hot-Key Combinations – Source Navigation LPEX/ISPF

RDz Hot KeysRDz Hot Keys DescriptionDescription ISPF EquivalentISPF EquivalentCtrl+HomeCtrl+Home Top of file Max PF7Max PF7

Ctrl+EndCtrl+End Bottom of file Max PF8Max PF8

Ctrl+2Ctrl+2 Open same program in split-screen view PF2 PF2 - then open the source member

Ctrl+0 (zero)Ctrl+0 (zero) Close edit session PF3 PF3 (or CAN on the command line)

Ctrl+SCtrl+S Save edit session SaveSave

Ctrl+PCtrl+P Print current file N/A

Ctrl+TCtrl+T Make current line top line in the editor PF7/PF8 PF7/PF8 with CSR as your paging option

PgUpPgUp Page up one physical page of source at a time PF7PF7

PgDnPgDn Page down one page of source at a time PF8PF8

PF7/PF8PF7/PF8 Page up/down one page of source at a time PF7/PF8PF7/PF8

Up/Down – Up/Down –

Right/Left ArrowsRight/Left ArrowsScroll one character at a time through your source:Up/Down – Right/Left

Up/Down/Right/Left ArrowsUp/Down/Right/Left Arrows

Ctrl+PgDnCtrl+PgDn Page Right PF11PF11

Ctrl+PgUpCtrl+PgUp Page Left PF10PF10

Ctrl+LCtrl+L Open Line Number feature N/A

Ctrl+WCtrl+W Show all filtered lines RESRES

Shift+F10Shift+F10 Show the Context (popup) menu N/A

Ctrl+Shift+LCtrl+Shift+L Show the list of all Hot-Key Combinations N/A

Alt+SAlt+S Split Line – Auto-continue Text Split – but does not do Auto-Continue

Alt+JAlt+J Join Line – Auto-continue Text Join – but does no do Auto-Continue

EscapeEscape Cursor jumps to the command line N/A

Page 164: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

164

Hot-Key Combinations – Line and Statement Editing LPEX/ISPF

RDz Hot KeysRDz Hot Keys DescriptionDescription ISPF EquivalentISPF EquivalentCtrl+FCtrl+F Opens Find/Replace Dialog Find/Change ISPF CommandsFind/Change ISPF Commands

Ctrl+ZCtrl+Z Undo last change UNDO UNDO (if Recovery On)

Ctrl+YCtrl+Y Redo last change N/A

Shift+Down ArrowShift+Down Arrow Select text from the current cursor position downward in the source file

Prefix Area Command: CC … CC PF7Prefix Area Command: CC … CC PF7

Shift+Up ArrowShift+Up Arrow Select text from the current cursor position upward in the source file Prefix Area Command: CC … CC PF7Prefix Area Command: CC … CC PF7

Ctrl+Shift+Right ArrowCtrl+Shift+Right Arrow Open same program in split-screen view PF2 PF2 + navigate to source member

Shift+EndShift+End Select text from cursor position to end of line N/A

Shift+HomeShift+Home Select text from cursor position to beginning of line N/A

Ctrl+ACtrl+A Select all text in the source file Prefix Area Command: C99999Prefix Area Command: C99999

Alt+UAlt+U Unselect selected text N/A

Ctrl+CCtrl+C Copy currently selected source lines Prefix Area Command: C Prefix Area Command: C or CC CC

Ctrl+XCtrl+X Cut currently selected source lines Prefix Area Command: M Prefix Area Command: M or MM MM

Ctrl+VCtrl+V Paste currently copied source lines Prefix Area Command: A Prefix Area Command: A or B B

Ctrl+JCtrl+J Find previous edit change N/A

Ctrl+RightCtrl+Right Locates cursor at the beginning of the next word N/A

Ctrl+BackspaceCtrl+Backspace Delete Current line Prefix Area Command: DPrefix Area Command: D

Ctrl+DCtrl+D Repeat Current line Prefix Area Command: RPrefix Area Command: R

Ctrl+EnterCtrl+Enter Insert new line Prefix Area Command: TS or IPrefix Area Command: TS or I

Ctrl+DeleteCtrl+Delete Delete (Truncate) to end of line Erase (EOF) keyErase (EOF) key

F5 F5 and F6 F6 Find and Repeat Find, Change and Repeat Change PF5 / PF6PF5 / PF6

Page 165: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

165

Common ISPF Key Editing Techniques Common ISPF Key Editing Techniques LPEX and PL/I EditorsYou're probably used to the Erase (EOF) key.

Using RDz you substitute

Ctrl+Delete (LPEX Editor)Ctrl+Delete (LPEX Editor)

Ctrl+Shift+Delete (PL/I Editor)Ctrl+Shift+Delete (PL/I Editor)

Other useful PC-key combosOther useful PC-key combos1. Select to the end-of-line

Shift+EndShift+End

2. Move your cursor to the end and beginning of a statement

Position your cursor inside a statement: Press

EndEnd HomeHome

Page 166: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

166

Workshop - Common ISPF Key Editing Techniques – LPEX Common ISPF Key Editing Techniques – LPEX

Open the EPSBDP1.pliEPSBDP1.pli program in the editor and experiment with the Hot-Keys described on the last 3 slides No need to systematically click every one of them, just the 10 12 that look

useful or interesting Also be sure to press Ctrl+Shift+LCtrl+Shift+L – while editing a source file

What does this do?

Page 167: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

167

You can copy a block of text in RDz's LPEX editor by doing the following: Press ALT+R – or use the Context menu to Select rectangle editing Mark the Block Press ALT+C to paste the block

Workshop: Open LABINAR1.pli – and scroll to the DATA AREAS Press ALT+R and block copy these comments

Paste the block – using ALT+C here….

Optional Workshop – Block (column-wise) Editing - LPEX

Page 168: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

168

Hot-Key Combinations – Source Navigation PL/I Editor

RDz Hot KeysRDz Hot Keys DescriptionDescription ISPF EquivalentISPF EquivalentCtrl+HomeCtrl+Home Top of file Max PF7Max PF7

Ctrl+EndCtrl+End Bottom of file Max PF8Max PF8

Ctrl+SCtrl+S Save edit session SaveSave

Ctrl+PCtrl+P Print current file N/A

PgUpPgUp Page up one physical page of source at a time PF7PF7

PgDnPgDn Page down one page of source at a time PF8PF8

Up/Down – Up/Down –

Right/Left ArrowsRight/Left ArrowsScroll one character at a time through your source:Up/Down – Right/Left

Up/Down/Right/Left ArrowsUp/Down/Right/Left Arrows

Ctrl+PgDnCtrl+PgDn Page Right PF11PF11

Ctrl+PgUpCtrl+PgUp Page Left PF10PF10

Ctrl+LCtrl+L Open Line Number feature N/A

Ctrl+WCtrl+W Close PF3PF3

Shift+F10Shift+F10 Show the Context (popup) menu N/A

Ctrl+Shift+LCtrl+Shift+L Show the list of all Hot-Key Combinations N/A

Page 169: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

169

Hot-Key Combinations – Line and Statement Editing PL/I Editor

RDz Hot KeysRDz Hot Keys DescriptionDescription ISPF EquivalentISPF EquivalentCtrl+FCtrl+F Opens Find/Replace Dialog Find/Change ISPF CommandsFind/Change ISPF Commands

Ctrl+ZCtrl+Z Undo last change UNDO UNDO (if Recovery On)

Ctrl+YCtrl+Y Redo last change N/A

Shift+Down ArrowShift+Down Arrow Select text from the current cursor position downward in the source file

Prefix Area Command: CC … CC PF7Prefix Area Command: CC … CC PF7

Shift+Up ArrowShift+Up Arrow Select text from the current cursor position upward in the source file Prefix Area Command: CC … CC PF7Prefix Area Command: CC … CC PF7

Ctrl+Shift+Right ArrowCtrl+Shift+Right Arrow Open same program in split-screen view PF2 PF2 + navigate to source member

Shift+EndShift+End Select text from cursor position to end of line N/A

Shift+HomeShift+Home Select text from cursor position to beginning of line N/A

Ctrl+ACtrl+A Select all text in the source file Prefix Area Command: C99999Prefix Area Command: C99999

Ctrl+CCtrl+C Copy currently selected source lines Prefix Area Command: C Prefix Area Command: C or CC CC

Ctrl+XCtrl+X Cut currently selected source lines Prefix Area Command: M Prefix Area Command: M or MM MM

Ctrl+VCtrl+V Paste currently copied source lines Prefix Area Command: A Prefix Area Command: A or B B

Ctrl+Right Arrow Ctrl+Right Arrow Locates cursor at the beginning of the next word N/A

Ctrl+BackspaceCtrl+Backspace Delete Current line Prefix Area Command: DPrefix Area Command: D

Ctrl+DCtrl+D Repeat Current line Prefix Area Command: RPrefix Area Command: R

Ctrl+EnterCtrl+Enter Insert new line Prefix Area Command: TS or IPrefix Area Command: TS or I

Ctrl+DeleteCtrl+Delete Delete (Truncate) to end of line Erase (EOF) keyErase (EOF) key

F5 F5 and F6 F6 Find and Repeat Find, Change and Repeat Change PF5 / PF6PF5 / PF6

Page 170: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

170

Workshop - Common ISPF Key Editing Techniques – LPEX Common ISPF Key Editing Techniques – LPEX Open the EPSBDP1.pliEPSBDP1.pli program in the editor and experiment with the Hot-Keys

described on the last 2 slides No need to systematically click every one of them, just the 10 12 that look useful or

interesting Also be sure to press Ctrl+Shift+LCtrl+Shift+L – while editing a source file

What does this do?

Page 171: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

171

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I Programs ISPF Prefix Area Commands Editing With Keystroke Shortcuts Find and Replace Dialog – LPEX/ISPF EditorFind and Replace Dialog – LPEX/ISPF Editor Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Execution (control flow) and Data Flow Analysis Working with Copybooks and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 172: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

172

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+FCtrl+F …or… Ctrl+fCtrl+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 checkboxescheckboxes: 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

See NotesSee NotesSee NotesSee Notes

Page 173: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

173

Find/Replace Dialog – 2 of 4 – Options

NextNext– Find forward in the source

– Does notnot find text inside copy or include files

– Ctrl+nCtrl+n – finds next

PreviousPrevious– Find upwards (back) in the source from your current cursor position

AllAll– Finds all lines within the source

– Additionally will excludeexclude or filter all source not matching your Find string

Provides an intermediate set of lines to AND your search with

– Press Ctrl+WCtrl+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 to show filtered source

ReplaceReplace– Adheres to source columns

– If replace would push text past column 73 you will receive a warning

ReplaceReplace all– Changes "found" values to the replacement values throughout file

Note that whatever you enter the Find/Replace dialog persists This can be useful to do repeated searches within multiple files

Page 174: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

174

Workshop Workshop Find/Replace Dialog

Load PSAM1B.pliPSAM1B.pli into the editor Do a Ctrl+FCtrl+F

Search for AAllll NUMNUM

Restrict the column search to between 10 and 12 FFind All: All: DSDS (again) Expand some of the plus-signs and un-filter the code Press: Ctrl+W Ctrl+W … What does that do?What does that do?

Customizing Search Customizing Search From the Context Menu, select: PreferencesFrom the Context Menu, select: Preferences

Locate:

- LPEX Editor- LPEX Editor

- Find Text- Find TextCheck:

Select found textSelect found text

Incremental find dialogIncremental find dialog

ClickClick OKOK

Re-run the above Searches then close PSAM1BRe-run the above Searches then close PSAM1B

Page 175: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

175

Workshop 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… Open EBUDP1.pli Open EBUDP1.pli and Find AllAll on each of the following (one text pattern at a time):

DCL SKIP DO EBUDP2 – Try EBUDP2 with and without Whole Word checkedDCL SKIP DO EBUDP2 – Try EBUDP2 with and without Whole Word checked

Try experimenting with your own searches, using these Find/Replace options: Case sensitive Select found text RReplace Repplace All Prevvious NNext NNext (combined with)

RReplace (This is like PF5/PF6)

Change Peek to 1 – and repeat one of the above searches What does this do, and can you see uses for this topic?

When you are finished, close your editor session and do notnot save changes

Page 176: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

176

Optional Topics and Workshops For This Section

If you have time, and are comfortable with the material covered, please read through the slides – and/or try out the techniques shown using RDz and sample programs.

The development techniques covered in these slides can make your standard z/OS Maintenance, Production Support and Development tasks much easier, and make you more productive. So at some point – perhaps after class please consider returning to these optional topics to build out your RDz skills.

Also – if you have access to RDz installed on your mainframe and time permits, please try out the techniques shown using your own application source.

Page 177: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

177

Optional Workshop - Optional Workshop - Find/Replace Dialog – AND'd Searching Results

Problem – find all occurrences in a program that contain BOTH the PL/I IF statement and a label

Solution/Steps: Open PSAM1B.pli Find NUMNUM ALL With the set of "found" NUM

variable lines in the editor, again: Find IFIF Continue to press NextNext

When you click All – the lines from your program source showing in the editor represent a temporary "Results Set"

Click the Next button – to search through this Result Set

This allows for And'd" search techniques - Show me all lines in my source that have this AND that

Page 178: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

178

OPTIONAL Workshop – Using Regular Expressions

Open PSAM1B.pli

Press Ctrl+F To open the Find/Replace dialog

Check Regular expression

Enter the following find expression:

IF|NUM

Click: AllAll

Repeat the above, and do a logical "OR" search for: numa|numb|numcnuma|numb|numc

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

Page 179: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

179

(Logical AND search) Find all lines with numanuma and with balancebalance in the program: PSAM1B.pliPSAM1B.pli

First search (ALL) for numanuma Then search (ALL) forThen search (ALL) for balancebalance

Now try: numanuma.*.*balancebalance

Additional examples of Regular Expressions:Additional examples of Regular Expressions: DCLDCL.*.*HDRHDR FILEFILE.*.*TRANFILE TRANFILE (try this without and with Whole WordWhole Word checked) 100100||999 999 (try this without and with Whole WordWhole Word checked)

OPTIONAL Workshop – Using Regular Expressions – continued

Page 180: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

180

Optional Topic – Using Regular Expressions to change all within columns

You can use regular expressions to substitute for ISPF picture string editing.Example – change all characters in columns 73 80 to blanks (spaces)

Regular Expression Start column: 73 End column: 80 Find: Type a period . Replace: Type a space

Page 181: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

181

OptionalOptional Topic – Another Useful Search Mechanism Using the Search menu, you can

search on a variable (or any partial selected text) in a program with: Search

Text > File The results are hyperlinked – for easy

navigation, and can be: Copied/pasted to a requirements

document Changed

Replace Selected…Replace All…

Searched Again to provide the capability of AND-ing multiple search patterns

Page 182: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

182

OptionalOptional Topic – Highlight Found Text

Some ISPF developers prefer to highlight all found text occurrences.

This can be accomplished from: Preferences > LPEX Editor > System z LPEX Editor > Find Text

Use Ctrl+FCtrl+F (Find) to search and highlight text in your source

To remove highlighted entries, type: clearMatchesclearMatches on the editor command line

Page 183: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

183

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I Programs ISPF Prefix Area Commands Editing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Creating New Programs From Scratch • Miscellaneous Features – Hex edit, Content Assist Filter view• Execution (control flow) and Data Flow Analysis• Working with Copybooks and Property Files• Appendix – ISPF / LPEX Editor Comparison

Page 184: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

184

Creating New Programs Using Copy/Paste

Instead of using pre-defined templates, you may be used to "cannibalizing" pre-existing 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 RDz1. Create a new empty file – saved as <newFileName>.pli2. Open a second (existing) PL/I program and 3. Copy all of the existing program into the new file.pli…or…1. Create a new empty file – saved as <newFileName>.pli2. Open a second (existing) PL/I program and 3. Copy/Paste only specific portions of the existing program into the new file.pli

Both have their uses, so let's have a look at how to proceed with them

Page 185: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

185

Creating New Programs Using Copy/Paste – Copy Entire Program

Steps:

1. Open an existing program source in the editor: EPSBDP1.pli- Select all (Ctrl+ACtrl+A) then Copy (Ctrl+CCtrl+C) all of the statements in the program

2.2. Right-clickRight-click over the asmasm folder in z/OS Projects and select:

– New > FileNew > File

– Name your new file: EPSBDP0.pliEPSBDP0.pli3. Click your mouse-pointer into the new file in the top-left hand corner (column 1,

row 1) and press Ctrl+VCtrl+V to paste the program statements you copied in step 1

4. Save the file (Ctrl+SCtrl+S)

5. Close both programs

Page 186: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

186

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 labels, DCLs, statements, etc.

This is easily done combining mouse-based copy/paste with the previous new program technique or (even better) starting from a Template:1. Open an existing to-be-copied program in the editor (we'll call this: From-Program)2. Start from a program template, or create a new empty program as before (we'll call this: To-Program)3. Maximize your Editors 4. Find and Select copy source within: From-Program 5. Paste the copied source into the appropriate area of: To-Program6. Scroll down and find the next piece of code to copy in From-Program – repeat steps 5 & 6

Page 187: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

187

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I Programs ISPF Prefix Area Commands Editing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Miscellaneous Features – Hex edit, PF1 PoP help, Miscellaneous Features – Hex edit, PF1 PoP help, Content Assist, FiltersContent Assist, Filters Execution (control flow) and Data Flow Analysis Working with Copybooks and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 188: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

188

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:

PL/I keyword Label or variable

Move your cursor immediatelyimmediately at the end of the text you wish to use Content Assist to complete

"immediately" = the very next byte after the text

Press Ctrl + SpacebarCtrl + Spacebar Select the completion identifier from the list – which is sorted

alphabetically within type

Benefits: Makes coding faster & easier Reduces typos and syntax errors Particularly helpful with less-than-meaningful and long variable

names and labels

Different Content Assist options

Content Assist – for Variables

Content Assist – for Reserved Words

Page 189: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

189

Optional Topic – Local Syntax Checking and Remote Error List You can Syntax Check your source program, and work with syntax errors as hyperlinks from the

Remote Error List By double-clicking on a problem from the Remote Error List, the file in question is opened in the Editor,

and your mouse is positioned to the line in doubt

Note that you can also mouse-over a Red-X in the editor border to learn more about the nature of the syntax error

Syntax Checking is invoked from the Context menu (Right-mouse): Within a file – when the file is opened in the editor On the file list, presented in the z/OS Projects view, or Remote Systems explorer

Hyper-linked syntax error, in the Remote Error

List view

Source file

containingthe

problem

Page 190: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

190

Optional Workshop – Content Assist and the Remote Error List ViewFrom RDzClass open: PSAMOS1

Note that if you'd like to use the PL/I Editor Right-click over PSAMOS1 and select Open with > PL/I Editor

Remote Error List Right-click within the file and from the Context menu select: Local Syntax Check Select the Remote Error List view and note the warning messages Make a few coding changes – add several syntax errors into PSAMOS1 – including

errors to one or more Procedure names/references. Right-click within the file and from the Context menu

select: Save and Syntax Check Note the Remote Error List view (again) Return the PSAMOS1 source code to its initial (error free) state by Right-clicking and

use: Replace With > Local History…

Content Assist Scroll to line 277 Backspace from the end of PROGRAM_STATUS to misspell the variable name Press Ctrl+Spacebar – and select PROGRAM_STATUS Repeat these steps with one or two other variables, labels, file names,

Procedure Names, etc.

Page 191: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

191

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I Programs ISPF Prefix Area Commands Editing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Control Flow and Data Flow AnalysisControl Flow and Data Flow Analysis Working with Copybooks and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 192: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

192

Control Flow Analysis – Call Hierarchy

Often you will need to discover a program's control flow by tracing through Branch instructions and Labels

This is a straightforward process with RDz - Right-click and select Open Call Hierarchy

Recall that you can also see "how I got here" - by flipping the modality of the Call Hierarchy

Page 193: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

193

Control Flow Analysis – Filter

Also you need to discover a program's control flow by tracing through procedural logic, instructions and Labels

This is a straightforward process with RDzRight-click and select: Filter view > Logic outline

Recall that you revert to showing all lines with Ctrl+W (Show All)

Page 194: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

194

Are there other Filter Views?

There are several other useful There are several other useful program Filtersprogram Filters

Take a few minutes and open the PL/I programs shown here. From the Context menu, open the Filter views shown in the screen captures

ExtensionsExtensionsIncludesIncludes

(all) Procedures Procedures

EPBSDP1.pliEPBSDP1.pli

PSAM1B.pliPSAM1B.pli

PSAM1B.pliPSAM1B.pli

PSAM1B.pliPSAM1B.pli

PSAM1B.pliPSAM1B.pli

SQL/CICS/DLI SQL/CICS/DLI statements Filterstatements Filter

Page 195: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

195Hyp

erl

inked

refe

ren

ces t

o I

nclu

de fi

les,

Pro

ced

ure

s,

etc

.

Control Flow Analysis – Outline view + Branch logic

You can combine this with Outline view navigation

Page 196: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

196

Application-Wide Control Flow Analysis

If you need to view a "bigger picture" of the control flow among different PL/I modules in an application you can utilize IBM's Rational Asset Analyzer (RAA) – which integrates with RDz, and can materialize different levels of:

Transaction Flow Diagrams Batch Job Diagrams Call/Calling (Run unit) Diagrams

Additional PL/I program semantic info is available in RAA

Page 197: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

197

Data Flow Analysis – Technique

Data Flow research is a complex analysis process that involves iterative searching and building of mental "dependency maps" for variables that are modified or referenced through statements within one or more programs

On the mainframe, you either: Utilize listing files/XREF entries – or – Using ISPF you access option 3.4, or =3.14 and issue a series of manual text FIND

operations – saving or writing down interim results.

This is: Typing-intensive Error-prone With lots of time spent loading programs into the editor in split-screen, etc.

Using RDz you: Find your starting Search variable Pin the Search View and double-click each found-reference

This is: Not typing-intensive Less error-prone

With RDz, all Search results are: Fixed Hyperlinked – available from a mouse click

Page 198: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

198

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…

Page 199: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

199

Workshop – Data Analysis Data Analysis Open IAATS91.pli in the editor

From the command line, type: F NUM_TRANSACTIONSF NUM_TRANSACTIONS and press <Enter>

1. In the Editor source, Double-click Double-click (to select) NUM_TRANSACTIONSNUM_TRANSACTIONS

2. From the SearchSearch menu,

select, Text > Text >

FileFile

This will launch a search for NUM_TRANSACTIONSNUM_TRANSACTIONS throughout your program, and save the search results in a new persistent view

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

Page 200: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

200

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

4. Analyze each PL/I statement. If the operation would alter the value of some other variable 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: PCKA Pull down the SearchSearch Menu, and select, Text > File From the (new) Search results click: Pin the Search View

Page 201: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

201

Workshop – Data Analysis Data Analysis – continued Again analyze each PL/I statement in the pinned Search view. If the operation would alter the value of some other variable 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 PL/I variable do not modify the contents of storage, return to a previously pinned view, and double-click the next line

Page 202: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

202

Optional Workshop – Data Analysis Data Analysis – continued

You can move (Drag & Drop) the Search results views to different Workbench areas

Or you can DetachDetach the views for optimized use of "screen real estate" in your analysis

Page 203: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

203

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/XREF entries – or Using ISPF you access option 3.4, or =3.14 and issue a series of manual text

FIND operations – saving or writing down interim results. This is: Typing-intensive 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 your instructor about Rational Asset Analyzer)

Page 204: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

204

UNIT

Topics:

RDz for ISPF DevelopersRDz for ISPF Developers

The RDz Workbench – Terms and Concepts Editing PL/I Programs ISPF Prefix Area Commands Editing With Keystroke Shortcuts Find and Replace Dialog Creating New Programs From Scratch Miscellaneous Features – Hex edit, Content Assist Execution (control flow) and Data Flow Analysis Working with Copybooks and Property FilesWorking with Copybooks and Property Files Appendix – ISPF / LPEX Editor Comparison

Page 205: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

205

Final Review – "How do I" - Using RDz, be sure you know how to do the following

How do I … Change from LPEX to the ISPF editor? Save my changes when editing a program (and how do I know if I've made changes to a file)? Bring up a list of variables while typing in new PL/I statements ("code completion") Navigate to the declaration of a variable? View or edit a statement in HEX? Discover what the declaration of a variable is? See how PL/I labels are related? Replace the current version of a file I'm editing with one I saved a few hours ago? Open a file? Close a file? Split screen edit on a single program? View multiple programs and/or includes in split screen mode? Produce an outline of the business logic in my program? Go to a full-screen view of a program so that I can see more source code? Open the Context menu? Which mouse-button opens the Context menu? Change the installation default colors of my editor? Access the Find menu? Go to the top of / or bottom of file What are the commands and/or hot-keys to do this? Know what column my cursor is in, when I'm editing a program? Analyze data movement throughout variables in a PL/I program? Reset, open or switch perspectives – to access different product views for Debugging, SQL work, etc. Delete text to the end of a line (like the EOF key)? Analyze the Call structure of my PL/I program? Go directly to the declaration of a variable by pressing a PF-key (and which PF-key does this)? Reopen a View that I've closed by accident – or just generally open a View that is not currently displayed?

Page 206: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

206

Review – Answer the following (be sure you're right by trying your answer out in RDz) What does the Outline view show – and how does it work? What is a Workspace? What does Ctrl+Shift+L do inside the Editor? What is the purpose of a Property Group file? What is in the Properties view? What is the difference between the Outline and Filter views? What is in the Snippets view – and how do I open the Snippets view if it's not showing in my perspective? What does Ctrl+S do when I'm editing? What is a PL/I statement Template – and how can I customize the default Templates IBM ships? What happens when I select an HLASM reserved word and press F1 ? Just what isis a perspective? What are several ways to create a brand new PL/I program? What is a Bookmark? How do I create a bookmark and navigate to a bookmark? (how about a Task)? What's in the Context menu:

(Right-click) When I'm editing a file? (Right-click) When I've selected a file in the z/OS Projects view?

True / False: A file's extension (.pli, .inc) is not important Content Assist does not provide code completion for file FDs – when coding OPEN/CLOSE statements You can not stack ISPF commands using the RDz editor when using the ISPF profile You can only split screens vertically – you can't split them horizontally as you would with ISPF Content Assist only works with PL/I programs, in fact, RDz's language sensitive editors only work with

PL/I.

Page 207: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

®

IBM Software Group

Rational Developer for System z – Introduction Rational Developer for System z – Introduction

AppendicesAppendices

Page 208: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

208

UNIT

Topics:

RDz IntroductionRDz Introduction

• The RDz Workbench – Terms and Concepts

• Editing PL/I Programs

Appendix – Additional RDz Knowledge TransferAppendix – Additional RDz Knowledge Transfer

Appendix – Generating a User Macro file

Appendix – ISPF/LPEX Editor Comparison

Page 209: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

209

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

Page 210: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

210

UNIT

Topics:

RDz IntroductionRDz Introduction

• The RDz Workbench – Terms and Concepts

• Editing PL/I Programs

Appendix – Additional RDz Knowledge Transfer

Appendix – Generating a User Macro fileAppendix – Generating a User Macro file

Appendix – ISPF/LPEX Editor Comparison

Page 211: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

211

Generating a User Macro File

When the RDz/LPEX PL/I finds a Macro in your source file it will look to two separate ASCII XML files to resolve the reference before flagging it as a syntax error in your source: tpfhlasm.dat – stored in the directory pointed at by the Environment Variable: TPFSHARE A User Macro File – which you create/populate either manually, or by running an IBM-supplied utility –

which generates User Macro File from a PDS The steps necessary to generate a User Macro File include:

1. Discover where the RDz JAVA_HOME, RSE_HOME directories and where the generateHLAsmMacroFile.sh utility reside, within the RDz installation directories within z/OS Unix

2. Setup the necessary Path command to execute the utility3. Run the utility4. Copy the results of the utility (an ASCII-XML file) to your workstation

Page 212: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

212

Discover where JAVA_HOME and generateHLAsmMacroFile.shgenerateHLAsmMacroFile.sh resides

The easiest place to discover where the generateHLAsmMacroFile.sh is to find the z/OS Unix file named: RSED.ENVARS – which is typically found in a subdirectory of: /usr/lpp/rdz/

By opening this file (which should be read-only on your system) you can discover the JAVA and RSE directories

Page 213: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

213

In order to execute the generate the utility, you need to update your UNIX PATH (essentially a search path or "STEPLIB" construct)

The syntax of the statement is:

export PATH=/usr/lpp/java/J6.0:/usr/lpp/rdz/bin/IBM:.:$PATH

In order to execute the export statement:Launch the z/OS UNIX Shell

Enter and run the command

Export the UNIX Path and run generateHLAsmMacroFile.sh

Literal Prefix Directory Path #1 ConcatenateTo the existing Path

Directory Path #2Separator

:

Page 214: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

214

Run generateHLAsmMacroFile.sh

Once you've setup the Path you can execute the generateHLAsmMacroFile.sh

The syntax is as follows:

generateHLAsmMacroFile –filename {your filename} -macroPath {Your Macro Library/PDS} [-verbose] {generation message filename}

Working example:

generateHLAsmMacroFile.sh -fileName ./usermacro.dat -macroPath DDS0001.TEST.MACLIB -verbose > genusermacro.txt

Note – no curly braces in the actual statement

Enter using the same command shell as your PATH statement

Page 215: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

215

Open and Copy the Contents of the Generated User Macro File

If the statement on the previous slide runs successfully, it will create a file named: usermacro.dat – in your z/OS UNIX directory.

Open this file using a Text Editor Select and copy all statements

Page 216: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

216

Create a Local Workstation copy of the usermacro.dat file

After you've got the contents of the generated file copied: From a Local Workstation file (some file

resident on your PC) Create a New File

Name the file (we've defined it as usermacro.dat)

Open the new file with a Text Editor

Paste the copied text from the generated usermacro.dat file on z/OS UNIX

Save your file inserts (Ctrl+S)

Page 217: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

217

Specify the Local File for your User Macro File

Finally – specify the location of your User Macro File in two places: First – copy the filespec

Paste the copied filespec in the remote Property Group: PL/I Editor Options User Macro File Save your file (Ctrl+S)

From Preferences > LPEX Editor > System z LPEX Editor > HLASM Parser Paste the copied filespec in the

User Macro File: area Press OK to save your changes

Page 218: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

®

IBM Software Group

Appendix C - Code ReuseAppendix C - Code Reuse - Code Templates - Code Templates - Code Snippets - Code Snippets

Page 219: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

219

HLASM Editor (Customized Statement Templates) Preferences

Templates are used with Content Assist (Ctrl+Spacebar). They copy in a statement or - template construct - at your cursor's focal point and are time-saving tools.

Page 220: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

220

Workshop – Workshop – Content Assist and Template Proposals – 1 of 2 Do the following:

From Preferences > System z LPEX Editor > HLASM Parser > Templates Note a few of the default templates

Open ADA01.pli in the editor Insert a blank line Place your cursor in the line and press: Ctrl+SpacebarCtrl+Spacebar Type (slowly) e x ee x e - and

note how the list of proposals filters Select EXEC SQL

Scroll down and select

Close ADA01 – and do not save changes

Page 221: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

221

Re-open ADA01.pli in the editor Find the line shown

here in the source code

Right-click and select Add as new template…

Add the Template: Context: HLASM Name: SEND MAP Description: (anything you want)

Click OK

From Preferences, ensure that your new custom template shows up

Open CICSASM.pli – and anywhere in the source file insert a new line, and following the steps on the previous slide add the Send Map statement using Content Assist

Optional Workshop – Optional Workshop – Customized Templates – 2 of 2

Ctrl+Spacebar

Page 222: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

222

Code Snippets

Sometimes, instead of entire programs you might want to: Save some code temporarily for reuse – similar to the ISPF:

"CREATE" and "COPY" command line commands Create a Procedure, computation, complex conditional – that can

be re-purposed in other programs Provide a library "standard" routines – using your shop's coding

conventions Provide a library of syntactically-correct and infrequently

used/high-value statements: Job Cards Database routines Complex PL/I code: UNSTRING etc.

Snippets are the preferred way of doing this. You access them through a Snippets view, which you get to by: From Window > Show View > other… Type: snippets – and select the Snippets view

On the right are a group of custom Snippets that we have created. You will see a subset of these in your workspace.

Individual Snippets are contained in "drawers" which are the accordion menus that collapse/expand on-click.

Snippets can be Exported and Imported (for sharing)

Page 223: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

223

Using Code Snippets (ISPF "COPY" command line command)

To use an existing code Snippet follow the steps below:

1. Place your cursor at the exact focal point (position in the source) where you want a code snippet inserted

2. Find your Code Snippet in the snippet drawers

3. Double-Click the Snippet

4. If there are variables in the snippet, you can: Accept the defaultsAccept the defaults Over-ride the values before the code is Over-ride the values before the code is

insertedinserted

5. Click Insert

Page 224: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

224

Creating Code Snippets (ISPF "CREATE" command) – 1 of 2

To create a new code Snippet follow the steps below:1. Create a new Snippet category

Right-click over the Snippets view Select Customize From Customize Palette, under New

Select: New Category

Name the Category Add a description Click OK

2. Select and copy the code you wish to Snippet-ify 3. Expand the category you wish to add the Snippet to, and select Paste as Snippet…

Page 225: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

225

Creating Code Snippets (ISPF "CREATE" command) – 2 of 2

4. Rename the Snippet and give it a Description5. Optionally add Variables to be filled in by Snippet users (or they can accept the defaults)

Page 226: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

226

Using a Code Snippet for a Job Card

In ISPF you might use the ISPF command line COPY command to insert a Job Card into a JCL deck. Let's try this with RDz

From the \ jcl \ folder, open: BR14.jcl Select and Cut (Ctrl+X) the Job card From the Snippets view, double-click: JOB Card Enter a new JobName and a new MsgClass value Click OK and verify your work

Page 227: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

227

Code Reuse – Summary

Three methods of Code Reuse:Three methods of Code Reuse:1. Program Templates

Useful if creating a new PL/I or PL/I program using the New program wizard Can include standard (not customized) minimal CICS and SQL statements

2. Snippets Most flexible and simple method of code reuse Snippet scope can be from anywhere from a keyword to an entire program Can define any number of custom variables to manage idiosyncratic

requirements Can export/import Snippets with Workspace Can include Snippets view in custom Perspective

3. Code Templates Most granular form of code reuse Integrates with Content Assist Typically used for statements – but could extend to more code (just, the

interface is a little unwieldy)

Page 228: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

®

IBM Software Group

© 2009 IBM Corporation

Appendix 3 ISPF Appendix 3 ISPF RDz Editor Cheat Sheets RDz Editor Cheat Sheets

Page 229: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

229

RDz – z/OS Comparison Concepts and Products and TSOTSO/ISPFTSO/ISPF RDz – Integrated Development EnvironmentRDz – Integrated Development EnvironmentMainframe – z/OSMainframe – z/OS PC – Windows/LinuxPC – Windows/Linux

JCLJCL JCL. If doing offloading from z/OS. Shell scripts – on AIX machinesJCL. If doing offloading from z/OS. Shell scripts – on AIX machines

Manually analyze codeManually analyze code RDz (see slides in this PowerPoint), and RAAi - RDz (see slides in this PowerPoint), and RAAi - http://www-01.ibm.com/software/awdtools/raa/

Edit Code - ISPFEdit Code - ISPF LPEX editor. Native LPEX or ISPF profileLPEX editor. Native LPEX or ISPF profile

Compile/Compiler OptionsCompile/Compiler Options Validation, Syntax Check (Local or Remote) – Compiler options under RDz Property GroupsValidation, Syntax Check (Local or Remote) – Compiler options under RDz Property Groups

Submit JobSubmit Job Edit JCL and submit job, or just use the Context menu and SubmitEdit JCL and submit job, or just use the Context menu and Submit

Unit Test – DISPLAY/READY Trace, XpeditorUnit Test – DISPLAY/READY Trace, Xpeditor Debug Perspective – for z/OS (batch and online) applications – as well as Local PL/I projectsDebug Perspective – for z/OS (batch and online) applications – as well as Local PL/I projects

Integration Test – XpeditorIntegration Test – Xpeditor IBM Debug Tool IntegrationIBM Debug Tool Integration

QA – Regression Test - WinRunnerQA – Regression Test - WinRunner Remote Systems Testing utilizing Rational Function Tester and Rational Performance TesterRemote Systems Testing utilizing Rational Function Tester and Rational Performance Tester

ABEND-AID/IBM Fault AnalyzerABEND-AID/IBM Fault Analyzer RDz – Integrated Fault Analyzer from the IBM Problem Determination ToolsRDz – Integrated Fault Analyzer from the IBM Problem Determination Tools

File-Aid/IBM File ManagerFile-Aid/IBM File Manager RDz – Integrated File Manager from the IBM Problem Determination ToolsRDz – Integrated File Manager from the IBM Problem Determination Tools

PDS (library)PDS (library) Folders - For Remote/SCM-based Projects and Local (z/OS) ProjectsFolders - For Remote/SCM-based Projects and Local (z/OS) Projects

JESJES Remote Systems View / JES functionality Remote Systems View / JES functionality

Endevor/ChangeMan – or Your SCLMEndevor/ChangeMan – or Your SCLM 3rd Party SCMs utilize RDz's CARMA feature. RTCz and SCLM utilizing the SCLM provide their 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 RDzown RDz views. And there is Local History and source compare in native RDz

ISPF Option 0ISPF Option 0 Window, PreferencesWindow, Preferences

ISPF Option 1 and Option 2ISPF Option 1 and Option 2 RDz EditorRDz Editor

ISPF Option 3.1 (Library Utilities)ISPF Option 3.1 (Library Utilities) Remote Systems view (Context Menu options)Remote Systems view (Context Menu options)

ISPF Option 3.2 (Dataset Utilities)ISPF Option 3.2 (Dataset Utilities) Remote Systems view (Context Menu options)Remote Systems view (Context Menu options)

ISPF Option 3.3 (Move and Copy)ISPF Option 3.3 (Move and Copy) Remote Systems view (Context Menu options)Remote Systems view (Context Menu options)

ISPF Option 3.4 (DSList)ISPF Option 3.4 (DSList) Project Explorer and Filters and Context Menu in Remote Systems Explorer and LPEX EditorProject Explorer and Filters and Context Menu in Remote Systems Explorer and LPEX Editor

ISPF Option 3.8 (Outlist)ISPF Option 3.8 (Outlist) Remote Systems View – JES/My JobsRemote Systems View – JES/My Jobs

ISPF Option 3.11 ISPF Option 3.11 3.15 (Extended Search) 3.15 (Extended Search) Search menu – covered in another RDz Distance Learning moduleSearch menu – covered in another RDz Distance Learning module

ISPF Option 4 (Foreground)ISPF Option 4 (Foreground) Context Menu, Run Context Menu, Run

ISPF Option 6ISPF Option 6 TSO Command Shell – with some functional limitations (e.g. cannot issue Host Execs)TSO Command Shell – with some functional limitations (e.g. cannot issue Host Execs)

ISHELLISHELL Remote Systems Explorer - USS files/filters + Context menuRemote Systems Explorer - USS files/filters + Context menu

OMVSOMVS USS Command ShellUSS Command Shell

SPUFI/QMFSPUFI/QMF Data PerspectiveData Perspective

Page 230: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

230

RDz – ISPF Comparison Chart – PF-Keys

ISPF EditorISPF Editor LPEX EditorLPEX EditorPF 1 = Help PF 1 = Help F1, Help Menu*** See slide notesF1, Help Menu*** See slide notes

PF 2 = Split: Split the session (lets you use PF 2 = Split: Split the session (lets you use two functions of TSO at the same time.) two functions of TSO at the same time.)

Ctrl/2 or Context Menu – Open New View. Note that you can open Ctrl/2 or Context Menu – Open New View. Note that you can open an unlimited number of viewsan unlimited number of views

PF 3 = End PF 3 = End Ctrl+F4, Ctrl + 0, or close the Content AreaCtrl+F4, Ctrl + 0, or close the Content Area

PF 4 = Return PF 4 = Return Ctrl+F4, or close the Content AreaCtrl+F4, or close the Content Area

PF 5 = RFind (repeat last find ) PF 5 = RFind (repeat last find ) F5 or Ctrl/F – and /<text> from LPEX commandF5 or Ctrl/F – and /<text> from LPEX command

PF = 6 RChange (repeat lst change) PF = 6 RChange (repeat lst change) F6 or Ctrl/NF6 or Ctrl/N

PF = 7 Page Backward PF = 7 Page Backward F7 or PgUp key – or slider in windowF7 or PgUp key – or slider in window

PF = 8 Page forward PF = 8 Page forward F8 or PgDn key – or slider in windowF8 or PgDn key – or slider in window

PF = 9 Switch between screens during a split PF = 9 Switch between screens during a split session; goes with PF 2 session; goes with PF 2

Mouse – or Alt + Shift + Right/Left arrowsMouse – or Alt + Shift + Right/Left arrows

PF = 10 Page left PF = 10 Page left Ctrl+PgUp or, the Home key, or slider in windowCtrl+PgUp or, the Home key, or slider in window

PF = 11 Page right PF = 11 Page right Ctrl+PgDn or, the End key, or slider in WindowCtrl+PgDn or, the End key, or slider in Window

PF 12 Retrieve PF 12 Retrieve For LPEX commands, the Up ArrowFor LPEX commands, the Up Arrow

Use ISPF Option 0 to customize PF-KeysUse ISPF Option 0 to customize PF-Keys Use Preferences to customize and extend Function key behaviorUse 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 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)combinations, as the functionality is available from a context menu (right-mouse)

Page 231: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

231

RDz – ISPF Comparison Chart – Primary Edit CommandsISPF EditorISPF Editor LPEX EditorLPEX EditorHome key – Jump to the Command LineHome key – Jump to the Command Line Escape key – jumps to the LPEX command lineEscape key – jumps to the LPEX command line

AUTOSAVE/RECAUTOSAVE/REC Prompt for Save on exit, and Autosave (Preferences), and the asterisk – next to unsaved file Prompt for Save on exit, and Autosave (Preferences), and the asterisk – next to unsaved file namesnames

BOTtomBOTtom LPEX command:LPEX command: bottom / Ctrl+End bottom / Ctrl+End

CANcelCANcel Close Content Area w/Save no (CtrlClose Content Area w/Save no (Ctrl

CHANGE – All – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, CHANGE – All – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, WORD, PREV, [col-1] [col-2]WORD, PREV, [col-1] [col-2]

Supported using Change All, Next, PREV, Prefix and Suffix (with wildcards), Prev, Word, [col-1]Supported using Change All, Next, PREV, Prefix and Suffix (with wildcards), Prev, Word, [col-1][col-2], …or… Find/Replace menu (Ctrl+F), ISPF or the Search/Replace dialog:[col-2], …or… Find/Replace menu (Ctrl+F), ISPF or the Search/Replace dialog:

Copy Member NameCopy Member Name LPEX command: LPEX command: Get filenameGet filename

CREATECREATE Save file as…, or use Snippets ViewSave file as…, or use Snippets View

FIND – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, WORD, FIND – NEXT, CHARS, X, ALL PREFIX, FIRST, SUFFIX, LAST, WORD, PREV, [col-1] [col-2]PREV, [col-1] [col-2]

http://www.felgall.com/tso2.htm http://www.felgall.com/tso2.htm

Supported using Supported using findTextfindText, Ctrl+F, or the Search window: Find All, Next, PREV, Prefix and Suffix , Ctrl+F, or the Search window: Find All, Next, PREV, Prefix and Suffix (with wildcards), Prev, Word, [col-1][col-2], P(with wildcards), Prev, Word, [col-1][col-2], P

Not supported: First, LastNot supported: First, Last

HEX – Displays all lines in HexadecimalHEX – Displays all lines in Hexadecimal Display one individual lines in HexDisplay one individual lines in Hex

ISPF MacrosISPF Macros Not available – but can be re-written using Java for LPEX. Also, note that with the LPEX 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 necessaryfunctionality some of the Macro functionality may not be necessary

LOCATELOCATE Ctrl+L, or use the Outline ViewCtrl+L, or use the Outline View

MODELMODEL Snippets and Templates (both options)Snippets and Templates (both options)

MOVE Member NameMOVE Member Name LPEX Get command, in a different way, the Snippets ViewLPEX Get command, in a different way, the Snippets View

NUMBERNUMBER LPEX command: number std (columns 73LPEX command: number std (columns 7380), or number cob80), or number cob

PRINT – from ISPF 3.4PRINT – from ISPF 3.4 LPEX command: print, or Ctrl+PLPEX command: print, or Ctrl+P

PROFILE – are the changes made to your profile PROFILE – are the changes made to your profile PreferencesPreferences

Replace Member NameReplace Member Name Snippets functionalitySnippets functionality

RESetRESet RES command, or: Ctrl+W, or expandAll, or: action showAllRES command, or: Ctrl+W, or expandAll, or: action showAll

SaveSave Ctrl/S or LPEX: save commandCtrl/S or LPEX: save command

SortSort LPEX command: sortLPEX command: sort

STATS – updates statisticsSTATS – updates statistics Windows updates file statisticsautomaticallyWindows updates file statisticsautomatically

SUBmitSUBmit LPEX command: Submit, or edit JCL/Context Menu/Submit, or use Context Menu/Submit optionLPEX command: Submit, or edit JCL/Context Menu/Submit, or use Context Menu/Submit option

TABSTABS Set margins in Preferences, LPEX Editor, TabsSet margins in Preferences, LPEX Editor, Tabs

TOPTOP LPEX command: top / Ctrl+HomeLPEX command: top / Ctrl+Home

TSO SUBTSO SUB LPEX command: submit, and edit JCL/Context Menu/Submit, or use Context Menu/Submit optionLPEX command: submit, and edit JCL/Context Menu/Submit, or use Context Menu/Submit option

UNNUMUNNUM LPEX command: unnumLPEX command: unnum

Page 232: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

232

RDz – ISPF Comparison Chart – Find Commands – Picture Strings

ISPF EditorISPF Editor LPEX EditorLPEX EditorSimple StringSimple String YY

Previous StringPrevious String Find Previous / F5Find Previous / F5

Delimited StringDelimited String YY

Text stringText string YY

Picture Strings – special charactersPicture Strings – special characters Y – with regular expressionsY – with regular expressions

P'=' – any characterP'=' – any characterCtlr+F, Ctlr+F, Regular Expression, Regular Expression, ..

P'-' – any non-blank characterP'-' – any non-blank character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [^\s][^\s]P'.' – any non-displayable characterP'.' – any non-displayable character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [^\x20-\x7E][^\x20-\x7E]P'#' – any numeric characterP'#' – any numeric character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [0-9][0-9]P'-' – any non-numeric characterP'-' – any non-numeric character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [^0-9\x20][^0-9\x20]P'@' – any alphabetic characterP'@' – any alphabetic character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [A-Za-z][A-Za-z]P'<' – any lower-case characterP'<' – any lower-case character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [a-z][a-z]P'>' any upper-case alphabetic characterP'>' any upper-case alphabetic character Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [A-Z][A-Z]P'$' – any special character P'$' – any special character (not (not alphanumeric)alphanumeric) Ctlr+F, Ctlr+F, Regular Expression, Regular Expression, [^A-Za-z0-9][^A-Za-z0-9]

Note: for more Regular expression searches: http://en.wikipedia.org/wiki/Regular_expression

Ctrl+F

^̂ logical NOT logical NOT \ \ special Expressionspecial Expression

\x\x HexadecimalHexadecimal

. . Dot, any single Dot, any single charactercharacter

Page 233: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

233

RDz – ISPF Comparison Chart – Prefix Area CommandsISPF EditorISPF Editor LPEX Editor – ISPF ModeLPEX Editor – ISPF Mode LPEX Editor – lpex ModeLPEX Editor – lpex Mode

A, An – AfterA, An – After A, AnA, An Context menu Context menu

B, Bn – BeforeB, Bn – Before B, BnB, Bn Context menuContext menu

COLS – show columnsCOLS – show columns Columns always shownColumns always shown Columns always shownColumns always shown

C, Cn, CC – CopyC, Cn, CC – Copy C, Cn, CCC, Cn, CC Context menuContext menu

D, Dn, DDD, Dn, DD D, Dn, DDD, Dn, DD Context menu or Ctrl+BackspaceContext menu or Ctrl+Backspace

F, Fn – First (used with eXclude)F, Fn – First (used with eXclude) F, Fn (used with eXclude)F, Fn (used with eXclude) N - Find excludes lines of codeN - Find excludes lines of code

I, In – Insert linesI, In – Insert lines I, InI, In Press <Enter>, or Press <Enter>, or

LPEX command: insertLPEX command: insert

LPEX command: addLPEX command: add

L, Ln – Last (used with eXclude)L, Ln – Last (used with eXclude) N - Find excludes lines of codeN - Find excludes lines of code N - Find excludes lines of codeN - Find excludes lines of code

M, Mn, MM – MoveM, Mn, MM – Move M, Mn, MM-Move, and Context menuM, Mn, MM-Move, and Context menu Context menuContext menu

R, Rn, RR, RRn – Repeat linesR, Rn, RR, RRn – Repeat lines R, Rn, RR, RRn, and Context menu, Ctrl+DR, Rn, RR, RRn, and Context menu, Ctrl+D Context menu – or Ctrl+DContext menu – or Ctrl+D

S, Sn – Show (used with eXclude)S, Sn – Show (used with eXclude) S, Sn – Show (used with eXclude) and S, Sn – Show (used with eXclude) and FilterFilter

FilterFilter

TABS – used with TAB OnTABS – used with TAB On Set with PreferencesSet with Preferences Set with PreferencesSet with Preferences

X, Xn, XX eXcludeX, Xn, XX eXclude X, Xn, XXX, Xn, XX FilterFilter

O, On, OO – OverlayO, On, OO – Overlay O, On, OOO, On, OO Use Rectangle Copy/PasteUse Rectangle Copy/Paste

LC, UC – Lower-case/Upper-caseLC, UC – Lower-case/Upper-case LC, UCLC, UC Use the Context menuUse the Context menu

TS, TSn – Text SplitTS, TSn – Text Split Ctrl+<Enter>Ctrl+<Enter> <Enter><Enter>

<, <n, <<N Shift Data Left<, <n, <<N Shift Data Left <, <n, <<n<, <n, <<n Use Rectangle Select – shiftUse Rectangle Select – shift

>, >n, >>n Shift Data right>, >n, >>n Shift Data right >, >n, >>n>, >n, >>n Use Rectangle Select – shiftUse Rectangle Select – shift

(, (n, ((, ((N – columns left – Used (, (n, ((, ((N – columns left – Used with PL/Iwith PL/I

(, (n, ((n(, (n, ((n Use Rectangle Select – shiftUse Rectangle Select – shift

), )n, )), ))n – Columns Right), )n, )), ))n – Columns Right ), )n, ))n), )n, ))n Use Rectangle Select – shiftUse Rectangle Select – shift

Page 234: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

234

RDz – ISPF Comparison Chart – RDz – ISPF Comparison Chart – LPEXLPEX Editing Operations – 1 of 2 Editing Operations – 1 of 2LPEX EditorLPEX Editor ISPF EditorISPF EditorRefactor – Remove Noise Words: - IS, THEN, PROCEED TORefactor – Remove Noise Words: - IS, THEN, PROCEED TO N/AN/A

Multiple Line Comment/UncommentMultiple Line Comment/Uncomment N/AN/A

Virtual margins – in the editorVirtual margins – in the editor N/AN/A

Code completion (Content Assist)Code completion (Content Assist) N/AN/A

Open CopybookOpen Copybook N/AN/A

Open Declaration – of variable or PERFORM'd Procedure from anywhere in the Open Declaration – of variable or PERFORM'd Procedure from anywhere in the Procedure DivisionProcedure Division

N/AN/A

Perform HierarchyPerform Hierarchy N/AN/A

Refactor – wizard for intelligent variable name changesRefactor – wizard for intelligent variable name changes N/AN/A

Outline ViewOutline View N/AN/A

Filter View – Show only Divisions, SQL,CICS,DL/I, Code (no comments), etc.Filter View – Show only Divisions, SQL,CICS,DL/I, Code (no comments), etc. N/AN/A

PL/I, PL/I and HLASM keyword / language help PL/I, PL/I and HLASM keyword / language help N/AN/A

Show lines that have been changed during edit (before save)Show lines that have been changed during edit (before save) N/AN/A

Find and Change against multiple file typesFind and Change against multiple file types N/AN/A

Block Marking (Ctrl+Down, Ctrl+Up, Ctrl+Home, Ctrl+End)Block Marking (Ctrl+Down, Ctrl+Up, Ctrl+Home, Ctrl+End) N/AN/A

Virtual 'A' and 'B' Column lines in the source codeVirtual 'A' and 'B' Column lines in the source code N/AN/A

Allocate LikeAllocate Like N/AN/A

Remote System FiltersRemote System Filters N/AN/A

Side-by-side Compare and/or Restore from Local HistorySide-by-side Compare and/or Restore from Local History N/AN/A

Close all split screens in one operation (context menu)Close all split screens in one operation (context menu) N/AN/A

See file attributes and statistics at all times (in a View)See file attributes and statistics at all times (in a View) N/AN/A

Page 235: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

235

RDz – ISPF Comparison Chart – RDz – ISPF Comparison Chart – LPEXLPEX Editing Operations Editing OperationsLPEX EditorLPEX Editor ISPF EditorISPF EditorSee file attributes and statistics at all times (in a View)See file attributes and statistics at all times (in a View) N/AN/A

Wizard-driven approach to creating Web Services (WSDL files) from: CICS and IMS TM Wizard-driven approach to creating Web Services (WSDL files) from: CICS and IMS TM applicationsapplications

N/AN/A

Wizard-driven approach to creating, testing and deploying DB2 Stored ProceduresWizard-driven approach to creating, testing and deploying DB2 Stored Procedures N/AN/A

Copy files from one LPAR to anotherCopy files from one LPAR to another N/AN/A

Edit/Compile/Unit Test if the mainframe is offlineEdit/Compile/Unit Test if the mainframe is offline N/AN/A

Syntax error – automatically select line with problemSyntax error – automatically select line with problem N/AN/A

See 46 See 46 76 lines of source at once 76 lines of source at once N/AN/A

Templatized program developmentTemplatized program development N/AN/A

Regular expression searches – including across Filtered files of different file typesRegular expression searches – including across Filtered files of different file types N/AN/A

Keystroke recorder (useful for repetitive tasks and online testing)Keystroke recorder (useful for repetitive tasks and online testing) N/AN/A

Bookmark and Tasks (both lines of source and filtered views)Bookmark and Tasks (both lines of source and filtered views) N/AN/A

Find "Last Changed" line of source code / Ctrl+JFind "Last Changed" line of source code / Ctrl+J N/AN/A

Mark lines – including individual namesMark lines – including individual names N/AN/A

Find Marked Lines / Find named Marked LinesFind Marked Lines / Find named Marked Lines N/AN/A

Syntax errors as you typeSyntax errors as you type N/AN/A

Syntax check in the editorSyntax check in the editor N/AN/A

Page 236: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

236

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

Page 237: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

237

Optional Review Topic – RDz and Equivalent ISPF Options

ISPF Option 3for remotefiles

Additional ISPF panels as Views

ISPF Edit, View or Browse(=2 or =1)

ISPF Option 3for localfiles

ISPF 3.2

Page 238: ® IBM Software Group © January 1 st, 2013 IBM Corporation Jon Sayles RDz Technical Enablement jsayles@us.ibm.com Introduction to Rational Developer for.

238

Optional Review Topic – MoreMore RDz Workbench/Equivalent ISPF Panels

ISPF 3.8

JCL Viewed

ISPF =6