ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Recover deleted records

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recover deleted records

    Hello everyone. How to recover deleted records from a physical file?

  • #2
    I read many years ago (more than 10) that you can save to a savefile and then changed the deleted record flag. But I haven't come across such a requirement for a long time. Ideally, you journal the file, and you then can do many things from the journal, including the recovery of deleted records.

    Comment


    • #3
      Do you have DBU? It can reactivate deleted records.

      I have used the save file method before. It is not pretty, but it may get you by in a pinch.

      Comment


      • #4
        You could try using the UNDEL2 utility https://github.com/zs6jce/rpgle-UNDEL2

        That said, I strongly suggest you change your procedures so this sort of thing is never necesary. You can't rely on the ability to undelete a record. Use things like backups and journals to ensure that you never need to use techniques like this.

        Comment


        • #5
          Colleagues, I agree that it is a bad idea to recover deleted records directly from the file in which they were deleted. I just needed it once in testing, when the records were deleted and there was no logging for the file.
          Although I do not understand why IBM i does not have the native ability to perform such a recovery.

          Comment

          Working...
          X