× 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.



Rob--

If time is NOT of the essence, you can 'roll your own.'

The key is that the file in question has NOT been reorganized!

How It Works: The secret is that a deleted record is not really gone until you reorganize the file. The problem is-- how do you read them?

SAVOBJ will save the entire file-- including the deleted records. Save the file to a SAVF (save file).

Save files can be read with an RPG program. I believe the record length is 528 bytes...

When you read the SAVF, you'll read all of the data in the file-- including both deleted and not-deleted records. Your program has to do the following: Read the save file as a stream of data. Chop this data stream into chunks the length of your original file, avoiding a byte or two that are OS/400 overhead (including, IIRC, a system level delete flag). It's easy enough to figure out which records were deleted and which weren't. Write the deleted records to a copy of the original file. Then you have to pluck out the ones you want.

Of course, this isn't without its complications-- your original records are probably NOT 528 bytes (less that overhead byte or two). If less, your records will take chunks of a SAVF record until your record won't fit entirely into the SAVF record. That record will occupy parts of two SAVF records. If your record is longer than 528, you will need more than one SAVF record to find all of the pieces of your record.

That's why the tools mentioned are more convenient-- they do this record spanning for you!!

--Paul E Musselman
PaulMmn@xxxxxxxxxxxxxxxxxxxx




I have a few thousand records in a file I have to undelete.  It is not
journalled.  How does one go about this?

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.