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
 

 

Copying and deleting extra members

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

New User


Joined: 30 Oct 2009
Posts: 37
Location: India

PostPosted: Fri Feb 26, 2010 6:29 pm    Post subject: Copying and deleting extra members
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


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

PostPosted: Fri Feb 26, 2010 6:31 pm    Post subject:
Reply with quote

Have you considered deleting and recreating the target PDS.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Feb 26, 2010 6:40 pm    Post subject: Reply to: Copying and deleting extra members
Reply with quote

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
http://ibmmainframes.com/viewtopic.php?t=25611&highlight=empty+pds
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Feb 26, 2010 6:44 pm    Post subject: Reply to: Copying and deleting extra members
Reply with quote

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
View user's profile Send private message
Madhaviy

New User


Joined: 30 Oct 2009
Posts: 37
Location: India

PostPosted: Fri Feb 26, 2010 6:59 pm    Post subject: Reply to: Copying and deleting extra members
Reply with quote

Deleting is not recommended as it is a load library.
Will ADRDSSU using RENUNC with REPLACEU be useful?

Thank you,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Fri Feb 26, 2010 7:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Madhaviy

New User


Joined: 30 Oct 2009
Posts: 37
Location: India

PostPosted: Fri Feb 26, 2010 7:38 pm    Post subject: Reply to: Copying and deleting extra members
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Mon Mar 01, 2010 4:00 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Madhaviy

New User


Joined: 30 Oct 2009
Posts: 37
Location: India

PostPosted: Thu Mar 04, 2010 12:12 pm    Post subject:
Reply with quote

Thanks Pete.
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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
No new posts Copying Panvalet members to PDS LOGESHWARAN K CA Products 4 Mon Mar 06, 2017 10:45 am
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Differences between copying members b... E.LAI TSO/ISPF 8 Wed Mar 30, 2016 12:35 pm


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