fhg
Volume 7, Number 6 -- February 14, 2007

Be Content with Content Assist

Published: February 14, 2007

by Paul Tuohy

When you are editing a free-form RPG program or an ILE COBOL source, the RSE LPEX editor has a very nice feature called Content Assist. At first glance, Content Assist seems like a simple helpful feature but there is more to Content Assist than first meets the eye. This tech tip looks at the basic use of Content Assist, using Content Assist with subprocedures, and defining your own Templates for Content Assist.

Basic Use

Enter an operation code, keyword, or BIF followed by Ctrl+Space and the LPEX editor will display a pop-up window containing a list of valid code completions. Figure 1 shows the Content Assist for an entry of EVAL and for the %Replace BIF. Use your mouse to select the required format from the list and the code is inserted in your source--you just have to fill in the blanks.

Figure 1: Basic Content Assist. (Click here to see a larger image)

Subprocedures

But Content Assist goes beyond providing assistance with language elements. Figure 2 shows Content Assist listing all subprocedures that start with "GetHTML" and the definition of the parameters for the selected subprocedure (GetHTMLIFS in this example).

Figure 2: Content Assist and Subprocedures. (Click here to see a larger image)

You can use Content Assist to "prompt" your own subprocedures. But, you must refresh the Outline view for this feature to be available; the editor has to get the definition of the prototypes from somewhere.

Templates

You can define your own templates for Content Assist. This means that you can have Content Assist fill in "standard code" for you.

To define a template select Window --> Preferences from the menu; then expand Remote
Systems --> iSeries --> Templates to see the window shown in Figure 3. This window allows you to manage templates used by Content Assist. You can temporarily disable a template by removing the tick. You may opt to add (New…), change (Edit…) or delete (Remove…) a template. You may also opt to Import or Export templates so they can be shared among friends and family.

Figure 3: Templates. (Click here to see a larger image)

Figure 4 below shows the definition of a template containing standard code for the display and input of a screen format. You provide a unique name for the template (EXFMT_NORM), the context in which it is used (ILE RPG Free Form, ILE COBOL or CPP), a description and, of course, the content (the code you want inserted in the source member). This template uses the EXFMT operation to display and input a screen format, clears error indicators and checks for F3, F5 or F12 being pressed. The value of ${CURSOR} (those are curly brackets) indicates where the cursor is to be positioned when the code is inserted in the source member.

Figure 4: Editing a Template.

Figure 5 below shows the result of using Content Assist with an entered value of EXF (note that a complete name is not required) and selecting the EXFMT_NORM template. As required, the cursor is placed at the start of the screen format name.

Figure 5: Using a Template. (Click here to see a larger image)

That's It

Content Assist is a lot more than just a simplified help system for operation codes, keywords, and BIFs. It can also help you in using subprocedures and provide a means of implementing standard code formats.


Paul Tuohy is CEO of ComCon, an iSeries consulting company, and is one of the co-founders of System i Developer, which hosts the RPG & DB2 Summit conferences. He is an award-winning speaker who also speaks regularly at COMMON conferences, and is the author of Re-engineering RPG Legacy Applications, The Programmers Guide to iSeries Navigator, and the self-study course called iSeries Navigator for Programmers. He can be reached at paul@systemideveloper.com.



                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
PRODATA COMPUTER SERVICES

DBU - Burning Love!

 

DBU, the "original" database utility, inspires
burning love! With over 20,000 installs
of *DBU* in 31 countries, it is the
leading database utility.

 

Being without DBU has been compared to
being naked in a crowd...you don't know
what to do or which way to go!

 

Enter the DBU Challenge for
your chance to win $1,000!

 

ProData Computer Services
800.228.6318

www.DoDBU.com


Senior Technical Editor: Ted Holt
Technical Editors: Howard Arner, Joe Hertvik, Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Brian Kelly, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

Bytware:  StandGuard Network Security 3.0, the next generation of System i security
nuBridges:  Leading provider of secure FTP on the iSeries
COMMON:  Join us at the 2007 conference, April 29 – May 3, in Anaheim, California


Books on Sale at the IT Jungle Store: 30 Percent Off for 30 Days

The System i Pocket RPG & RPG IV Guide: List Price, $69.95; Sale Price, $49.00
The iSeries Pocket Database Guide: List Price, $59.00; Sale Price, $41.00
The iSeries Pocket Developers' Guide: List Price, $59.00; Sale Price, $41.00
The iSeries Pocket SQL Guide: List Price, $59.00; Sale Price, $41.00
The iSeries Pocket Query Guide: List Price, $49.00; Sale Price, $34.00
The iSeries Pocket WebFacing Primer: List Price, $39.00; Sale Price, $27.00
Migrating to WebSphere Express for iSeries: List Price, $49.00; Sale Price, $34.00
iSeries Express Web Implementer's Guide: List Price, $59.00; Sale Price, $41.00
Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95; Sale Price, $56.00
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00; Sale Price, $62.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00; Sale Price, $34.00
WebFacing Application Design and Development Guide: List Price, $55.00; Sale Price, $38.00
Can the AS/400 Survive IBM?: List Price, $49.00; Sale Price, $34.00
The All-Everything Machine: List Price, $29.95; Sale Price, $21.00
Chip Wars: List Price, $29.95; Sale Price, $21.00

 

The Four Hundred
Faster i5 595 Rumored to Be Imminent

IBM Moves OS/400 V5R3 Towards the Door, Rejiggers i5 Prices

Zend Upgrades Commercial Add-Ons for Its PHP Engine

As I See It: The Elusive Leader

The Linux Beacon
Chip Makers Strut Their Stuff at ISSCC

AMD Delivers Faster and Cooler Rev F Opteron Chips

Zend Upgrades Commercial Add-Ons for Its PHP Engine

As I See It: Measuring What Counts

Four Hundred Stuff
Lawson Brings Former Intentia ERP Suite Closer to Landmark

iSeries Web Adventures Call with iSafari

Valid Tech Assimilates Biometric Authentication Into the Enterprise

Gumbo's Dumpster Dives Into i5/OS Spool Files

Big Iron
Platform Solutions v IBM: Estoppel, Old Show Key

Top Mainframe Stories From Around the Web

Chats, Webinars, Seminars, Shows, and Other Happenings

System i PTF Guide
February 10, 2007: Volume 9, Number 6

February 3, 2007: Volume 9, Number 5

January 27, 2007: Volume 9, Number 4

January 20, 2007: Volume 9, Number 3

January 13, 2007: Volume 9, Number 2

January 6, 2007: Volume 9, Number 1

The Windows Observer
Microsoft Hits Snags in Anti-Piracy Net

AMD Delivers Faster and Cooler Rev F Opteron Chips

Microsoft Hypes the NAP, Unveils New Security Appliance

VMware, XenSource Launch Virtualization Bundles

The Unix Guardian
HP Puts Solaris on More X64 Servers, Partners for Solaris Emulation

Sun Details Server Chip Roadmaps at Analyst Summit

AMD Delivers Faster and Cooler Rev F Opteron Chips

The X Factor: One Socket to Rule Them All

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

THIS ISSUE SPONSORED BY:

ProData Computer Services
WorksRight Software
RPG & DB2 Summit



TABLE OF CONTENTS
Be Content with Content Assist

The Long and Short of Setting Up Level 40 Security

What Happened to My Backup?

Four Hundred Guru

BACK ISSUES

From the IT Jungle Forums
Julian Date file

Interesting resource and apparently free!

Alert emails from the iSeries

CL Question on Overrides

Entry parms getting overlayed--RPG





 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement