You don't even need an undelete utility. Just read the SAVF in an RPG program and write it to a physical file. You'll see the data.

Crappy RPGIII (if you can call it that) written 15 years ago...

FCBSAVF IF F 528 DISK
FCBSAVE O F 528 DISK
ICBSAVF NS
I 1 132 FLD1
I 133 264 FLD2
I 265 396 FLD3
I 397 528 FLD4
C READ CBSAVF 99
C *IN99 DOWEQ'0'
C EXCPTFIL
C READ CBSAVF 99
C END
C MOVEL'1' *INLR
OCBSAVE E FIL
O FLD1 132
O FLD2 264
O FLD3 396
O FLD4 528



----- Original Message ----- From: <rob@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Monday, February 04, 2008 11:03 AM
Subject: RE: is there a way to recover deleted records ?


Just how hard is it to try to replicate this and test yourself? Or, do
you not have one of the undelete utilities?

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"DeLong, Eric" <EDeLong@xxxxxxxxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
02/04/2008 10:59 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc

Subject
RE: is there a way to recover deleted records ?






I seem to recall a thread awhile back that revealed that SQL DELETEs
cannot be undone. As I recall, when SQL deletes a row, the record gets
initialized.

http://archive.midrange.com/rpg400-l/200706/msg00495.html

Rereading this thread, it seems the scenario was inconclusive. Anyone
know for sure?

Eric

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of PaulMmn
Sent: Sunday, February 03, 2008 12:34 PM
To: Midrange Systems Technical Discussion
Subject: Re: is there a way to recover deleted records ?


The reason you can retrieve deleted records is that when your program
"deletes" a record, the operating system merely flags that record as
"deleted." That's why DSPFD has totals for "number of records" and
"number of deleted records." Until you reorganize that file, the
deleted record count will continue to climb.

When you save the file (SAVOBJ or SAVLIB), the saved object includes
both the active records and those flagged as deleted.

Now comes the fun part!

Save the file with the deleted records to a SAVF.

You can read a SAVF in RPG. Define a file (I believe it's 528
bytes-- DSPFD for the save file and check) and use it in your program.

As you read the file, there's some header information, followed by
your data. Yes, it doesn't line up with the record boundaries, and
you've got to deal with packed and binary and date fields, but your
records are all there! You can even find the flag that the system
uses to mark deleted records.

It's left as an exercise for the student to unwind the spanned
records and copy them to a new file with the deleted records restored.

Isn't there an option when dealing with files in the IFS to tell the
transfer commands what the record length is? If so, a copy out and
back may re-align the records...

-Paul E Musselman
PaulMmn@xxxxxxxxxxxxxxxxxxxx
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





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.