View previous topic :: View next topic
|
Author |
Message |
boopathi
New User
Joined: 25 Jul 2006 Posts: 3 Location: bangalore
|
|
|
|
How to replace the contents of the old dataset by the contents of some other dataset? |
|
Back to top |
|
|
boopathi
New User
Joined: 25 Jul 2006 Posts: 3 Location: bangalore
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
First, you delete all of the content in the current dataset, then you can COPY the other dataset's contents in. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
boopathi
New User
Joined: 25 Jul 2006 Posts: 3 Location: bangalore
|
|
|
|
Thanks a lot yaar..this is wat i wanted to know..thanks for ur timely reply. |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Pappu,
You're welcome. . . |
|
Back to top |
|
|
|