How to retrieve deleted dataset / pds in mainframe
Moderators: Veera, Moderator Group
- muraligaru1
- Moderator
- Posts: 43
- Joined: Sat Nov 11, 2006 7:03 pm
How to retrieve deleted dataset / pds in mainframe
Hi,
I have deleted one my development PDS.
Is there any way, i can retrieve that PDS.
Please help me.
Regards,
Murali.
I have deleted one my development PDS.
Is there any way, i can retrieve that PDS.
Please help me.
Regards,
Murali.
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.
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.
Regards,
Krishna
Facebook --> http://www.facebook.com/mainframegurukul
Connect with RAMESH KRISHNA REDDY --> http://www.linkedin.com/in/rameshkrishnareddy
Twitter --> https://twitter.com/mainframegurkul
http://www.mainframetutorials.com
Krishna
Facebook --> http://www.facebook.com/mainframegurukul
Connect with RAMESH KRISHNA REDDY --> http://www.linkedin.com/in/rameshkrishnareddy
Twitter --> https://twitter.com/mainframegurkul
http://www.mainframetutorials.com
Hi krishna ,
I tried your solution that u gave,but i didnt understand where to type that command .after i enter into tso first i type 'P' Option ,Then 6 Option which is COMMAND ther i type command u specified ,but iam getting some error shown below,
ARC0814I LIST PROCESSING TERMINATION EARLY,RC=02
ARC0143I LISTCOMPLETED 0 Lines of Data Output
plz help me , if possible show me screen shots of those where to type the commads ,etc.
I tried your solution that u gave,but i didnt understand where to type that command .after i enter into tso first i type 'P' Option ,Then 6 Option which is COMMAND ther i type command u specified ,but iam getting some error shown below,
ARC0814I LIST PROCESSING TERMINATION EARLY,RC=02
ARC0143I LISTCOMPLETED 0 Lines of Data Output
plz help me , if possible show me screen shots of those where to type the commads ,etc.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
- dbzTHEdinosauer
- Moderator
- Posts: 981
- Joined: Mon Oct 02, 2006 8:31 pm
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.
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.
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
Hi,
a) HSM is installed and active
b) HSM has a valid backup version to recover from
Ask your storage mangement people if there are backups of the data or volumes.
It depends on how your system is set up. I mean, You can use HRECOVER ifi didn't understand what u r saying.but, what i have to do to get deleted data set ,can anyone can help
a) HSM is installed and active
b) HSM has a valid backup version to recover from
Ask your storage mangement people if there are backups of the data or volumes.
Regards,
Anuj
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Member
- Posts: 1
- Joined: Mon Feb 22, 2010 6:42 pm
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page