How to retrieve deleted dataset / pds in mainframe

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Post Reply
User avatar
muraligaru1
Moderator
Posts: 43
Joined: Sat Nov 11, 2006 7:03 pm

How to retrieve deleted dataset / pds in mainframe

Post by muraligaru1 » Mon Mar 10, 2008 1:01 pm

Hi,

I have deleted one my development PDS.
Is there any way, i can retrieve that PDS.

Please help me.


Regards,
Murali.

User avatar
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

Post by Krishna » Mon Mar 10, 2008 2:19 pm

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.

RaviTejaG
Member
Posts: 15
Joined: Tue Apr 14, 2009 3:49 pm
Location: MYSORE

Post by RaviTejaG » Tue Apr 14, 2009 4:01 pm

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.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Apr 14, 2009 4:20 pm

Unless back-up was already taken by regular activities "TSO RECOVER" won't work.
Regards,
Anuj

RaviTejaG
Member
Posts: 15
Joined: Tue Apr 14, 2009 3:49 pm
Location: MYSORE

Post by RaviTejaG » Tue Apr 14, 2009 4:23 pm

i didn't understand what u r saying.but, what i have to do to get deleted data set ,can anyone can help

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue Apr 14, 2009 4:45 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.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Apr 14, 2009 5:01 pm

Hi,
i didn't understand what u r saying.but, what i have to do to get deleted data set ,can anyone can help
It depends on how your system is set up. I mean, You can use HRECOVER if

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 Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Apr 14, 2009 5:05 pm

And here is a link on HRECOVER--Recovering Data Sets .
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Apr 14, 2009 5:07 pm

Dick,

Are you single "thread"ed?
Regards,
Anuj

MARUDHUPANDIAN
Member
Posts: 1
Joined: Mon Feb 22, 2010 6:42 pm

Post by MARUDHUPANDIAN » Mon Feb 22, 2010 7:14 pm

HI,

Any relation between this HRECOVER and CATLG,UNCATLG ?

Also please explain me in details about what is CATLG and UNCATLG.

I just know that CATLG is an entry in system catalog but i need more and clear information for this

Thanks
Marudhu

Post Reply

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



Other References
Mainframe Tools and others