MVS takes backup of files/datasets, every time they are changed.
Also it keeps backup of these changed versions. So, at any point
of time we can recover deleted datasets as well as its previous versions.

Steps to be followed to recover a PDS.

1) Type 'TSO HLIST DS('dataset name') BCDS'
2) Press Enter, you will get the information of the backups taken by HSM.
3) You can recover the datasets using the following command:-

TSO HRECOVER 'dataset name' GEN(gen-number) NEWNAME(NEW-DATASET-NAME)

Where dataset name is the dataset you want to recover, gen-number
can be 000, 001 and 002 depending on the backups you want to recover
(000 being the latest) and NEW-DATASET-NAME is the name of dataset
you want to create.

Above applies only to generation ( old versions ).
For lastest version use following command

TSO HRECOVER 'Deleted dataset name'

Note : The installation would have to define an SMS Management Class with the
autobackup attribute, and a dataset would have to be associated (implicitly or explicitly) with such a management class in order to be eligible for autobackup.

do you use xpeditor? and are the DDIO files automatically updated via the normal compile jcl?

if so, you can print (to sysout) the listings from ddio files, then edit the source removing pre-compiler actions and restore your original source listings. I wrote rexx scripts to massage the ddio output to restore each member to original source format.

OR

do you have a compile listing dataset? parse these, if they exist.

for future reference

do you use ISPF option 3.4 to edit your pds?
have you deactivated the 'do you want to delete' prompt?
which could have saved you, had you accidentally entered a 'D' instead of 'E' on the 3.4 display.

Suggest you start using ISPF option 2, to edit your pds.
Fortunately option 2 does not have a 'delete dataset' facility.

if this was not the case, pardon me for my assumption.

anyway, just one more reason for management to provide a repository.

Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.