View previous topic :: View next topic
|
Author |
Message |
Ayodhya prasad
New User
Joined: 29 May 2016 Posts: 2 Location: Noida
|
|
|
|
Hi,
I have a requirement that, using some jobs I collect number of member names of a PDS.
All these member name are save in a dataset. Suppose the dataset is A.
And the PDS is B.
Now I want to use my dataset 'A' as input to copy only these member to some other local PDS 'C' from PDS 'B'.
Please let me know how can I do that .
Regards
Ayodhya |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
One way would be to write a program in the language of your choice to read the data set, dynamically allocate each member of PDS B and PDS C, then copy ... deallocate, then repeat until all members are processed. |
|
Back to top |
|
|
Ayodhya prasad
New User
Joined: 29 May 2016 Posts: 2 Location: Noida
|
|
|
|
Thank you for you response Robert,
Sorry, I forgot to mention that the requirement is that it has to be done only using JCL.
Please educate me if there is any way out.
Thanks
Ayodhya |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
the requirement is that it has to be done only using JCL. |
then it cannot be done.
JCL does nothing ...
it sets up the environment to run a program .
so You will have to use a program written by You or a general purpose utility
which with the proper control statements will achieve what You want
I suggest a two step process
the first step should ( using Your sort product ) process dataset a to create the control statement for step 2
the second step will be a IEBCOPY step which will do the copy using the control statements created by step 1 |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
I do not get what you say as others did, so see if you can answers these more clearly with examples.
Quote: |
collect number of member names of a PDS |
1. You wanted count?
Quote: |
All these member name are save in a dataset. Suppose the dataset is A. |
2. Why this way ?
Quote: |
Now I want to use my dataset 'A' as input to copy only these member to some other local PDS 'C' from PDS 'B'. |
3.Which only ? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I'd suggest that you might use DFSORT to process the list of names in your 'A' dataset, producing IEBCOPY control cards e.g.
Code: |
SELECT MEMBER=((mem-name)) |
which you can pass as SYSIN to an IEBCOPY step which has the 2 PDSes specified as input and output.
Garry. |
|
Back to top |
|
|
|