|
Bobby, >When I delete a record using SQL delete statement, can I get it back? >Is there any command to retrive back deleted record? If the file has not been reorganized, and the deleted record has not been reused because of REUSEDLT(*YES). then it is possible. There are a couple of ways of doing it. One method used by QUSRTOOL is to copy the physical file to a savf and manipulate the delete flags, then restore the savf back to the physical file. A better (and much faster) way is via a freeware tool written by Dave McKenzie. It uses MI to undelete records and works even at security levels 40 and 50. He has a separate version for CISC and RISC. The programs are available in the News/400 shareware/freeware code section. You may want to look over the other stuff too by going to www.news400.com, clicking the resources tab, then code, then shareware/freeware. Here are direct links to Dave's undelete utilities: CISC version: http://www.news400.com/sharewarefiles/undel.zip RISC version: http://www.news400.com/sharewarefiles/undelris.zip Source code: http://www.news400.com/sharewarefiles/undelsrc.zip It appears from the web page these are still the versions from a couple of years ago which do not support record formats with date, time, or timestamp fields. But Dave modified the tool to support these also. I don't have a link to the new versions. Here is the description from the News400 website: "UNDEL allows you to view, copy and un-delete deleted records in a physical file. You can interactively display active and deleted records, scan for deleted records and un-delete them. In addition, you can copy records to print or to an outfile or un-delete them without displaying them. UNDEL does not copy the file to a save file, but operates directly on the records in the physical file. This makes it very quick, even for huge physical files. Author: Dave McKenzie." Don't thank me; thank Dave... Doug +--- | 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 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.