• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Be Content with Content Assist

    February 14, 2007 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

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Rocket Software

    Unlock the full potential of your data with Rocket Software. Our scalable solutions deliver AI-driven insights, seamless integration, and advanced compliance tools to transform your business. Discover how you can simplify data management, boost efficiency, and drive informed decisions.

    Learn more today.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    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

    XAware Updates Integration Software In Formation: Q&A with Infor Chairman Jim Schaper

    Leave a Reply Cancel reply

Volume 7, Number 6 -- February 14, 2007
THIS ISSUE SPONSORED BY:

ProData Computer Services
WorksRight Software
RPG & DB2 Summit

Table of Contents

  • Be Content with Content Assist
  • What Happened to My Backup?

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle