IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to recover an uncataloged VSAM data set


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 11, 2017 7:28 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 11, 2017 7:59 pm
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 Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Jan 12, 2017 12:54 pm
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 Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Fri Mar 03, 2017 1:38 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top