|
|
Presented by:

Performance Navigator(R) - performance management, problem determination, capacity planning in one convenient, Windows-based package.
One aspect of IBM WebSphere Development Studio Client (WDSC) that’s vital to your System i shop is fast and efficient RPG coding. In this article, I’ll share tips that keep me coding RPG faster than you can say, “When will this presidential election be over and done with?” Watch for more tips in the April issue of IBM Systems Magazine, Business Systems edition.
My absolute favorite feature of WDSC is that I can see more than 19 lines of code, which is what SEU displays. Using an optimized font of Lucida Console at point size 8 lets me display 79 lines of code – a beautiful thing. But even then, sometimes it still isn't enough to see what I want on a single screen. Usually I need to go back and forth between an area in the D-specs and some business-logic code, and I hate scrolling to do that.
An alternative to scrolling repeatedly is to use the SEU exclude block characters (i.e. XX) to hide a chunk of code. We’ve had this capability for many years in SEU, so what's the big deal? The coolness comes with WDSC's capability to easily expand and collapse that section of hidden code by placing a plus sign to the left of the sequence numbers as shown in the after image of Figure 1. To create a collapseable section simply place a double X on the beginning and end of the code section and hit Enter. Expand it by clicking the plus sign. To remove all expandable sections, select Ctrl+F5. To remove a specific expandable section, use the SL SEU command. After typing SL, you also need to type the number of lines you’d like to remove from the expandable section (for me, usually the full amount). So if 30 lines were in the expandable section, typing SL30 would take them out of section mode.
Expandable sections are also enabled when you right-click anywhere in an RPG source member and select Filter view>Comments (or any of the other options from within Filter view) as shown in Figure 2.
One of the neat things subprocedures brought to RPG is the capability to locally define variables. This is great because defining all variables at the top (i.e. global level) of my program can cause a headache in narrowing down where and how a particular variable is utilized. Regardless of how your code is organized, when confronted with a large piece of RPG code, it’s useful to see every instance where a variable is used so you can more easily navigate. WDSC has such a feature that I’ll call Variable Where Used. Simply select a variable in any part of the code, right-click it and click Selected>Filter selection. Figure 3 shows the results. Note the plus signs off to the far left. Expand these to see the code immediately following the line where the variable was found. To revert back to regular source viewing, select Ctrl+W (Show All).
Page 1 2
Browse products and services for Developer.