IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to copy PDS using dataset as input


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ayodhya prasad

New User


Joined: 29 May 2016
Posts: 2
Location: Noida

PostPosted: Wed Jun 01, 2016 6:02 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 01, 2016 6:26 pm
Reply with quote

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
View user's profile Send private message
Ayodhya prasad

New User


Joined: 29 May 2016
Posts: 2
Location: Noida

PostPosted: Wed Jun 01, 2016 8:07 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jun 01, 2016 8:13 pm
Reply with quote

Quote:
the requirement is that it has to be done only using JCL.

then it cannot be done. icon_cool.gif

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Wed Jun 01, 2016 10:21 pm
Reply with quote

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
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Jun 02, 2016 3:58 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top