Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to copy PDS using dataset as input

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to copy PDS using dataset as input
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: 8479
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 01, 2016 6:26 pm    Post subject:
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    Post subject:
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 Member


Joined: 14 Mar 2007
Posts: 10619
Location: italy

PostPosted: Wed Jun 01, 2016 8:13 pm    Post subject: Reply to: How to copy PDS using dataset as input
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

Senior Member


Joined: 21 Sep 2010
Posts: 2244
Location: NY,USA

PostPosted: Wed Jun 01, 2016 10:21 pm    Post subject:
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: 1053
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Jun 02, 2016 3:58 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEBGENER to copy from FB to VB and re... Mike.Fulton All Other Mainframe Topics 3 Sat Aug 24, 2019 7:20 am
No new posts Search the strings present in ps file... Bhuvana Narasimhan All Other Mainframe Topics 8 Thu Aug 22, 2019 8:20 pm
No new posts TSO TEST writing to dataset Harold Barnes IBM Tools 3 Sat Aug 03, 2019 3:02 am
No new posts Unable to delete dataset - VSAM datas... netcrawler JCL & VSAM 20 Fri Jul 26, 2019 2:06 pm
No new posts Send text at cursor position on an IS... Domenic Ailati CLIST & REXX 10 Sun Jun 02, 2019 7:34 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us