Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Delete/erase contents of a dataset or PDS using JCL

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

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Fri Apr 17, 2009 11:13 am    Post subject: Delete/erase contents of a dataset or PDS using JCL
Reply with quote

Hi!
Is it possible to delete/erase the contents of a data set or PDS using JCL without actually deleting the data set.?

For e.g.,

Say a data set 'qwerty.asdfg.zxcv' contains
*****Top of the Data*****
11111
22222
33333
***Bottom of the Data****

Is it possible to delete
11111
22222
33333

so that the data set looks like
*****Top of the Data*****
***Bottom of the Data****
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 17, 2009 11:30 am    Post subject:
Reply with quote

Hi,

There are many ways - you may use something like this:
Code:
//JS00100  EXEC PGM=IDCAMS                               
//DDDMMY   DD DUMMY                                     
//DDOUT    DD DSN=...input file
//            DISP=SHR                                   
//SYSIN    DD *                                         
  REPRO IFILE(DDDMMY) OFILE(DDOUT)                       
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//*                                                     
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 17, 2009 11:34 am    Post subject:
Reply with quote

Please take the back-up of input file first - not sure how important data do you have in that; or run a test on some test data if satisfied do whatever you want with your file.
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Fri Apr 17, 2009 12:27 pm    Post subject: Reply to: Delete/erase contents of a dataset or PDS using JC
Reply with quote

Anuj, it worked.
Thanks for the reply.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 17, 2009 3:55 pm    Post subject:
Reply with quote

Hopefully, I was helpful . . . icon_smile.gif

Ad
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Apr 17, 2009 4:19 pm    Post subject: Reply to: Delete/erase contents of a dataset or PDS using JC
Reply with quote

This topic shows a few different methods for emptying a sequential dataset.

This topic shows a few different methods for emptying a PDS.
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Fri Apr 17, 2009 4:23 pm    Post subject: Reply to: Delete/erase contents of a dataset or PDS using JC
Reply with quote

Thanks Superk, for the information
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us