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: 8569
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

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
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: 2567
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: 1099
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 Capture GDG Dataset Name JCL & VSAM 10
No new posts Using sort on VB records based on off... DFSORT/ICETOOL 6
This topic is locked: you cannot edit posts or make replies. Copy list of files from PS to another... CLIST & REXX 11
No new posts JOINKEYS to match two input files on ... DFSORT/ICETOOL 3
No new posts Creating a single-record file with CO... DFSORT/ICETOOL 8
Search our Forums:

Back to Top