MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating a VSAM cluster like existing one and copying data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Thu Nov 17, 2005 3:56 pm    Post subject: Creating a VSAM cluster like existing one and copying data Reply with quote

Hai all,

I have a VSAM dataset and i know that ESDS cluster by looking into the LISTCAT option.I want to create another VSAM ESDS cluster like / same as the existing one and copy the entire data in a single step ? How can i achieve my results ? Please correct my JCL.

Code:

//STEP0100 EXEC PGM=IDCAMS                 
//IN       DD DSN=PROJECT.TEST.ESDS,DIS=SHR
//OUT      DD DSN=PROJECT.TEST.ESDSNEW     
//SYSPRINT DD SYSOUT=*                     
//SYSOUT   DD SYSOUT=*                     
//SYSIN    DD *                           
  REPRO INFILE(IN) OUTFILE(OUT)           
/*                                         
//                                                                                         

Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Nov 17, 2005 5:23 pm    Post subject: Reply with quote

Try defining the new cluster using the MODEL parameter.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt1v403/3.7.3.7?SHELF=&DT=19990113080956&CASE=
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Vinodch
Beginner


Joined: 23 Dec 2002
Posts: 80
Topics: 32
Location: Chennai, India

PostPosted: Tue Dec 13, 2005 12:40 am    Post subject: Reply with quote

Mervyn

This might be a too late reply. The following also should work:

Code:

//STEP0100 EXEC PGM=IDCAMS
//IN DD DSN=PROJECT.TEST.ESDS,DIS=SHR
//OUT DD DSN=PROJECT.TEST.ESDSNEW,
// DISP=(NEW,CATLG,DELETE),
// LIKE=PROJECT.TEST.ESDS

//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(IN) OUTFILE(OUT)
/*
//
_________________
Thanks,
Vinod.
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Tue Dec 13, 2005 4:34 am    Post subject: Reply with quote

Vinod, it's always worthwhile posting a sensible alternative. It may help someone later on when they do a search.

Cheers,
Merv
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Tue Dec 13, 2005 7:13 am    Post subject: Reply with quote

I would use an adrdssu job:
Code:

//COPY1    EXEC  PGM=ADRDSSU,REGION=2M                   
//SYSPRINT DD    SYSOUT=*                                 
//DD2      DD    UNIT=3390,VOL=SER=volser,DISP=OLD       
//SYSIN    DD    *                                       
           COPY  DS (INC(                      -         
                     PROJECT.TEST.ESDS    -         
                                       ))     -           
                  OUTDDNAME(DD2)                -         
                 ALLDATA(*)                    -         
                 ALLEXCP                       -         
                 SPHERE                        -         
                 TOL(ENQF)                     -         
                 RENAMEU((PROJECT.TEST.ESDS       - 
                          PROJECT.TEST.ESDSNEW))    - 
                  CATALOG                     -           
                 CANCELERROR                             
/*                                                       
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group