17
10 little-known features in Rational Developer for System z that increase mainframe developers' productivity © Copyright IBM Corporation 2011. All rights reserved. Rational Developer for System z Tips and tools

RDz shortcuts

Embed Size (px)

DESCRIPTION

RDz shortcuts explained with various optionsexamples FAqs

Citation preview

Page 1: RDz shortcuts

10 little-known features in Rational Developer forSystem z that increase mainframe developers'productivityRDz shortcuts, tips, and tools

Skill Level: Intermediate

Jonathan C. Gellin ([email protected])Advisory Software EngineerIBM

Jeremy Flicker ([email protected])Advisory Software EngineerIBM

Steven Ma ([email protected])Usability EngineerIBM

William Alexander ([email protected])Senior Software EngineerIBM

08 Feb 2011

Updated 08 Feb 2011

The IBM® Rational® Developer for System z® IDE for mainframe and multiplatformdevelopment is popular for its major features, such as remote editing, remotedebugging, source code management support, and web services for mainframeapplications. This article describes 10 of the most useful of many lesser-knownfeatures that increase productivity for mainframe developers.

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 1 of 22

Rational Developer for System z Tips and tools

Rational Developer for System z Tips and tools

Page 2: RDz shortcuts

Introduction

IBM® Rational® Developer for System z® (often called RDz, informally) is apowerful set of tools for mainframe application developers. It provides editing anddebugging capabilities for the most widely used mainframe programming languagesin both local workstation and remote host contexts. It includes tools for linkingapplications to databases and enabling applications for service-oriented architecture(SOA), as well as an extensible client interface to source code managementsystems. It is built on the Eclipse platform and takes advantage of the extensibleplug-in framework. These powerful features have made RDz a popular choiceamong mainframe application developers.

In addition to those major features, IBM Rational developers have continually addedfeatures that improve usability and boost productivity for everyday users. These areoften overshadowed by the capabilities provided by the major components, andmany users haven't even discovered them. We compiled this list to bring attention to10 of the most useful of these lesser-known features.

1. Built-in Eclipse features

Mainframe application developers are characterized by their mastery of themainframe technologies that they are working with, so RDz is sometimes the firsttime that they have been exposed to Eclipse-based software. It is worth taking timeto learn about the built-in features of Eclipse that can increase your productivity,such as these examples:

• Shortcut keys. The most common actions in Eclipse have shortcut keysassociated with them. For example, SHIFT+F10 brings up the contextmenu, and ALT+ENTER brings up the properties page for selected itemsthat have properties. In addition to the preset shortcut keys, you cancustomize the shortcut keys to your liking:

1. Go to the Preferences view by selecting the Window >Preferences menu item.

2. Then in the tree on the left, select the General > Keys preferencepage (see Figure 1). On this page you can change or addkeystrokes for the hundreds of actions described on this page. Forexample, there is no preset shortcut key for bringing up thePreferences, but you can set one on this page.

3. Select Preferences in the command table, move your cursor to theBinding field, and type the shortcut key that you would like to use

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 2 of 22

Page 3: RDz shortcuts

(for example, Cntl+F10).

From now on, the Preferences view is only a shortcut key away.

Figure 1. The Keys preference page

• Navigating tree views. In tree views such as the Remote Systems view,you can use the arrow keys on your keyboard to navigate the tree.

• Right expands a node and navigates to a child node in the tree, andLeft collapses a node and navigates to a parent node.

• Up and Down buttons navigate the tree without expanding orcollapsing nodes.

• In addition, you can use Backspace to quickly navigate to a parentnode and, eventually, to the top level without collapsing any nodes.This trick can be useful when you are "deep down" in a tree view, and

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 3 of 22

Page 4: RDz shortcuts

you want to avoid excessive vertical scrolling.

• Working with perspectives and views. In Eclipse, a perspective issimply a set of views. The views in a perspective are usually groupedlogically by function. For example, the IBM® z/OS® Projects perspectivecontains the z/OS Projects view, the Remote Systems view, the PropertyGroup Manager view, and other views by default. These are some of theviews that are most helpful for developing z/OS projects. Meanwhile, theEnterprise Service Tools perspective contains the EST Project Explorerview and other views that are helpful in creating web services-relatedprojects.The views for these two perspectives are laid out differently because ofthe different use patterns of typical users of those perspectives. However,you are not limited to the default perspective layouts. You can customizeperspectives for optimal productivity. Simply drag one view to a differentpart of the workbench if you can use it more effectively somewhere else.You can use the Minimize, Maximize, and Restore buttons at theupper-right of each view to optimize screen real estate. Overlapping viewsin the same screen region can be hidden and shown all at once by usingthese buttons. Experiment a little to get the layout that works for you.In addition to arranging the layout of the perspective, you can alter theviews that are present in the perspective. For example, if you aredeveloping a program in the z/OS Projects perspective that involves adatabase defined in the Data perspective, you do not need to repeatedlyswitch between the two perspectives. You can simply add the DataSource Explorer view, the SQL Results view, and whatever other viewsyou need to the z/OS Projects perspective. To add a view to aperspective, select a view from the Window > Show View menu (Figure2).

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 4 of 22

Page 5: RDz shortcuts

Figure 2. The Show View menu

• Fast view. Perhaps you prefer to maximize the language editor whileediting source code. In this case, it is helpful to be able to accessadditional views without switching out of the maximized mode. Forexample, it is often useful to access the Outline view to quickly navigateto different locations of the open source file. To open a Fast view:

1. Type Alt+Shift+Q.

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 5 of 22

Page 6: RDz shortcuts

Figure 3. The Fast View pop-up window

1. Type O (letter O) to display the outline, or S (the letter S) to display thesearch results. This will overlay the selected view on top of the maximizededitor, allowing you to interact with it.

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 6 of 22

Page 7: RDz shortcuts

Figure 4. The Outline view overlaid on the maximized editor

1. Select the outline element or search result that you want to navigate to.When you are finished, press the Esc key to close the Fast view andreturn to the editor.

• Error log. When an error or warning occurs in the workbench, it getslogged in the .log file in the workspace metadata. You do not need toleave the workbench to view this data. You can simply open the ErrorLog view. This view also provides export and import capabilities so thatyou can examine old logs.

2. Retrieve Data Set and Retrieve Job

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 7 of 22

Page 8: RDz shortcuts

Starting with Rational Developer for System z Version 8.0.1, you can very quicklysearch for and retrieve data sets and jobs in the Remote Systems view withoutdefining a filter.

Create a filter while retrieving a data set or jobWhen using the Retrieve Data Set or Retrieve Job dialogs, youhave the option of creating a filter for the results listed in the dialog.

To retrieve a data set, select MVS Files in the Remote Systems view, open thecontext menu, and select Retrieve Data Set, or use the shortcut key CTRL+R. Thiswill bring up the Retrieve Data Set dialog window, where you can type the name of adata set or use a pattern.

Figure 5. The Retrieve Data Set dialog

When you select a data set and press OK, the data set is added to the RetrievedData Sets container in the Remote Systems view.

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 8 of 22

Page 9: RDz shortcuts

Figure 6. The Retrieved Data Sets container in the Remote Systems view

Similarly, you can retrieve a job by selecting JES and selecting Retrieve Job fromthe context menu (or by using the shortcut key Ctrl+J) and specifying a job prefix).Jobs retrieved in this way are added to the Retrieved Jobs container in the RemoteSystems view.

3. Block Selection mode's "Long Cursor"

For column-oriented programming languages, using the Block Selection mode tocreate a long cursor can be helpful for formatting code, as well as for modifying textfor an entire column. To enable Block Selection Mode in the COBOL editor or PL/Ieditor, type Alt+Shift+A or press the Block Selection Mode toolbar button. Tomake a long cursor, use the mouse to drag a vertical selection or hold Shift and useUp or Down keys to extend the length of the cursor.

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 9 of 22

Page 10: RDz shortcuts

Figure 7. The COBOL Editor with a long cursor in Block Selection Mode

Now you can use the space and backspace keys to fine-tune the alignment of thetext to the right of the cursor. Also, because typing text with a long cursor will insertthe characters in every row of the cursor's height, you can alter a whole block ofrecord numbers at once.

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 10 of 22

Page 11: RDz shortcuts

Figure 8. The COBOL editor with modified record numbers using a long cursor

The LPEX editor has a similar function that supports moving columns from multiplerows at a time. First, move the cursor to the starting location of the block of text youwant to move. Press ALT+R to enter rectangular selection mode. Extend theselection to the height of the text you want to move. This can be done using themouse or holding Shift and using Up or Down.

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 11 of 22

Page 12: RDz shortcuts

Figure 9. The LPEX editor with a rectangular selection

Use ALT+F7 to shift the text one space to the left, and ALT+F8 to move the text tothe right. When you are finished, press ALT+U to clear the selection.

Unlike the COBOL and PL/I Editors, the rectangular selection mode of the LPEXeditor does not support typing text into multiple rows at a time.

4. Correct mistakes while recording flows

While developing CICS service flows, you may find the flow recorder in the HostEditor useful for quickly modeling screen-based flows. However, it can be easy tomake a mistake while recording in the live emulator. If you make a mistake, you donot have to scrap the flow and start over. Using the Outline view in concert with theflow recorder, you can easily remove mistakes and correct them while recording aflow.

For example, in Figure 10, say the description field was extracted when the item number field

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 12 of 22

Page 13: RDz shortcuts

was supposed to be extracted. Using the Outline view, you can remove the mappingthat represents the bad extract, and then create a new extract for the item numberfield, and continue recording your flow as normal.

Figure 10. Fixing a mistake in the flow recorder by using the Remove Mappingaction

5. Host Connection Emulator Enables Multiple Types ofSessions

The Host Connection Emulator is typically used to connect a 3270 terminal to thesystem z host using the default telnet port 23. However, the connection type, port,and other properties associated with the connection are all customizable. The HostConnection Emulator allows access to system z, AIX, Intel Linux, and zLinuxsystems via support for 3270, 5250, and VT sessions. To edit these properties, openthe Host Connection Emulator and click on the Host Properties tab.

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 13 of 22

Page 14: RDz shortcuts

Figure 11. The Host Properties tab of the Host Connection Emulator

6. Lookup view

Installation noteTo use the Lookup view, the Fault Analyzer Integration feature mustbe installed when installing RDz.

Every mainframe application developer needs to analyze an abend from time totime. Rational Application Developer for System z makes it easy to look up abendcodes using the Lookup view. In this view you can search for and read about MVS,CICS User, IMS User and Language Environment abend codes. To open this view,select Window > Show View > Other, and then, in the Show View dialog window,select Fault Analyzer > Lookup.

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 14 of 22

Page 15: RDz shortcuts

Figure 12. The Lookup view

7. Remote z/OS Search view

You can search z/OS by selecting Search > Remote or by opening the contextmenu in the Remote Systems view and selecting Search ... or using the shortcutkey, Cntl+H. The Remote z/OS Search allows you to define queries that will searchthe MVS file system, including members of PDS's across LPAR's. You can useregular expressions in your search, for example, member names matching BI.*|DI.*,or files containing CODE|DIAGNOSTIC|CD|DIAG. When you perform a remote z/OSsearch, the results appear in the Remote z/OS Search view. From this view you candouble click on a result to open the corresponding file. On the toolbar of this view,there is a button that allows you to add the search query to the My Search Queriescontainer in the Remote Systems view.

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 15 of 22

Page 16: RDz shortcuts

Figure 13. The toolbar of the Remote z/OS Search view

After the query is saved into the My Search Queries container, it can be edited orrun at any time.

Figure 14. The My Search Queries container in the Remote Systems view

8. LPEX editor tips

The System z LPEX editor is used to edit many types of files that are important tomainframe application developers, including COBOL, PL/I, Assembler, and JCL files.

developerWorks® ibm.com/developerWorks

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 16 of 22

Page 17: RDz shortcuts

Therefore, a lot of your time might be spent in this editor. Here are some tips that willimprove your productivity:

• Open Data Set Member From JCL - While editing a JCL file, highlight thefull name of any data set member in the format data.set(member), openthe context menu, and select Open Member.

• Match PL/I Constructs - The shortcut key CTRL+M matches languagecontructs when editing a PL/I file.

• Autosave - The System z LPEX Editor autosaves your work in an editsession to allow recovery of unsaved changes in case of a crash.

• Multi-view - Sometimes it is helpful to have more than one view of thesame source file. CTRL+2 adds a new view to the editor, andALT+SHIFT+RIGHT can be used to move between the views. CTRL+0can be used to close the added view.

• Line Select - ALT+L selects a line of text. If you then move the cursor toanother line and press ALT+L again, all the lines between the first andsecond selected line will be selected.

• Hex Edit - You can edit the hexadecimal encoding of any line of text in theSystem z LPEX Editor by opening the context menu and selecting Source> Hex edit line.

• Find/Replace - Use CTRL+F to show the find/replace panel. The find fieldsupports regular expressions features such as OR (|).

• LPEX Command Line - The System z LPEX Editor contains a commandline that can be used to enter LPEX commands. LPEX commands arecase sensitive. Some of the most useful commands are:

• help or ? brings up the LPEX help

• help lpex brings up the key bindings for the LPEX profile mode

• help ispf brings up the key bindings for the ISPF profile mode

• submit submits the JCL that is currently being edited

• arrow keys can be used in the command line to recall commands

• /text or 'text finds the next occurrence of the specified text (precedewith minus sign to search backward: -/text or -'text)

• lineNumber locates the specified line

9. RDz Host Tooling Version Level

ibm.com/developerWorks developerWorks®

10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Trademarks© Copyright IBM Corporation 2011. All rights reserved. Page 17 of 22