Page 1 of 1

COPY PDS MEMBERS START WITH MEM* TO OTHER PDS

PostPosted: Fri Apr 15, 2011 9:40 am
by MuniManojKumark
Hi,

In a pds only two types of members are there ,one type is starts with INV and another is a starts with MEM , i need to copy all members start with INV to another pds and MEM members to another pds, tried with IEBCOPY UTILITY , but i didnot find like above case any where ,


Manoj

Re: COPY PDS MEMBERS START WITH MEM* TO OTHER PDS

PostPosted: Fri Apr 15, 2011 11:59 am
by enrico-sorichetti
is this a procedural/repetitive task, or a just do it once and forget about it ?

if its a do it once the fastest would be to use ISPF option 3.3 ( utility/copy )
when the member list is displayed just enter s MEM* and automagically all the members
starting with MEM will be selected
the same with the INV

if You are bound to use JCL, You will have to run a multi step job
step1 get the member list
step2 use your sort product to build the proper IEBCOPY control statements
step3 IEBCOPY INV*
step4 IEBCOPY MEM*

it could be done also with a single IEBCOPY step with two outputs
but it is easier to debug errors with two IEBCOPY steps