View previous topic :: View next topic
|
Author |
Message |
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi,
I need to copy members which are in my input dataset.
My input dataset contains the members list which I need to copy:
a12345.a.b.c(xxxx)
a12345.d.e.f(yyyy)
a12345.g.h.i(zzzzz)
.
.
.
I need to copy them to
a54321.a.b.c(xxxx)
a54321.d.e.f(yyyy)
a54321.g.h.i(zzzzz)
PDS where I need to copy may not exist. If it is not existing then we need to allocate it and then copy the member.
How can we do this using JCL? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You need:
1. A step to determine if the target PDS exists (see examples of the IDCAMS LISTCAT command for this).
2. If the target PDS doesn't exist, you'll have to allocate and catalog it.
3. You'll need to read the list of member names to be copied and generate a list of IEBCOPY SELECT statement as needed. A DFSORT/SYNCSORT/REXX/CLIST/Easytrieve/SAS step ought to work.
4. Last, you'll need IEBCOPY to copy the list of selected members from the source PDS to the target PDS. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If this is a one-time requirement, you might consider tso/ispf 3.3 Move/Copy Utility.
You can copy part or all of your pds to another, creating it "on the fly" if it does not exist. |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Dick,
Its not one time requirement. Currently we are doing using 3.3 Some times we will get bulk members (in 100s) in the dataset to copy. That is the reason we are looking for the jcl. |
|
Back to top |
|
|
|