Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to recover an uncataloged VSAM data set

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
archanamuthukrishnan

New User


Joined: 12 Oct 2016
Posts: 5
Location: India

PostPosted: Wed Jan 11, 2017 6:18 pm    Post subject: how to recover an uncataloged VSAM data set
Reply with quote

Hi,

I renamed VSAM CSI DS using IDCAMS

//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALTER -
SYSU.TEST.V1.CSI -
NEWNAME(SYS1.TEST.V1.CSI)

/*

The DS name got renamed but it is not catalogued, I couldn't find the DS anywhere.

Is there any possible to recover the uncatalogued VSAM DS?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8086
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jan 11, 2017 7:28 pm    Post subject: Reply to: how to recover an uncataloged VSAM data set
Reply with quote

Are the SYSU and SYS1 high level qualifiers in the same catalog? If not, then you could have attempts to locate the data set going to the SYS1 catalog and failing to locate the data set because ALTER NEWNAME on a VSAM non-SMS data set will keep the entry in the source catalog (which would be the SYSU catalog). Assuming you knew to check in advance which volume the data set was on, go to ISPF 3.4 and look on that volume instead of going through the catalog. If the data set is there with the new HLQ, then you'll need to uncatalog the old name and catalog the new name to get the catalog back in sync.

Issues like this are why the response on this forum so often is to contact your site support group -- they know about the catalog structure for your site.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8086
Location: East Dubuque, Illinois, USA

PostPosted: Wed Jan 11, 2017 7:59 pm    Post subject: Reply to: how to recover an uncataloged VSAM data set
Reply with quote

Actually, thinking more about it -- you have one option. If you do the uncatalog, you'll wipe out the VVDS entry. You need to do an ALTER NEWNAME(SYSU...) to get the catalog back in sync. Then use ISMF or DFDSS or EXPORT / IMPORT (IDCAMS commands) to move the data set and update the HLQ.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 128
Location: Switzerland

PostPosted: Thu Jan 12, 2017 12:54 pm    Post subject:
Reply with quote

do you have multi-level aliases? assuming that SYSU is not on the master catalog, you might be able to define alisas SYS1.TEST to the catalog the dataset is cataloged in. Alternatively rename it back using the CATALOG parameter. aliaslevel gt 1 can be set dynamically.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Fri Mar 03, 2017 1:38 pm    Post subject:
Reply with quote

Do a LISTCAT of the SYSU alias and take note of what Usercatalog (or Mastercatalog) it relates to.
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
LISTC ENT(SYSU) ALL

Do a LISTCAT for the SYS1.TEST.V1.CSI dataset with a catalog parameter pointing to the SYSU catalog identified in the above LISTCAT.
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
LISTC ENT(SYS1.TEST.V1.CSI) ALL -
CAT(usercat.sysu)

Assuming SYS1.TEST.V1.CSI is displayed in the above LISTCAT, you could do EITHER of:

1. Run an IDCAMS REPRO MERGECAT of the entry from the SYSU catalog to the SYS1 catalog.

2. If it's NON-SMS you may be able to do a DFDSS DUMP DELETE of SYS1.TEST.V1.CSI with the INCAT(usercat.sysu) parameter into a backup dataset, and then do a DFDSS RESTORE CATALOG of SYS1.TEST.V1.CSI which will catalog it correctly.

3. Rename it back to it's original SYSU name, at which point it will 'magically' appear. (if it's a VSAM file you have to do this for each component, i.e. Cluster, Data and Index as applicable)
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALTER SYS1.TEST.V1.CSI -
NEWNM(SYSU.TEST.V1.CSI) -
CAT(usercat.sysu)

At this point you could then do either a DFDSS DUMP & RESTORE, or a COPY. The advantage with DFDSS is it takes care of renaming all the components for you if it's a VSAM dataset.

a) a standard DFDSS DUMP of SYSU.TEST.V1.CSI into a backup, then do a RESTORE with RENAMEU(oldname,newname) to restore it to the new SYS1.TEST.V1.CSI name.

b) do a DFDSS COPY with RENAMEU(oldname,newname)

With either approach above you have the option to delete the source dataset, either at DUMP or COPY. But you could also delete the source with an IDCAMS job once your happy the new target dataset is all in order. And you DFDSS DUMP backup will be around for a while to restore from again if necessary.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us