Delete a sequential and partitioned data set
You can use this operation to delete sequential and partitioned data sets on a z/OS system.
HTTP method and URI path
DELETE /zosmf/restfiles/ds/<dataset-name>
DELETE /zosmf/restfiles/ds/-(<volume>)/<dataset-name>
where:
- /zosmf/restfiles specifies the z/OS® data set and file REST interface
- /ds indicates a data set request
- <dataset-name> is the name of a z/OS data set, that you are going to delete.
- <volume> is where the data set is resided, when the data set is uncatalogued.
Request Body
None.Standard headers
None.
Custom headers
None.
Query parameters
None.Content type
The content type is application/json.
Required authorizations
Usage considerations
Expected response
On completion, the service returns an HTTP response, which includes a status code indicating whether your request completed. Status code 204 indicates success. A status code of 4nn or 5nn indicates that an error has occurred. For more details, see Error handling.
If the request is successfully executed, status code 204 indicates success and no content is returned.
Example request
In the following example, the DELETE method is used to delete a data set.
DELETE /zosmf/restfiles/ds/JIAHJ.REST.TEST.DATASET HTTP/1.1
Example response
A sample response is shown in Figure 1.
Figure 1. Example: Delete a data set
204 No Content
Content-Type: application/json; charset=UTF-8
Content-Length: 0
Date: Wed, 16 Sep 2015 12:08:38 GMT
Example request
The DELETE method is used to delete an uncatalogued data set.
DELETE /zosmf/restfiles/ds/-(ZMF046)/JIAHJ.REST.TEST.DATASET2 HTTP/1.1
Example response
A sample response is shown in Delete
uncatalogued data set.
Figure 2. Example: Delete uncatalogued data set.
204 No Content
Content-Type: application/json; charset=UTF-8
Content-Length: 0
Date: Wed, 16 Sep 2015 12:10:22 GMT