Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7909
Location: Bellevue, IA

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
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: 1609
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

Active Member


Joined: 08 May 2006
Posts: 988
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 Performing arithmetic on input field zh_lad DFSORT/ICETOOL 1 Tue Dec 06, 2016 8:04 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 6 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us