Deleting a Dataset - DELETE Command


DELETE statement is used to delete one or more datasets or members from a partitioned dataset.

Syntax -

DELETE <datasetname> [membername] [options]

Where -

  • datasetname is the name of the dataset to be deleted.
  • target-dataset is the name of the member to be deleted (if the dataset is a partitioned dataset).
  • Options are optional parameters that you can use to customize the deletion process.

Examples -

Scenario1 - delete a dataset.

DELETE 'MATEPK.ISPF.TESTPDS'

This would delete the MATEPK.ISPF.TESTPDS dataset from the system.