How Can I un-delete a logically deleted data set?
search cancel

How Can I un-delete a logically deleted data set?


Article ID: 11280


Updated On:




You have logically deleted a data set. It is still on a tape and it is in the IPC marked as DELETED. You want to remove the DELETED label in the IPC so that the data set will be kept and can be Restored if desired.


Release: ASM2..00200-4.2-ASM2-Backup and Restore


You need to UNDELETE the data set. That is accomplished by removing the LOGICAL DELETE flag from the Status field in the IPC. You may do it through the ISPF menus or with a command. Some RSVP reports will show LDEL or DEL as the status rather than the words LOGICAL DELETE or DELETED to designate a logically deleted file.

For ISPF processing, go to the CA-ASM2 Primary Selection Menu, select option 4, the "CA-ASM2 Catalog Inquiry or Update" panel. Enter 'U' as the OPTION; enter the data set name and back version in the appropriate spaces; and put an 'X' in the bottom option in the right hand column, "Undelete an entry". There is an illustration of the "CA-ASM2 Catalog Inquiry or Update" panel in Section 1.24.3 of the System Reference Guide.

The other option is the IPC Update, or $CU, command. This is described in Section 13.2.3 of the System Reference Guide. The $CU command enables users to update certain fields in the IPC. The basic format is: $cu dsn('csg.qc.load'(-1)) type(bkup) undelete. The correct level (-n) is critical. If (-n) is omitted and the first entry in the catalog for the data set name is not a deleted entry, the un-delete will not occur.

After un-deleting, if you want to run a restore use your normal JCL but, if you usually use the UDATE parm, remove it and instead specify the data set version. The format would be:

DSN('YOURHLQ.DATA.SET.NAME '(-1)) or (-2), (-3), as appropriate.