Delete
Delete a data set profile.
DataSetAdmin.delete()
def delete(
self, data_set: str, volume: Union[str, None] = None, generic: bool = False
) -> Union[dict, bytes]:
📄 Description
Delete a data set profile.
📥 Parameters
-
data_set
The name of the data set profile being deleted. -
volume
A single volume name for this data set profile. This argument is optional. Ifgeneric=True
is specified, volume is ignored. -
generic
A bool indicating whether to treat this profile as generic or not. This argument is optional and defaults toFalse
.
📤 Returns
Union[dict, bytes]
Returns a Security Result dictionary or Security Request XML bytes if theDataSetAdmin.generate_requests_only
class attribute is set toTrue
.
❌ Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
💻 Example
Python REPL
>>> from pyracf import DataSetAdmin
>>> data_set_admin = DataSetAdmin()
>>> data_set_admin.delete("ESWIFT.TEST.T1136242.P3020470")
{"securityResult":{"dataSet":{"name":"ESWIFT.TEST.T1136242.P3020470","operation":"del","generic":"no","requestId":"DatasetRequest","commands":[{"safReturnCode":0,"returnCode":0,"reasonCode":0,"image":"DELDSD ('ESWIFT.TEST.T1136242.P3020470')"}]},"returnCode":0,"reasonCode":0}}
Security Result Dictionary as JSON
{
"securityResult": {
"dataSet": {
"name": "ESWIFT.TEST.T1136242.P3020470",
"operation": "del",
"generic": "no",
"requestId": "DatasetRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "DELDSD ('ESWIFT.TEST.T1136242.P3020470')"
}
]
},
"returnCode": 0,
"reasonCode": 0,
"runningUserid": "testuser"
}
}