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
 

 

Replacing dataset by the contents of some other dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Replacing dataset by the contents of some other dataset
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    Post subject: Information
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

Moderator Team Head


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

PostPosted: Fri Jan 19, 2007 8:56 pm    Post subject: Re: Replacing dataset by the contents of some other dataset
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

Site Director


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

PostPosted: Fri Jan 19, 2007 10:09 pm    Post subject:
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    Post subject: Thanks Dick Scherrer
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    Post subject: Re: Replacing dataset by the contents of some other dataset
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

Site Director


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

PostPosted: Sat Jan 20, 2007 12:21 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm


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