z/OS Unix System Services Max Non-Shared Memory

User Administration functions for accessing and modifying a user’s z/OS Unix System Services Max Non-Shared Memory.

UserAdmin.get_omvs_max_non_shared_memory()

def get_omvs_max_non_shared_memory(self, userid: str) -> Union[str, None, bytes]:

📄 Description

Get a user’s z/OS Unix System Services Max Non-Shared Memory.

📥 Parameters

  • userid
    The z/OS userid of the user whose z/OS Unix System Services Max Non-Shared Memory is being requested.

📤 Returns

  • Union[str, None, bytes]
    Returns the user’s z/OS Unix System Services Max Non-Shared Memory or None if it is not set or if the user does not have an OMVS segment. If the UserAdmin.generate_requests_only class attribute is set to True, concatenated Security Request XML bytes will be returned.

❌ Raises

  • SecurityRequestError
    Raises SecurityRequestError when the SAF Return Code of a Security Result is equal to 4.
  • DownstreamFatalError
    Raises DownstreamFatalError when the SAF Return Code of a Security Result is greater than 4.

💻 Example

Python REPL
>>> from pyracf import UserAdmin
>>> user_admin = UserAdmin()
>>> user_admin.get_omvs_max_non_shared_memory("squidwrd")
"4g"

UserAdmin.set_omvs_max_non_shared_memory()

def set_omvs_max_non_shared_memory(
    self, userid: str, max_non_shared_memory: Union[str, bool]
) -> Union[dict, bytes]:

📄 Description

Change a user’s z/OS Unix System Services Max Non-Shared Memory.

📥 Parameters

  • userid
    The z/OS userid of the user whose z/OS Unix System Services Max Non-Shared Memory is being set.

  • max_files_per_non_shared_memory
    The z/OS Unix System Services Max Non-Shared Memory to set for the specified user or False to delete the current value.

📤 Returns

  • Union[dict, bytes]
    Returns a Security Result Steps dictionary or Concatenated Security Request XML bytes if the UserAdmin.generate_requests_only class attribute is set to True.

❌ Raises

  • SecurityRequestError
    Raises SecurityRequestError when the SAF Return Code of a Security Result is equal to 4.
  • DownstreamFatalError
    Raises DownstreamFatalError when the SAF Return Code of a Security Result is greater than 4.
  • AlterOperationError
    Raises AlterOperationError 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_non_shared_memory("squidwrd", "8g")
{'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     (MEMLIMIT    (8g))'}]}, '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     (MEMLIMIT    (8g))"
          }
        ]
      },
      "returnCode": 0,
      "reasonCode": 0
    }
  }
}