NEWS/400 Magazine, February 2001

Section
Programming

Article Type
Demo Booth

Title
SEU Next Generation:
RPG Alive 2000

Author
Alexander Roytman

Table of Contents
Profound Logic Software's RPG analysis tool provides realtime editing capabilities within your native AS/400 or iSeries 400 SEU.

Figures
Figure 1: SEU screen displaying dynamic outline

Figure 2: Inserting a new line of code into a source member

Figure 3: Completing a subroutine name

Figure 4: Live outline of RPG and CL members

Topics
Application Development
RPG
Utilities

Vendor
Profound Logic Software, Inc.
http://www.rpgalive.com
phone: (937) 439-7925
fax: (603) 849-7757

SEU Next Generation: RPG Alive 2000


Most AS/400 and iSeries 400 shops today use SEU for editing source code, and although it's not fancy, it does the job. Considering the limitations of the 5250 character-based interface, SEU is a great tool. Yet without the restrictions of a character-based environment, SEU can be a lot more sophisticated. RPG Alive 2000 removes most of these restrictions. With RPG Alive, programmers can enjoy advanced editing features within native AS/400 and iSeries SEU.

RPG Alive 2000 adds visual elements directly into SEU and seamlessly blends with SEU to provide an array of advanced visual features. In essence, RPG Alive 2000 morphs SEU into a sophisticated development environment with realtime capabilities such as auto-completion keywords, RPG and CL source outlining, context-sensitive help, and many other features you'd generally expect from a language-specific editor.

Once you install RPG Alive (which takes about a minute), it simply becomes part of the system. You don't need to run special commands, download source members, learn new techniques, or even activate the program. You simply continue to use your AS/400 or iSeries 400 as always, and RPG Alive 2000 activates itself automatically when you start any SEU or debug session.

Why RPG Alive?

RPG Alive uses a unique approach, with some fundamental differences compared with other PC-based RPG source editing solutions. RPG Alive 2000 doesn't provide an alternative environment to editing RPG but builds on existing system architecture. Because of the product's inherent functionality, your AS/400 and iSeries 400 development procedures won't go through a significant change. Although RPG Alive offers some very powerful features, the backbone editor is still SEU, so there's virtually no learning curve. Using the product, you can avoid synchronizing source code with an external environment.

RPG Alive 2000 works with RPG/400, ILE RPG, CL, and DDS source types. As you edit source code in SEU, useful hints automatically appear on your screen to help you with coding. For instance, when you edit RPG code, RPG Alive delineates the necessary entry fields, depending on the context of the source line on which you're working. Thus, on C-spec lines, the product highlights the fields required for a particular opcode. Similarly, for D-spec lines, it highlights the necessary fields based on declaration type. RPG Alive delineates other line types in the same fashion and positions your cursor on the highlighted fields, so you can avoid using the arrow keys to manually position your cursor under the appropriate column.

Taking advantage of RPG Alive's realtime capabilities, developers can work with RPG syntax and perform code analysis nonintrusively. The product automatically matches RPG language structures (e.g., IF, ELSE, ENDIF statements) with color-coded lines. The outline represents the high-level design of a program. RPG Alive 2000 not only helps you write and edit RPG code, but it also helps you read the code. Reading and comprehending source, whether familiar or unfamiliar, is simple with RPG Alive. For example, DO-ENDDO loops appear in magenta to set them apart from the IF-ELSE-ENDIF condition statements, which are outlined in cyan.

The color-coding goes beyond matching RPG language structures. RPG Alive also provides numerous other symbols to help you read code. For example, the product indicates ITER and LEAVE statements with magenta arrows, which illustrate that the program execution sequence will skip to the beginning or end of a DO-ENDDO loop. RPG Alive also includes horizontal lines to set apart subroutines and procedures; arrows to mark CALL, EXSR, and GOTO statements; and highlighted program comments.

Let's Get Technical: A Quick RPG Alive Tour

To demonstrate the basic capabilities of RPG Alive 2000, let's look at a simple ILE RPG program (Figure 1). We'll modify several lines of code within this program to see how RPG Alive can simplify the task. Unlike most other tools, RPG Alive 2000 doesn't require any preprocessing before the product can work with source code. Once you install RPG Alive 2000, it will minimize into your system tray and be ready to analyze any source as soon as you enter SEU.

Figure 1 shows we've entered SEU in edit mode and paged down through the source member. You'll notice that a dynamic outline, along with other helpful symbols, is automatically displayed. All IF, DO, FOR, SELECT, and CASE statements connect with their respective ENDs through color-coded lines, which dynamically adjust as code is modified. You'll also notice a help window, which you can access by simply pressing Ctrl-F1.

When you begin modifying any line of code, a detailed interactive RPG prompt appears. This prompt eliminates having to manually prompt the line with F4. Another advantage of using the interactive prompt over the SEU F4 prompt is that the resulting interface shows only fields that are relevant to the operation on which you are working. For example, the only relevant fields for a CHAIN operation are the operation code itself and Factor 1, Factor 2, and the HI and LO indicators; thus, the Result field and the EQ indicator won't be displayed. RPG Alive's interactive prompt also color codes each field to let programmers know whether the field is required or optional. Furthermore, RPG Alive provides a set of easy-to-use function keys that lets programmers navigate through the fields of the interactive prompt. For example, follow the illustration in Figure 2, where we insert a new line of code into our source member.

With RPG Alive's auto-complete and syntax delineation features, you can code in RPG, even if you're not completely familiar with a particular RPG operation's syntax. The auto-complete feature not only completes operations and keywords that are internal to the RPG programming language, but it also completes words that are relevant only in the source member on which you're working. For example, you may complete a subroutine name or a procedure name, as Figure 3 shows. After you type only the first few letters of the subroutine name, RPG Alive can complete the full name based on the BEGSR statement located within your source member.

RPG Alive is triggered automatically whenever you work with AS/400 and iSeries 400 programs, whether you're browsing, editing, debugging, or performing a combination of these tasks. When you split the screen in your SEU session, RPG Alive will enhance both halves of the screen as separate entities. For example, both the RPG member and the CL member in Figure 4 are enhanced with a Live outline.

The Bottom Line

RPG Alive 2000 unlocks a new model for editing source on the AS/400 and iSeries 400. It provides powerful realtime editing features by building on the environment you've used for years. With RPG Alive, you can improve the speed and quality of application development without undergoing a lengthy learning curve and without significant setup time.