• 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
    DRV Tech

    Get More Out of Your IBM i

    With soaring costs, operational data is more critical than ever. IBM shops need faster, easier ways to distribute IBM applications-based data to users more efficiently, no matter where they are.

    The Problem:

    For Users, IBM Data Can Be Difficult to Get To

    IBM Applications generate reports as spooled files, originally designed to be printed. Often those reports are packed together with so much data it makes them difficult to read. Add to that hardcopy is a pain to distribute. User-friendly formats like Excel and PDF are better, offering sorting, searching, and easy portability but getting IBM reports into these formats can be tricky without the right tools.

    The Solution:

    IBM i Reports can easily be converted to easy to read and share formats like Excel and PDF and Delivered by Email

    Converting IBM i, iSeries, and AS400 reports into Excel and PDF is now a lot easier with SpoolFlex software by DRV Tech.  If you or your users are still doing this manually, think how much time is wasted dragging and reformatting to make a report readable. How much time would be saved if they were automatically formatted correctly and delivered to one or multiple recipients.

    SpoolFlex converts spooled files to Excel and PDF, automatically emailing them, and saving copies to network shared folders. SpoolFlex converts complex reports to Excel, removing unwanted headers, splitting large reports out for individual recipients, and delivering to users whether they are at the office or working from home.

    Watch our 2-minute video and see DRV’s powerful SpoolFlex software can solve your file conversion challenges.

    Watch Video

    DRV Tech

    www.drvtech.com

    866.378.3366

    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

  • The Turning Point For Power Systems Is Here, And Now
  • How IBM i Users Can Compete In The Digital Era With Composable Commerce
  • IBM Streamlines Data Migration With New Partition Mirror Tech
  • Profound Logic Adds MCP To IBM i AI Tool
  • IBM i PTF Guide, Volume 27, Number 29
  • Power11 Entry Machines: The Power S1124 And Power L1124
  • BRMS Isn’t The Only Backup Product With A Security Problem
  • Guru: A Faster Way To Sign A JWT
  • Maxis Adds IBM i Support To Database Modernization Tool
  • IBM i PTF Guide, Volume 27, Number 28

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