• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Reuse Deleted Records? *YES!

    September 12, 2007 Hey, Ted

    How does the iSeries find a space to insert a new record over a deleted record when REUSEDLT(*YES) is specified for a file? An associate says that the file is scanned sequentially for a deleted record when writing a new record to the file and as a result there is a significant performance penalty.

    –Millard

    I sent your question to Kent Milligan of IBM. According to him, “A table scan is not performed. A bitmap-like structure is used to identify available deleted rows within the table.”

    So, Millard, there are no performance-related reasons not to reuse deleted records. This topic reminds me of email I got in response to another article, “Alternatives to Clear Physical File Member.”

    Hey, Ted:
    Is there any reason you didn’t suggest having the file reuse deleted records instead of having to clear it nightly?
    –Jim

    Hey, Ted:
    I suggest the reader set the file to reuse deleted records.

    CHGPF REUSEDLT(*YES)
    

    Then the file won’t have to be cleared or reorganized at all, and thus won’t need to be cleared or reorganized, unless one day there are a huge number of transactions and disk space is at a premium. That’s not a likely problem to have, since disk is cheap. Just add and delete, and the system, as usual, takes care of itself.
    Regards, Hawk

    To answer Jim’s question, I know there’s a lot of old code out that that precedes REUSELDT(*YES), so I just didn’t think of it when I was writing it up.

    Devoted reader Vern also had a good suggestion. He wrote:

    SQL’s DELETE FROM LIB/FILE gets rid of everything. I’m not sure whether it requires the exclusive lock of CLRPFM.
    –Vern

    I gave it a quick test. While one job was displaying a file through the RUNQRY command, I tried CLRPFM from a second job. No good. Then I cranked up SQL in the second job and ran the DELETE command. That worked. However, the two functions are not identical. After CLRPFM completes, the file is empty and there are no deleted records. After DELETE, the file is empty, but there are deleted records.

    As usual, multiple methods exist for removing the outer covering of a feline animal. And it appears that the only time it’s not appropriate to reuse deleted records is when arrival sequence has some meaning.

    Thanks to Kent Milligan for answering Millard’s question.

    –Ted



                         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
    VISUAL LANSA 16 WEBINAR

    Trying to balance stability and agility in your IBM i environment?

    Join this webinar and explore Visual LANSA 16 – our enhanced professional low-code platform designed to help organizations running on IBM i evolve seamlessly for what’s next.

    🎙️VISUAL LANSA 16 WEBINAR

    Break Monolithic IBM i Applications and Unlock New Value

    Explore modernization without rewriting. Decouple monolithic applications and extend their value through integration with modern services, web frameworks, and cloud technologies.

    🗓️ July 10, 2025

    ⏰ 9 AM – 10 AM CDT (4 PM to 5 PM CEST)

    See the webinar schedule in your time zone

    Register to join the webinar now

    What to Expect

    • Get to know Visual LANSA 16, its core features, latest enhancements, and use cases
    • Understand how you can transition to a MACH-aligned architecture to enable faster innovation
    • Discover native REST APIs, WebView2 support, cloud-ready Azure licensing, and more to help transform and scale your IBM i applications

    Read more about V16 here.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    HiT Software:  DBMoto performs real-time as well as snapshot data replication
    COMMON:  Join us at the annual 2008 conference, March 30 - April 3, in Nashville, Tennessee
    NowWhatJobs.net:  NowWhatJobs.net is the resource for job transitions after age 40

    IT Jungle Store Top Book Picks

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

    IBM Spreads the developerWorks Love Through New ‘Gizmos’ EGL: The Future of Programming for the System i?

    Leave a Reply Cancel reply

Volume 7, Number 31 -- September 12, 2007
THIS ISSUE SPONSORED BY:

WorksRight Software
Help/Systems
Twin Data

Table of Contents

  • Reuse Deleted Records? *YES!
  • Accessing File Member Timestamps from a .NET C# Program
  • Admin Alert: A Primer for Changing Your i5/OS Startup Program
  • PHP: An Easy Yet Powerful Language Syntax
  • I Want My F15 Back!
  • Admin Alert: Magical & Mysterious iSeries Access CWB Programs

Content archive

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

Recent Posts

  • With Power11, Power Systems “Go To Eleven”
  • With Subscription Price, IBM i P20 And P30 Tiers Get Bigger Bundles
  • Izzi Buys CNX, Eyes Valence Port To System Z
  • IBM i Shops “Attacking” Security Concerns, Study Shows
  • IBM i PTF Guide, Volume 27, Number 26
  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25

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