Delete content of a sequential dataset using IDCAMS

The following JCL will delete the content of a sequential dataset without deleting it using the IDCAMS utility:


//DELCONT  EXEC PGM=IDCAMS
//DDDMMY   DD DUMMY
//DDOUT    DD DISP=SHR,DSN=USER1.MYDATA.EXAMPLE
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
REPRO IFILE(DDDMMY) OFILE(DDOUT)

 

Replace USER1.MYDATA.EXAMPLE by the sequential dataset you wish to delete the content of.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.