View previous topic :: View next topic
|
Author |
Message |
Madhaviy
New User
Joined: 30 Oct 2009 Posts: 37 Location: India
|
|
|
|
Hi
I want to copy(replace) all members of one PDS into other one. However the target library has members than the source one. I want all matched members to be replaced, unmatched in source to be copied to target and unmatched in target to be deleted so that afterwards both are same.
By using IEBCOPY with Replace the unmatched members in target still remaims.
Thank you |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you considered deleting and recreating the target PDS. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I want all matched members to be replaced,
unmatched in source to be copied to target
unmatched in target to be deleted so that afterwards both are same.
|
why not simply delete the destination dataset and do a full iebcopy
if You have authorizations issues ask Your support if a tool is available to <empty> a PDS/PDSE
or search the forums for suggestions empty pds might be a good search argument
ibmmainframes.com/viewtopic.php?t=25611&highlight=empty+pds |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Have you considered deleting and recreating the target PDS. |
I feel that the issue is not completely unreasonable, too many times the access is just UPDATE
that' s what I usually do for my important datasets, after allocating them I lower my own racf authorization to update
due to fast/fat fingers a few times I deleted important stuff ,
and granting myself a lower authority solved the problem |
|
Back to top |
|
|
Madhaviy
New User
Joined: 30 Oct 2009 Posts: 37 Location: India
|
|
|
|
Deleting is not recommended as it is a load library.
Will ADRDSSU using RENUNC with REPLACEU be useful?
Thank you, |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
ADRDSSU operates at the data set level, not the PDS member level.
If I understand your requirement correctly, you have several choices:
1. Delete and redefine the data target to get rid of everything in it, then do the copy from the source.
2. Accept the unchanged target members as being there
3. Manually compile a list of the target members that need to be deleted and delete them (via ISPF 3.4 for example).
4. Write a program to parse a printout of the two member lists so it can generate the delete statements to get rid of the unwanted target members
5. Delete all members of target then do the copy |
|
Back to top |
|
|
Madhaviy
New User
Joined: 30 Oct 2009 Posts: 37 Location: India
|
|
|
|
Thanks Robert.
ADRDSSU works at dataset level.
Is it possible that it may Replace a complete dataset(which is our target) using REPLACEU with our source dataset.
so that there are no deletes involved, though technically it is deleting some members.
thank you, |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
To allow for a 'backout' it's probably best to rename the target to something else (e.g. .OLD suffix).
You can then use DFDSS (ADRDSSU) to COPY RENAMEU your source to create the original target dsname to end up with just the members from the source library. The only consideration is that the target will inherit all the characteristics of the source library in terms of DCB (lrecl & blksize) and space sizing including directory blocks. If that is not what's desired then you'd have to just allocate a new (empty) target library with the desired DCB etc, and IEBCOPY the source into it. |
|
Back to top |
|
|
Madhaviy
New User
Joined: 30 Oct 2009 Posts: 37 Location: India
|
|
|
|
Thanks Pete. |
|
Back to top |
|
|
|