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 

How to copy VSAM file ?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Sat Jul 03, 2004 7:39 pm    Post subject: How to copy VSAM file ? Reply with quote

Hello,

Can someone show me a way to copy from an existing VSAM file to
a new one which does not exist yet?

Thanks

Andy
Back to top
View user's profile Send private message
pzmohanty
Beginner


Joined: 20 May 2004
Posts: 97
Topics: 43
Location: hyderabad, India

PostPosted: Sun Jul 04, 2004 3:54 am    Post subject: Reply with quote

hi andy,

Easiest way to copy an existing VSAM file to a new VSAM file is by using FILE-AID.
Go to FILE-AID ---> then go to option 3 ---> From there again go to option 3 , which is FILE-AID COPY Utility.
At this panel u have to supply FROM dataset info , which is ur old existing VSAM dataset.
& in TO dataset supply the new VSAM dataset info & also give here DISP= NEW.

now press enter which will take u to the new screen , here again press enter & U r done.

Hope this helps.....

P.R.Mohanty
Kanbay
_________________
Priya Ranjan Mohanty
Consultant
Kanbay Software (I) pvt. Ltd.
Hyderabad
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Mon Jul 05, 2004 4:30 am    Post subject: Reply with quote

Hi P.R.Mohanty :

Thank you for your reply. but this way depend on FILE-AID. Is it possible to
writting an jcl to realize it?

Cheers,

Andy
_________________
cheers,
Andy
Back to top
View user's profile Send private message
warp5
Intermediate


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

PostPosted: Mon Jul 05, 2004 5:51 am    Post subject: Reply with quote

Take a look at ADRDSSU. It is very easy to copy a dataset with it.
Back to top
View user's profile Send private message Visit poster's website
Mike Chantrey
Intermediate


Joined: 10 Sep 2003
Posts: 234
Topics: 1
Location: Wansford

PostPosted: Mon Jul 05, 2004 9:25 am    Post subject: Reply with quote

Using IDCAMS the steps are:
1/ DEFINE new dataset using the existing dataset as the MODEL parameter
2/ Then REPRO the data across
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Mon Jul 05, 2004 9:30 am    Post subject: Reply with quote

Mike,
I did it in a single IDCAMS step; where the new dataset was created using LIKE parameter pointing to the older VSAM dataset. I did this out of curiosity and was pleasantly surprised to know that it works!
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jul 05, 2004 12:53 pm    Post subject: Reply with quote

Andy,

The following JCL will copy an existing vsam file to a new vsam file with similar properties.

Code:

//STEP0100 EXEC PGM=IDCAMS                           
//SYSPRINT DD SYSOUT=*                               
//IN       DD DSN=YOUR OLD VSAM FILE,   
//            DISP=SHR                               
//OUT      DD DSN=YOUR NEW VSAM FILE,   
//            DISP=(NEW,CATLG,DELETE),               
//            UNIT=SYSDA,                           
//            SPACE=(CYL,(X,Y),RLSE),               
//            LIKE=YOUR OLD VSAM FILE   
//SYSIN    DD *                                     
  REPRO IFILE(IN) OFILE(OUT) REPLACE                 
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Fri Jul 09, 2004 9:56 pm    Post subject: Reply with quote

Dear kolusu:

I really appreciate your help.

Best regards,

Andy
_________________
cheers,
Andy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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