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
 

 

Want to copy the members from 1st pds to 2nd pds

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mnnarayankar

New User


Joined: 21 Jan 2008
Posts: 24
Location: bangalore

PostPosted: Fri Sep 05, 2008 12:07 pm    Post subject: Want to copy the members from 1st pds to 2nd pds
Reply with quote

Hi champs,

I have one concerned regarding following issue

i have 1 ps file contains many programs name
and have 2 pds.

i want to copy the members from 1st pds to 2nd pds but members from 1st pds should be matches with member list available in ps. only maches members i want to copy to another pds.

ex. ps contains

EFGH
PQRS
XYZU


1st pds contains

ABCD
EFGH
JCL
MNOP
PQRS
XYZU

result of seconde pds should be

EFGH
PQRS
XYZU

From Mohan N.[/list]
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Sep 05, 2008 12:12 pm    Post subject:
Reply with quote

Take a look in the REXX forum, there are examples of listing the members of a PDS, you can easily create a compare logic, and then invoke the method du jour to copy from PDS1 to PDS2.

Alternatively, read the PS file and create IEBCOPY select statements and then run IEBCOPY.

If you are not au fait with REXX then using edit commands on the screen will be quick.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Sep 05, 2008 4:20 pm    Post subject:
Reply with quote

Hi,

try this, members in PDS2 will be replaced if they exist
Code:
//S1       EXEC  PGM=ICEMAN                                           
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                       
EFGH                                                                 
PQRS                                                                 
XYZU                                                                 
//SORTOUT  DD DSN=&&MEMS,DISP=(,PASS,DELETE),                         
//            UNIT=SYSDA,SPACE=(TRK,(5,5),RLSE)                       
//SYSIN    DD *                                                       
  OPTION COPY                                                         
   OUTFIL  BUILD=(C'  S M=',1,8,80:X)                                 
/*                                                                   
//PDSCOPY EXEC PGM=IEBCOPY                                           
//SYSPRINT  DD SYSOUT=*                                               
//I1        DD DISP=SHR,DSN=INPUT-PDS1                               
//O1        DD DISP=SHR,DSN=OUTPUT-PDS2                               
//SYSIN     DD *                                                     
  C O=O1,I=((I1,R))                                               
//          DD DSN=&&MEMS,DISP=(OLD,DELETE)                           
/*                                                                   



Gerry
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 copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


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