× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Can RPG extend the physical file defined with REUSEDLT(*YES) even though
deleted records exist?

Extending the file with a WRITE statement may not be doing what we think it
is. That is, using all the deleted records before extending the number of
records.

It was a surprise to me when I read this today...

      One hundred percent reuse of deleted record space is not guaranteed.
      A file full condition may be reached or the file may be extended even
      though deleted record space still exists in the file.


Here's the manuals' reference to RRN processing and deleted records...

When you update or add a record to a file by relative record number, the
record must already have a place in the member. For an update, that place
must be a valid existing record; for a new record, that place must be a
deleted record.

You can use the CL command INZPFM to initialize records for use by relative
record number. The current relative record number is placed in the RECNO
field for all retrieval operations or operations that reposition the file
(for example, SETLL, CHAIN, READ).

The INZPFM command, unfortunately requires a dedicated file or member. It
does however have a RECORDS(*DLT) option quite useful for creating even
more deleted records. Unique keyed files make the RECORDS(*DFT) option
impossible.

TIA,

Ken Slaugh (707) 795-1512 x118
Chouinard & Myhre, Inc.
CA/400 Certified Specialist
iSeries Network/MSE Administrator
http://www.cm-inc.com/



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.