Recovery of a deleted dataset
There can be an instance when somebody unknowingly deletes your data set or by mistake you have deleted it but now you need it.
HMS takes the back up of the dataset on each night. You can check whether your data set is backed up or not with the following command. It also gives the time when it is backed up last time.
Go to COMMAND from START screen.
HLIST BCDS DSN('dsn name')e.g HLIST BCDS DSN(' T289TB.REJECT.REPORT.RSLVD.DAILY.G0002V00')
Its shows 3-4 line display which contains mainly ‘BACKDATE=06/03/02 BACKTIME=00:19:22’
So this dataset is backed up on 2nd march at midnight.
Once you are confirmed about the data set back up. You can recover this with the following command.
HRECOVER 'dsn name'e.g. HRECOVER 'T289TB.REJECT.REPORT.RSLVD.DAILY.G0002V00'
After 2-3 minutes it will say data set recovery is completed. And thus you can get the version of the data set which is backed up last time. It might not be the last saved version before deletion of the data set.