Modernization Hub

Inherit

Enhanced Definition

In the context of z/OS, "inherit" primarily refers to a child process receiving attributes, environment variables, or open file descriptors from its parent process, particularly within z/OS UNIX System Services (USS). It also describes how new data sets acquire characteristics from higher-level definitions or models, such as SMS data classes or model DSCBs.

Key Characteristics

    • Process Context Propagation (USS): Child processes created via fork() or spawn() typically inherit the parent's environment variables, current working directory, open file descriptors, and resource limits.
    • Attribute Defaulting: It acts as a defaulting mechanism where if an attribute is not explicitly specified for a new entity (e.g., a data set), it takes the value from a predefined source like a data class or catalog.
    • Hierarchical Relationship: Implies a parent-child or higher-to-lower level relationship where properties flow downwards, promoting consistency and reducing redundant definitions.
    • System-Level Mechanism: This is a fundamental operating system mechanism, particularly evident in multi-process environments like z/OS USS, and in data set management.
    • Efficiency and Consistency: Reduces the need to explicitly define every attribute for every new entity, promoting consistency across similar resources and simplifying administration.

Use Cases

    • z/OS UNIX System Services (USS) Process Creation: When a shell script or C program forks a child process, the child inherits the parent's environment variables (e.g., PATH, LIBPATH), open file descriptors (unless O_CLOEXEC is set), and resource limits.
    • Data Set Allocation: A new data set might inherit attributes like RECFM, LRECL, BLKSIZE, or SPACE from a model DSCB, a data class defined in SMS, or the catalog entry of a previous generation.
    • JCL Procedure Parameters: While not true inheritance, a JCL procedure (PROCLIB member) can define symbolic parameters that are effectively "inherited" and overridden by the calling JCL, allowing for parameterization from a parent context.
    • RACF Profile Management: Although not object-oriented inheritance, RACF permissions for a resource can be effectively "inherited" or derived from a more general profile or through group membership if a specific profile doesn't exist.

Related Concepts

Inheritance is fundamental to the z/OS UNIX System Services (USS) environment, where it underpins how processes manage their execution context and interact. It relates to data set management by providing mechanisms for consistent attribute assignment, often leveraging SMS (Storage Management Subsystem) data classes and catalogs to define default characteristics. While distinct from object-oriented inheritance, it shares the principle of deriving characteristics from a parent or template, similar to how JCL procedures receive symbolic parameters from a calling job. It also touches upon security (RACF) where permissions can be implicitly derived based on hierarchical structures.

Best Practices:
  • Explicitly Close Unneeded File Descriptors (USS): In USS, child processes inherit open file descriptors. Best practice is for parent processes to close file descriptors not intended for the child, or for children to close those they don't need, to prevent resource leaks and security vulnerabilities.
  • Manage Environment Variables Carefully (USS): Be mindful of environment variables inherited by child processes. Ensure sensitive information is not inadvertently passed down, and clean up unnecessary variables to maintain a clean execution environment.
  • Leverage SMS Data Classes for Data Set Attributes: For managed data sets, use SMS data classes to define and "inherit" standard attributes, ensuring consistency, simplifying data set allocation, and enforcing storage policies.
  • Document Inherited Behaviors:

Related Vendors

IBM

646 products

Applied Software

7 products

Trax Softworks

3 products

Related Categories

Operating System

154 products

Encryption

41 products

Files and Datasets

168 products

Browse and Edit

64 products