Universal Access
Data Set Profile Administration functions for checking a data set profileβs Universal Access Attribute.
DataSetAdmin.get_universal_access()
def get_universal_access(self, data_set: str) -> Union[str, bytes, None]:
π Description
Check the Universal Access Attribute for a data set profile.
π₯ Parameters
data_set
The data set profile for which RACF should check the universal access attribute.
π€ Returns
Union[str, bytes, None]
ReturnsNone
when the data set profile has no Universal Access defined, otherwise returns the access level as a string. If theDataSetAdmin.generate_requests_only
class attribute is set toTrue
, concatenated Security Request XML bytes will be returned.
β 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.get_universal_access("ESWIFT.TEST.T1136242.P3020470")
"read"
DataSetAdmin.set_universal_access()
def set_universal_access(self, data_set: str, universal_access: str) -> Union[dict, bytes]:
π Description
Set the Universal Access Attribute for a data set profile.
π₯ Parameters
-
data_set
The data set profile for which RACF should set the universal access attribute. -
universal_access
The Universal Access level to set for the specified data set profile.
π€ Returns
Union[dict, bytes]
Returns a Security Result Steps dictionary or Concatenated 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
.AlterOperationError
RaisesAlterOperationError
when the data set profile cannot be altered because it does NOT exist.
π» Example
Python REPL
>>> from pyracf import DataSetAdmin
>>> data_set_admin = DataSetAdmin()
>>> data_set_admin.get_universal_access("ESWIFT.TEST.T1136242.P3020470","ALTER")
{"securityResult":{"dataSet":{"name":"ESWIFT.TEST.T1136242.P3020470","operation":"set","generic":"no","requestId":"DatasetRequest","info":["Definition exists. Add command skipped due to precheck option"],"commands":[{"safReturnCode":0,"returnCode":0,"reasonCode":0,"image":"ALTDSD ('ESWIFT.TEST.T1136242.P3020470') UACC (Alter)"}]},"returnCode":0,"reasonCode":0}}
Security Result Steps Dictionary as JSON
{
"step1":{
"securityResult": {
"dataSet": {
"name": "ESWIFT.TEST.T1136242.P3020470",
"operation": "set",
"generic": "no",
"requestId": "DatasetRequest",
"info": [
"Definition exists. Add command skipped due to precheck option"
],
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "ALTDSD ('ESWIFT.TEST.T1136242.P3020470') UACC (Alter)"
}
]
},
"returnCode": 0,
"reasonCode": 0
}
}
}