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



>Hi all,
>
>Does anyone know of a way to retrieve deleted records?  I thought
>that I read somewhere the method used to do this, but after searching
>the web and my back issues of News/400, I can't find anything.  Can
>anyone help or point me in the right direction?
>
>Thanks!
>--
>Steven Sharpe       --  steven_sharpe@bigfoot.com
>Sharpe Consulting --  sharpeconsulting@hotmail.com  -- (912) 328-9066
>       AS/400 Consulting


As I recall the technique:  When you delete a record, it is not physically
removed from your file until you reorganize the file (which removes the
deleted records).

The recovery depends on you NOT having performed a reorganize (or a CPYF
that compresses the file).

1. Save the file to a *SAVF.

2. Use an RPG program to read the *SAVF.

3. Using your knowledge of the original file's DDS, pluck out the records
from the *SAVF, and write them to a duplicate of the original PF.

You will be reading the *SAVF, record length 528 (?), and writing your
database file, reocrd length (probably) not 528.

You must buffer the input and output yourself, and keep track of where the
records are in the input stream.

There is extra information available with each record in the *SAVF: there's
a flag that indicates live or dead record.  I don't know exactly what else;
you'll have to examine the file to find out.

There was a program to do this in a back issue of one of the AS/400
magazines, but it's been at least 7-8 years ago.

--Paul E Musselman
Paulmmn@ix.netcom.com


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.