• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Guru: Remove Unwanted Trailing Blanks With LPEX

    September 11, 2017 Ted Holt

    Giving up RDi and going back to developing with PDM and SEU would appeal to me as much as giving up electricity and running water and moving into a pup tent. RDi has so many nice features that enrich my life. However, RDi does have its quirks, and occasionally I run into one of them.

    One of the nice features is the ability to comment and uncomment blocks of code in one fell swoop. In case you’ve forgotten (or didn’t know about) those shortcuts, Ctrl+/ comments out a line or block and Ctrl+\ removes the comment markers. I recommend you reread (or read) Susan Gantner’s article Everybody Likes Shortcuts! Part 2, Playing With Blocks to refresh (or acquaint) yourself with these shortcuts and more.

    Sometimes when I attempt to comment a line or block, the LPEX editor refuses to co-operate and gives me a derogatory error message: Text limit would have been exceeded on line 9. The operation has been canceled.

    Notice that I said sometimes. When I open a member for edit, LPEX may or may not retain trailing blanks on the end of each source line. I’ve tried to find a reason for this inconsistent behavior, but so far none of my theories have survived my testing. If you know, please enlighten me. I’ve about decided it’s a bug.

    Fortunately, this is an easy problem to solve. Press the Esc key to move the cursor to the LPEX command line just below the source code. (You can also click in the command line box.) Type the word trim and press Enter. Press Esc to move back into the source code.

    Now Ctrl+/ turns the marked code or current line into a comment.

    If you want to see whether your code has trailing blanks or not, press Ctrl+A. This is how code looks with trailing blanks.

    This is how source code looks without them.

    RELATED STORY

    Everybody Likes Shortcuts! Part 2, Playing With Blocks

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags: Tags: Four Hundred Guru, IBM i, LPEX, RDi

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    As I See It: The Power Of Pizza Lack Of Available RPG Skills Not A Hard Problem To Fix

    4 thoughts on “Guru: Remove Unwanted Trailing Blanks With LPEX”

    • Greg says:
      September 11, 2017 at 10:18 am

      Fantastic tip!! I’ve always wondered why this occasionally happened.

      Reply
    • Michael Daly says:
      September 11, 2017 at 11:04 am

      I believe that records in a source physical file member that are created/edited in SEU are saved with trailing blanks. Then, when you open them in LPEX, the trailing blanks are still there. If you edit a line in a source member in LPEX, the line is saved without trailing blanks.

      Reply
    • Peder says:
      September 12, 2017 at 7:10 am

      The easiest way to do it — type a blank in the source and press CTRL+S

      Reply
      • Anson says:
        March 16, 2021 at 11:10 pm

        great tip Peder.

        Reply

    Leave a Reply Cancel reply

TFH Volume: 27 Issue: 57

This Issue Sponsored By

  • New Generation Software
  • T.L. Ashford
  • RPG & DB2 Summit
  • MAGiC
  • WorksRight Software

Table of Contents

  • The Chatter About Future Power9 Servers
  • Lack Of Available RPG Skills Not A Hard Problem To Fix
  • Guru: Remove Unwanted Trailing Blanks With LPEX
  • As I See It: The Power Of Pizza
  • IBM Flashes the Cache On External Storage

Content archive

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

Recent Posts

  • POWERUp 2025 –Your Source For IBM i 7.6 Information
  • Maxava Consulting Services Does More Than HA/DR Project Management – A Lot More
  • Guru: Creating An SQL Stored Procedure That Returns A Result Set
  • As I See It: At Any Cost
  • IBM i PTF Guide, Volume 27, Number 19
  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18

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