Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8614
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 Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Historical/statistical details for me... elixir1986 TSO/ISPF 13 Wed Aug 30, 2017 9:02 pm

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