z/OS Unix System Services Max Threads
User Administration functions for accessing and modifying a user’s z/OS Unix System Services Max Threads.
UserAdmin.get_omvs_max_file_max_threads()
def get_omvs_max_threads(self, userid: str) -> Union[int, None, bytes]:
📄 Description
Get a user’s z/OS Unix System Services Max Threads.
📥 Parameters
userid
The z/OS userid of the user whose z/OS Unix System Services Max Threads is being requested.
📤 Returns
Union[int, None, bytes]
Returns the user’s z/OS Unix System Services Max Threads orNone
if it is not set or if the user does not have an OMVS segment. If theUserAdmin.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 UserAdmin
>>> user_admin = UserAdmin()
>>> user_admin.get_omvs_max_threads("squidwrd")
128
UserAdmin.set_omvs_max_threads()
def set_omvs_max_threads(
self, userid: str, max_threads: Union[int, bool]
) -> Union[dict, bytes]:
📄 Description
Change a user’s z/OS Unix System Services Max Threads.
📥 Parameters
-
userid
The z/OS userid of the user whose z/OS Unix System Services Max Threads is being set. -
max_threads
The z/OS Unix System Services Max Threads to set for the specified user orFalse
to delete the current value.
📤 Returns
Union[dict, bytes]
Returns a Security Result Steps dictionary or Concatenated Security Request XML bytes if theUserAdmin.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 z/OS userid supplied cannot be altered because it does NOT exist.
💻 Example
Python REPL
>>> from pyracf import UserAdmin
>>> user_admin = UserAdmin()
>>> user_admin.set_omvs_max_threads("squidwrd", 96)
{'step1': {'securityResult': {'user': {'name': 'SQUIDWRD', 'operation': 'set', 'requestId': 'UserRequest', 'info': ['Definition exists. Add command skipped due to precheck option'], 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'ALTUSER SQUIDWRD OMVS (THREADSMAX (96))'}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}}
Security Result Steps Dictionary as JSON
{
"step1": {
"securityResult": {
"user": {
"name": "SQUIDWRD",
"operation": "set",
"requestId": "UserRequest",
"info": [
"Definition exists. Add command skipped due to precheck option"
],
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "ALTUSER SQUIDWRD OMVS (THREADSMAX (96))"
}
]
},
"returnCode": 0,
"reasonCode": 0
}
}
}