DELETE command

Use the DELETE command to delete one or more data set entries or one or more members of a partitioned data set. The catalog entry for a partitioned data set is removed only when the entire partitioned data set is deleted. The system deletes a member of a partitioned data set by removing the member name from the directory of the partitioned data set.

When you specify one of your data set names to be deleted the system adds your user ID and, if possible, a descriptive qualifier. Because this can change your intended request, be careful when deleting data sets that you do not delete data sets you want to keep. For example, if you want to delete data set Z, you need to specify DELETE Z. But if data set Z did not exist and there were a data set Z.Y, data set Z.Y would not be deleted. Specify DELETE Z.Y to delete data set Z.Y. The system derives the descriptive qualifier Y from the catalog and deletes that data set.

If you want to be sure that your TSO prefix (if present) is not prepended to the data set name, place the name within single quotes. For example, if your TSO prefix is 'SAM1' and you want to delete data set Z.Y, specifying DELETE Z.Y will fail because it tries to delete 'SAM1.Z.Y'. Instead specify DELETE 'Z.Y' so that the data set named 'Z.Y' is deleted.

If more than one descriptive qualifier exists for a data set, the system will prompt you for the additional information. For example, if you have data sets Z.X and Z.Y and you issue the command DELETE Z, the system will ask you to specify qualifier X or Y.

Members of a partitioned data set and aliases for any members must each be deleted explicitly except with a PDSE member. That is, when you delete a PDS member, the system does not remove any alias names of the member. Also, when you delete a PDS or PDSE alias name, the member itself is not deleted.

If a generation data group entry is to be deleted, any generation data sets that belong to it must have been deleted.

For MVS™, the original TSO/E DELETE command has been replaced by the Access Method Services command with the same name. Note that when you delete a data set, you must also free the allocated ddnames. If you want to modify VSAM objects or use the other Access Method Services from a terminal, see z/OS DFSMS Access Method Services Commands. For error message information, see the MVS/ESA System Messages library.

The DELETE command supports unique operand abbreviations in addition to the typical abbreviations produced by truncation. The syntax and operand explanations show these unique cases.

After you delete a protected non-VSAM data set, use the PROTECT command to delete the password from the password data set. This prevents you from having insufficient space for future entries.