IEBCOPY Utility.
Situation-
Whenever there is requirement to copy a PDS to another PDS or copying a member to another pds or exclude
some members from one PDS and copying remaining all members for backup purpose
then we will use IEBCOPY utility.
1)
To copy all the members of one PDS to another PDS.
Here
we have to define to Dataset one is as input and another is as output.
Below
I have taken “Avinash.copy.pds” as my input dataset and my output dataset is “Avinash.new4.pds”.
In
the control card i.e in sysin dd * I have given the instruction that my input
dataset name is defined by sysut3 and my output dataset is defined by sysut4.
This will copy all my input dataset member
into my output dataset.
1) One very important thing
is before copying you should check the record length both input and output
dataset Record length must be same.
2) If the record length is
not same then you will get maxcc=0 but members will not copy.
3) Always write outdd as first and indd as
second else will give you maxcc=08.
Now to copy a selective member
from one pds to another pds.
For this requirement just add one line in
your control card i.e. select member=(mem1,mem2,etc)
It will select only that particular member
in your output dataset.
To exclude a particular member
from input dataset to copy then just use
Exclude member=(mem1,mem2,etc).
It will not copy only these members and
rest of member will copy.
Can we use both exclude and select
statement in one program?
No comments:
Post a Comment