The primary tool from IBM that is available in the edit, compile, and debug category is an IDE called IBM Rational Developer for i, RPG & COBOL Tools. Previous versions of this Eclipse-based IDE from IBM were known as IBM Rational Developer for Power Systems (RDP) and IBM WebSphere Development Studio Client (WDSC). The primary basic capabilities of these tools have stayed the same throughout the various versions. However, new features and functions were added through the years, including support for current language features in the editor and a graphical DDS window and report designer.
SEU and PDM to Rational Developer for i: Why change
Many IBM i developers have been using the same tool for editing, compiling, and debugging their code for decades. This tool is the “green screen”-based Application Development Tool Set (ADTS), which includes Programming Development Manager (PDM), Source Entry Utility (SEU), Screen Design Aid (SDA), and other tools.
ADTS is no longer the preferred tool for modern IBM i developers. The green screen tools have reached the limit of their capabilities and their functions have not been enhanced in many years. The last update to these tools was April 2008 when IBM i 6.1 was released. Since that time, the ADTS tool set stabilized. There are no plans to include any additional functions to these tools, including updates to the syntax verifiers for the supported languages.
The modern replacement development tools from IBM are currently based in the Rational Developer for i, an Eclipse-based IDE. Developers who are comfortable using the PDM/SEU toolset might wonder why they should change.
SEU and PDM to Rational Developer for i: Why change
Reasons to change to an IDE:
Current (and future) language support
IBM is no longer updating the older style ADTS tools for new language features. It has been many years since there was any functional enhancement to the ADTS tools. Until IBM i 6.1, IBM included support for new language features. For example, syntax checkers in the SEU editor were updated to understand new RPG keywords, operation codes, or built-in functions in each release.
The updates for new language features are no longer provided. Therefore, when using SEU to edit RPG or COBOL source, new language features for IBM i 7.1 and later are not recognized. This situation means that many of the exciting new free-form features for RPG are impossible to implement for developers using the ADTS tools. SEU users are already missing editor support for features such as the %ScanRpl (scan and replace) built-in function, RPG Open Access Handlers, and handling stored procedure result sets. Only the Rational Developer for i tool provides the latest in language support, both now and in future releases.
Eclipse-based development environment
The Rational Developer tools are based on Eclipse, an open source development environment for many languages on many different platforms. The Eclipse base provides many advantages to IBM i developers:
The same skill set that you use when you develop for RPG or COBOL applications on IBM i can be used in many other environments because such a wide variety of tools are Eclipse-based. When you are developing web pages, writing or using code that is written in PHP or Java, or when you access many database-oriented tools, you can use many of the same techniques and skills. Because there are many tools that are based on the same core, you get predictability when you need to use these tools.
Many plug-ins are available for Eclipse because it is so widely used, which means that you do not need to rely only on IBM to supply all the new functions that you might want or need. Someone else might have already written the function you wan and made it available publicly. Some of these plug-ins might be specific to the IBM i platform. Examples of these include RPG /Free source conversions, 5250 emulators, message file editors, and other useful tools. There are additional plug-ins that are not specifically written for an IBM i environment but can still be useful, including many database-oriented tools. Often, these tools are available either for no cost or at a low cost.
Productivity features of Rational Developer for i
Perhaps the most important reason to switch from PDM/SEU to Rational Developer for i is the dramatic productivity gain that the more advanced tools offer. It would require a whole book to produce a full list of productivity features that Rational Developer for i offers over the PDM and SEU tools.
The following section highlights some of the most obvious productivity features of the Rational Developer for i source code editor specifically, along with some tools that are closely integrated with the editor that are designed to support the editing process.
Rational Developer for i graphical debugger
The Rational Developer for i debugger can monitor the values of selected variables while stepping through the code or stopping at breakpoints. The debugger also can contain both active (enabled) and inactive (disabled) breakpoints. This feature is valuable because the debugger can also remember breakpoints across multiple debug sessions if a problematic bug requires several days to correct.
An example of the Rational Developer for i debugger in action is shown below. This screen capture illustrates several features of the Rational Developer for i debugger. The Monitors view (upper right pane) shows variable values that were chosen to be watched throughout the debugging session. Values that have changed since the last step or breakpoint appear in red. Other variable values can be shown by hovering over a variable to show its current value, as illustrated. Breakpoints are shown with a mark to the left of the statement number.
In addition to the debugger, the DDS designer can make maintaining or creating reports or screens easier. The graphical DDS designer is the same tool for both reports and screens, unlike the SDA and RLU tools in the older ADTS toolset. The designer makes it far easier to move fields and text around and to center or align items. Fields from database files or tables can be chosen from a list and dropped in to the window to create database reference fields. It is simple to switch between graphical design mode and direct editing of the DDS for those occasions where the direct edit approach is more productive.
Below is an example of how the DDS design tool in Rational Developer for i works. This example shows a display file, but the interface for printer files is similar. The design pane in the center allows the developer to move or change the length of any items in the window by using drag or stretching. The Properties pane below the design
window allows all the properties of the selected item (PRODCODE in this example) to be viewed and edited, including keywords and indicator conditioning (using other tabs in the properties window.) The Palette to the right of the design pane allows new items to be placed in the window by drag and drop. The Outline pane (lower left pane) shows details of the items in the window, including many keywords, and can also be used to select items in the design pane. At the bottom of the design window are three tabs, one of which (Source) allows the
DDS source to be edited directly.
There are other tools in Rational Developer for i, most notably iProjects, that support working in a disconnected environment. iProjects can also be used to help organize development work into local projects that are stored either on the workstation disk or on IBM i or another server. iProjects is also used with some source change management tools.
Rational Developer for i editor productivity highlights
Because most developers spend more of their time viewing, navigating, and editing source code, the productivity benefits of the Rational Developer for i editor deserve a more detailed look. The editor contains many features to enhance programming productivity. In addition to the editor itself, there are tools, such as the Outline and Error Feedback views, that are designed to work closely with the editor to further enhance productivity. This section highlights a few of the most valuable productivity features of the editor:
More code visible at a time
When editing source code, a developer can typically see 2 - 3 times the number of lines of code compared to the older SEU editor. When using SEU, the number of lines visible is fixed, regardless of the size of monitor used. With the Rational Developer for i editor, the number of source lines visible varies based on the monitor size and shape and the font size selected. Seeing more code makes it easier and faster to follow the flow of logic.
Multiple source members open at once
Multiple source members can be open for edit (and browsing) at the same time. This ability becomes more important as modern applications become more modular. It is simple to click between the open members as the logic flows between modules. Two or more members can be seen simultaneously through one or more horizontal and vertical split screen lines. Even when in split screen mode, all members can be open for edit.
Filtering of source code
Source code lines can be filtered in the Rational Developer for i editor in many ways. If there are many commented-out lines of code in a source member, choose to filter to see code only. This removes all the commented lines from your view, giving even more lines of code that are visible to the developer. Lines may also be filtered by the last change date on the line, which can be helpful when you look for recent changes to code that might have caused recent bugs within the application. Other filter options include showing only SQL statements, showing only subroutines or subprocedures, and showing only control flow logic statements. In addition, some text, for example, a field name, can be selected and then the code can be filtered on that selection. This shows only the lines of code referring to that field in the editor.
Outline view for definitions, cross-reference, and source navigation
A program Outline view is available to help you with navigation through the source code. The outline of an RPG IV program includes details of every file declared, including all record formats and all fields and their definitions. Details of all program-defined variables
and data structures are also included. Both program-described and externally described variables appear in a list that can be sorted alphabetically by field name, which means that you quickly can find the field definition that is needed. Even without using the Outline view, the Rational Developer for i editor shows the definition of a variable when you hover the mouse over its name. So, you do not need to use a Display File Field Definitions (DSPFFD) or some other method on the host to find the definition of a field.
In addition to data definitions, the RPG IV Outline contains all subroutines, subprocedures, and prototypes that are defined in the source member.
The Outline is integrated with the editor, which means that a developer can navigate directly to the place in the program where a variable or subroutine or other item is defined or coded. In addition, there is a cross-reference in the Outline showing where each item is referenced in the source member; those cross-reference lines are also connected to the editor. So, for example, a developer can easily navigate not only to a specific subroutine using the Outline, but they can also navigate directly to every line of code in the member that calls the subroutine. The cross-reference information for fields indicates whether the field is modified at that statement by placing an (M) after the statement number. The Outline view is automatically updated as you edit code in the edit view. These two views are tightly tied together.
This image shows the Outline to the right of the code in the editor. Details of every line of code that references the fullDate variable, along with the definition of fullDate, is shown. Two of the statements referencing fullDate modify the value while one of them only references it. One of the references is selected in the Outline, which automatically
positioned the editor to that line of code.
Undo and Redo
During an edit session, a developer has unlimited levels of both undo and redo of individual changes, even after a save and compile, while the source member is still open in
the editor. This means that you can open a file, make changes, save, and then compile and do this sequence multiple times and still “undo” individual changes all the way back to when you opened that file. In the SEU editor, the only option to undo changes is to undo all the changes in the entire editing session by closing the editor without saving the member.
Tab keys work in column-sensitive languages
For some column-sensitive languages, the tab keys work without the need for prompting. The tab positions can be customized to the developer's preferences. A format line appearing at the top of the editor window indicates the current position of the cursor on the line. Unlike the format line in SEU, which always reflects the format of the first statement on the panel, the Rational Developer for i editor changes the format line to match the statement where the cursor is positioned. This makes it much faster to enter code that is still in fixed-format RPG and DDS code.
Error feedback that is integrated with the editor
Errors that occur during a compile appear in an Error list that is adjacent to the source editor. Double-clicking an error in the list positions you at the line of code in the editor where the error was found and places the error messages in the source. Developers never need to look at a separate spool file compile listings to find and fix compile-time errors in their code. Source members that are edited in Rational Developer for i are typically compiled without closing the source member to enable faster reaction to any compile-time errors
Here is an image of a compile attempt resulted in several errors. At the time of this screen capture, the developer double-clicked one of the errors and the editor was automatically positioned at the line of code for that error.
The integration of the error feedback with the editor is considerably faster than any mechanism that involves browsing of a spooled file compile listing to find lines of code in error.
This is a sample of some of the key productivity enhancements. As you start to use and learn this tool, you find your own favorite productivity enhancements.