Sei sulla pagina 1di 17

Rational Developer for System z 10 little-known features tools in Rational Developer Tips and mainframe developers'for System z that

increase
productivity
RDz shortcuts, tips, and tools
Skill Level: Intermediate

Rational Developer for System z Tips and tools


Jonathan C. Gellin (jgellin@us.ibm.com) Advisory Software Engineer IBM Jeremy Flicker (jflicke@us.ibm.com) Advisory Software Engineer IBM Steven Ma (stevenma@us.ibm.com) Usability Engineer IBM William Alexander (walexand@us.ibm.com) Senior Software Engineer IBM

08 Feb 2011 Updated 08 Feb 2011 The IBM Rational Developer for System z IDE for mainframe and multiplatform development is popular for its major features, such as remote editing, remote debugging, source code management support, and web services for mainframe applications. This article describes 10 of the most useful of many lesser-known features that increase productivity for mainframe developers.

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

Trademarks Page 1 of 22

developerWorks

ibm.com/developerWorks

Introduction
IBM Rational Developer for System z (often called RDz, informally) is a powerful set of tools for mainframe application developers. It provides editing and debugging capabilities for the most widely used mainframe programming languages in both local workstation and remote host contexts. It includes tools for linking applications to databases and enabling applications for service-oriented architecture (SOA), as well as an extensible client interface to source code management systems. It is built on the Eclipse platform and takes advantage of the extensible plug-in framework. These powerful features have made RDz a popular choice among mainframe application developers. In addition to those major features, IBM Rational developers have continually added features that improve usability and boost productivity for everyday users. These are often overshadowed by the capabilities provided by the major components, and many users haven't even discovered them. We compiled this list to bring attention to 10 of the most useful of these lesser-known features.

1. Built-in Eclipse features


Mainframe application developers are characterized by their mastery of the mainframe technologies that they are working with, so RDz is sometimes the first time that they have been exposed to Eclipse-based software. It is worth taking time to 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 keys associated with them. For example, SHIFT+F10 brings up the context menu, and ALT+ENTER brings up the properties page for selected items that have properties. In addition to the preset shortcut keys, you can customize the shortcut keys to your liking: 1. 2. Go to the Preferences view by selecting the Window > Preferences menu item. Then in the tree on the left, select the General > Keys preference page (see Figure 1). On this page you can change or add keystrokes for the hundreds of actions described on this page. For example, there is no preset shortcut key for bringing up the Preferences, but you can set one on this page. Select Preferences in the command table, move your cursor to the Binding field, and type the shortcut key that you would like to use

3.

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

Trademarks Page 2 of 22

ibm.com/developerWorks

developerWorks

(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, and Left collapses a node and navigates to a parent node. Up and Down buttons navigate the tree without expanding or collapsing nodes. In addition, you can use Backspace to quickly navigate to a parent node 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
10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Copyright IBM Corporation 2011. All rights reserved. Trademarks Page 3 of 22

developerWorks

ibm.com/developerWorks

you want to avoid excessive vertical scrolling. Working with perspectives and views. In Eclipse, a perspective is simply a set of views. The views in a perspective are usually grouped logically by function. For example, the IBM z/OS Projects perspective contains the z/OS Projects view, the Remote Systems view, the Property Group Manager view, and other views by default. These are some of the views that are most helpful for developing z/OS projects. Meanwhile, the Enterprise Service Tools perspective contains the EST Project Explorer view and other views that are helpful in creating web services-related projects. The views for these two perspectives are laid out differently because of the different use patterns of typical users of those perspectives. However, you are not limited to the default perspective layouts. You can customize perspectives for optimal productivity. Simply drag one view to a different part of the workbench if you can use it more effectively somewhere else. You can use the Minimize, Maximize, and Restore buttons at the upper-right of each view to optimize screen real estate. Overlapping views in the same screen region can be hidden and shown all at once by using these buttons. Experiment a little to get the layout that works for you. In addition to arranging the layout of the perspective, you can alter the views that are present in the perspective. For example, if you are developing a program in the z/OS Projects perspective that involves a database defined in the Data perspective, you do not need to repeatedly switch between the two perspectives. You can simply add the Data Source Explorer view, the SQL Results view, and whatever other views you need to the z/OS Projects perspective. To add a view to a perspective, select a view from the Window > Show View menu (Figure 2).

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

Trademarks Page 4 of 22

ibm.com/developerWorks

developerWorks

Figure 2. The Show View menu

Fast view. Perhaps you prefer to maximize the language editor while editing source code. In this case, it is helpful to be able to access additional views without switching out of the maximized mode. For example, it is often useful to access the Outline view to quickly navigate to different locations of the open source file. To open a Fast view: 1. Type Alt+Shift+Q.

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

Trademarks Page 5 of 22

developerWorks

ibm.com/developerWorks

Figure 3. The Fast View pop-up window

1.

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

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

Trademarks Page 6 of 22

ibm.com/developerWorks

developerWorks

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 and return to the editor. Error log. When an error or warning occurs in the workbench, it gets logged in the .log file in the workspace metadata. You do not need to leave the workbench to view this data. You can simply open the Error Log view. This view also provides export and import capabilities so that you can examine old logs.

2. Retrieve Data Set and Retrieve Job

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

Trademarks Page 7 of 22

developerWorks

ibm.com/developerWorks

Starting with Rational Developer for System z Version 8.0.1, you can very quickly search for and retrieve data sets and jobs in the Remote Systems view without defining a filter. Create a filter while retrieving a data set or job
When using the Retrieve Data Set or Retrieve Job dialogs, you have 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 the context menu, and select Retrieve Data Set, or use the shortcut key CTRL+R. This will bring up the Retrieve Data Set dialog window, where you can type the name of a data 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 Retrieved Data Sets container in the Remote Systems view.

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

Trademarks Page 8 of 22

ibm.com/developerWorks

developerWorks

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 from the 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 Remote Systems view.

3. Block Selection mode's "Long Cursor"


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

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

Trademarks Page 9 of 22

developerWorks

ibm.com/developerWorks

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 the text to the right of the cursor. Also, because typing text with a long cursor will insert the characters in every row of the cursor's height, you can alter a whole block of record numbers at once.

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

Trademarks Page 10 of 22

ibm.com/developerWorks

developerWorks

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 multiple rows at a time. First, move the cursor to the starting location of the block of text you want to move. Press ALT+R to enter rectangular selection mode. Extend the selection to the height of the text you want to move. This can be done using the mouse or holding Shift and using Up or Down.

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

Trademarks Page 11 of 22

developerWorks

ibm.com/developerWorks

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 to the 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 LPEX editor 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 Host Editor useful for quickly modeling screen-based flows. However, it can be easy to make a mistake while recording in the live emulator. If you make a mistake, you do not have to scrap the flow and start over. Using the Outline view in concert with the flow recorder, you can easily remove mistakes and correct them while recording a flow. For example, in Figure 10, say the description field was extracted when the item number field
10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Copyright IBM Corporation 2011. All rights reserved. Trademarks Page 12 of 22

ibm.com/developerWorks

developerWorks

was supposed to be extracted. Using the Outline view, you can remove the mapping that represents the bad extract, and then create a new extract for the item number field, and continue recording your flow as normal. Figure 10. Fixing a mistake in the flow recorder by using the Remove Mapping action

5. Host Connection Emulator Enables Multiple Types of Sessions


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

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

Trademarks Page 13 of 22

developerWorks

ibm.com/developerWorks

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

6. Lookup view
Installation note
To use the Lookup view, the Fault Analyzer Integration feature must be installed when installing RDz.

Every mainframe application developer needs to analyze an abend from time to time. Rational Application Developer for System z makes it easy to look up abend codes 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.

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

Trademarks Page 14 of 22

ibm.com/developerWorks

developerWorks

Figure 12. The Lookup view

7. Remote z/OS Search view


You can search z/OS by selecting Search > Remote or by opening the context menu in the Remote Systems view and selecting Search ... or using the shortcut key, Cntl+H. The Remote z/OS Search allows you to define queries that will search the MVS file system, including members of PDS's across LPAR's. You can use regular expressions in your search, for example, member names matching BI.*|DI.*, or files containing CODE|DIAGNOSTIC|CD|DIAG. When you perform a remote z/OS search, the results appear in the Remote z/OS Search view. From this view you can double 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 Queries container in the Remote Systems view.

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

Trademarks Page 15 of 22

developerWorks

ibm.com/developerWorks

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 or run 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 to mainframe application developers, including COBOL, PL/I, Assembler, and JCL files.
10 little-known features in Rational Developer for System z that increase mainframe developers' productivity Copyright IBM Corporation 2011. All rights reserved. Trademarks Page 16 of 22

ibm.com/developerWorks

developerWorks

Therefore, a lot of your time might be spent in this editor. Here are some tips that will improve your productivity: Open Data Set Member From JCL - While editing a JCL file, highlight the full name of any data set member in the format data.set(member), open the context menu, and select Open Member. Match PL/I Constructs - The shortcut key CTRL+M matches language contructs when editing a PL/I file. Autosave - The System z LPEX Editor autosaves your work in an edit session to allow recovery of unsaved changes in case of a crash. Multi-view - Sometimes it is helpful to have more than one view of the same source file. CTRL+2 adds a new view to the editor, and ALT+SHIFT+RIGHT can be used to move between the views. CTRL+0 can be used to close the added view. Line Select - ALT+L selects a line of text. If you then move the cursor to another line and press ALT+L again, all the lines between the first and second selected line will be selected. Hex Edit - You can edit the hexadecimal encoding of any line of text in the System 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 field supports regular expressions features such as OR (|). LPEX Command Line - The System z LPEX Editor contains a command line that can be used to enter LPEX commands. LPEX commands are case 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 (precede with minus sign to search backward: -/text or -'text) lineNumber locates the specified line

9. RDz Host Tooling Version Level

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

Trademarks Page 17 of 22

Potrebbero piacerti anche