View previous topic :: View next topic |
Author |
Message |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Sat Jul 03, 2004 7:39 pm Post subject: How to copy VSAM file ? |
|
|
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 |
|
 |
pzmohanty Beginner

Joined: 20 May 2004 Posts: 97 Topics: 43 Location: hyderabad, India
|
Posted: Sun Jul 04, 2004 3:54 am Post subject: |
|
|
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 |
|
 |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Mon Jul 05, 2004 4:30 am Post subject: |
|
|
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 |
|
 |
warp5 Intermediate

Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Mon Jul 05, 2004 5:51 am Post subject: |
|
|
Take a look at ADRDSSU. It is very easy to copy a dataset with it. |
|
Back to top |
|
 |
Mike Chantrey Intermediate
Joined: 10 Sep 2003 Posts: 234 Topics: 1 Location: Wansford
|
Posted: Mon Jul 05, 2004 9:25 am Post subject: |
|
|
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 |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Mon Jul 05, 2004 9:30 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Jul 05, 2004 12:53 pm Post subject: |
|
|
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 |
|
 |
ANDY Beginner

Joined: 07 Feb 2004 Posts: 127 Topics: 67
|
Posted: Fri Jul 09, 2004 9:56 pm Post subject: |
|
|
Dear kolusu:
I really appreciate your help.
Best regards,
Andy _________________ cheers,
Andy |
|
Back to top |
|
 |
|
|