Batch Job to delete all members of a Partitioned dataset

Here’s a simple way of deleting all members of a partitioned dataset via a batch job:


//DELETE   EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
DELETE  USER1.PDS.EXAMPLE(*)

 

In the above example all the members (represented by the *) of the dataset USER1.PDS.EXAMPLE will be deleted.

3 Comments

  1. I tried to do this on a z/OS 1.11 system and got
    error message IDC3203I ITEM ‘pdsname(*)’ DOES NOT ADHERE TO RESTRICTIONS.

Leave a Reply

Your email address will not be published.


*


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