IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Replacing dataset by the contents of some other dataset


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
boopathi

New User


Joined: 25 Jul 2006
Posts: 3
Location: bangalore

PostPosted: Fri Jan 19, 2007 6:30 pm
Reply with quote

How to replace the contents of the old dataset by the contents of some other dataset?
Back to top
View user's profile Send private message
boopathi

New User


Joined: 25 Jul 2006
Posts: 3
Location: bangalore

PostPosted: Fri Jan 19, 2007 8:53 pm
Reply with quote

Well I tried with Move and Copy..

Move will delete the new dataset and append the content with exisiting one

Copy will keep both the dataset and append the content of new to old one

But I want to Replace the content of old one with new and don wan to delete any..

Well my requirement is for PS..
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jan 19, 2007 8:56 pm
Reply with quote

First, you delete all of the content in the current dataset, then you can COPY the other dataset's contents in.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 19, 2007 10:09 pm
Reply with quote

Hello,

When you want "copy" one file over another, make sure that the receiving dataset is specified as OLD not MOD. If you copy using =3.3, the default disposition is often MOD and this will cause the data to be appended rather than written over.
Back to top
View user's profile Send private message
boopathi

New User


Joined: 25 Jul 2006
Posts: 3
Location: bangalore

PostPosted: Fri Jan 19, 2007 10:58 pm
Reply with quote

Thanks a lot yaar..this is wat i wanted to know..thanks for ur timely reply.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Fri Jan 19, 2007 11:39 pm
Reply with quote

Pappu,

This should work for you in Batch

Code:

//JS00100  EXEC PGM=IDCAMS                       
//DDIN     DD DSN=YOUR.COPY.FROM.FILE,           
//          DISP=SHR                             
//DDOUT    DD DSN=YOUR.COPY.TO.FILE,             
//          DISP=SHR                             
//SYSPRINT DD DUMMY                               
//SYSIN DD *                                     
  REPRO IFILE(DDIN) OFILE(DDOUT) REUSE
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jan 20, 2007 12:21 am
Reply with quote

Hi Pappu,

You're welcome. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top