Python

 View Only

Unlocking Value: Key Features and Benefits of Python on z/OS

By Hyder Naqvi posted 06/22/26 05:17 PM

  

Systems Interoperability [IBM]

Introduction

Python on z/OS enables new ways to build and operate applications directly on the platform.

Teams can write, automate, and integrate applications where enterprise data and workloads already reside. This allows modern development practices to be applied without introducing additional layers or restructuring existing environments.

The sections that follow show how Python is used on z/OS, the capabilities it enables across data, automation, and AI workloads, and how these translate into practical benefits for development and operations.

Using Python on z/OS

Python on z/OS enables modern development directly on the platform.

Developers can build applications, automate workflows using tools such as Ansible, and develop services within the environment. This keeps development close to enterprise data while supporting modernization in place.

Python also provides access to a large ecosystem of packages through tools such as PyPI. These capabilities are extended through tools such as the Python AI Toolkit (PAIT), Machine Learning for z/OS (MLz), and IBM Z Open Automation Utilities.

Core Capabilities

Extending to AI and analytics
Using PAIT and MLz, Python supports AI and machine learning workloads directly on z/OS.

These workloads run closer to enterprise data, enabling analytics without moving large or sensitive datasets off the platform.

Working directly with z/OS data
Python can interact with datasets, files, and system resources on z/OS, enabling developers to build and run workflows without leaving the platform.Developers can programmatically access data and services:

  • ZOAU: read, write, and manage datasets (including VSAM); submit and manage jobs

  • ibm_db: access Db2 data

  • CBXP: inspect z/OS control blocks

  • EzNoSQL: access EzNoSQL databases on z/OS

This way processing stays on-platform, avoiding unnecessary data movement.

Example
Dataset operations such as reading, transforming, and writing records can be handled in a single Python workflow. ZOAU, for example, replaces multi-step scripts or batch jobs with reusable code.

Using existing libraries and packages
Python on z/OS provides access to open-source libraries through PyPI and curated environments such as PAIT.

PAIT provides access to 200+ curated packages for data processing, analytics, and AI workloads. Teams can reuse existing libraries instead of building functionality from scratch.

Running efficiently on z/OS
Eligible Python workloads can leverage zIIP processors, with up to 70% of runtime eligible for offload. To see what’s eligible check this out.

This improves efficiency and helps optimize compute cost while preserving general-purpose CPU capacity.

Automating system workflows
Python simplifies scripting and automation across system tasks.

With tools such as Ansible, teams can standardize workflows, reduce manual processes, and align z/OS automation with broader DevOps practices. ZOAU provides further automation options as it facilitates the submission of n of JCL, query/cancel/wait for it to finish

Integrating with existing applications
Python can be used alongside existing applications and workflows, including COBOL, JCL, and REXX.

Support exists for both:

Python can be invoked from JCL or REXX to handle data transformation or automation tasks. As shown in Using Python with JCL and REXX, this allows teams to extend existing workflows without rewriting them.

What This Enables

These capabilities change how work is done on z/OS.

Faster development cycles
Teams can build and iterate using familiar tools and libraries.

Reduced complexity
Applications run directly on the platform, avoiding additional integration layers.

Improved collaboration across teams
Distributed and mainframe teams can use the same language and development patterns.

Better use of resources
zIIP enablement allows workloads to run efficiently without increasing general-purpose CPU usage.

Compared to Traditional Approaches

Traditional z/OS automation and scripting often rely on languages such as REXX.

Python provides an alternative that is widely used, extensible, and aligned with modern development practices.

It complements existing approaches rather than replaces them. Teams can reuse existing workflows while extending them with Python where it adds value, especially for automation, integration, and data processing.

Extending the Value of z/OS

Python extends how z/OS can be used.

It enables modern development, automation, and data-driven workloads to operate alongside existing applications using a consistent and widely understood model.

Organizations can continue building on existing systems while aligning with how software is developed today.

Resources

For more information and to explore Python on z/OS further:

0 comments
55 views

Permalink